Is it possible to create spine art from the jpgs filename?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Robin55
Posts: 22
Joined: 2018-03-19T15:29:46-07:00
Authentication code: 1152

Is it possible to create spine art from the jpgs filename?

Post by Robin55 »

Hi all!
Got an question here that I imagine MAY be possible.....

I need a bat file that will copy the text from the images file name and then add the text to the image its self in a certain place. I need to do this in batch.
I know that sometimes the file name may be too long but that's ok, I'll fix those few manually.

I want to go from this:
Image

To this:
Image

As always, any help much appreciated!!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is it possible to create spine art from the jpgs filename?

Post by fmw42 »

Please always provide your IM version. It would be helpful if you provided the specific location of the text onto your image. ImageMagick can scale the text to fit the width or height of the spine if you want. Otherwise specify the font and point size you want to use.

The basic idea is to create a text image on transparent background using label:. Then overlay than in the correct position on your background image.

See
https://www.imagemagick.org/Usage/text/
https://www.imagemagick.org/Usage/compose/#compose

Sorry I do not code Windows scripts.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Is it possible to create spine art from the jpgs filename?

Post by GeeMack »

Robin55 wrote: 2018-05-04T14:29:42-07:00I need a bat file that will copy the text from the images file name and then add the text to the image its self in a certain place. I need to do this in batch.
This would probably be quite simple to accomplish. Since you mention a BAT script it looks like you're working on a Windows system, but you need to let us know that when you ask a question so we can suggest the best approach. It's also important to let us know which version of ImageMagick you're using since there are differences in commands and options from one version to the next.
I know that sometimes the file name may be too long but that's ok, I'll fix those few manually.
Depending on your specific needs, ImageMagick can even adjust the size of the text for the few that may require it.
Robin55
Posts: 22
Joined: 2018-03-19T15:29:46-07:00
Authentication code: 1152

Re: Is it possible to create spine art from the jpgs filename?

Post by Robin55 »

wow so its possible!

The version of image magic I am using is 7.0.7-27 Q16 x64 and I am on Windows 10

Yes I would very much like the bat file to scale the script so it fits correctly even if the script is longer and I do need to do all this in batch.
As for the font and point size I want to use I have not decided on that yet (I am not working on the project at the moment)
Perhaps based on the pictures I uploaded you guys could give me a bat file that I could just slightly modify when it comes time to use it?
Post Reply