Page 1 of 1

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

Posted: 2018-05-04T14:29:42-07:00
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!!

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

Posted: 2018-05-04T14:59:57-07:00
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.

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

Posted: 2018-05-04T15:02:35-07:00
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.

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

Posted: 2018-05-04T15:32:59-07:00
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?