Shoutbox

Image Scripting Help - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Image Scripting Help (/showthread.php?tid=82826)

Image Scripting Help by Baggins on 03-30-2008 at 09:32 PM

I have some codabar barcodes, saved as png files.
The filename is the number in the code.
[Image: attachment.php?pid=899177]
I want to put them together in an image using a script, to be printed out. The number (filename) must be centered under the code in about size 13 Arial. This image must be the right size to print on 8.5x11 paper.

I thought about using PHP or The GIMP. But PHP isn't very good when it comes to placement of TTF and I know almost nothing about Python or GIMP scripting.

Any suggestions of what to use? So long as I can make a page in < 30sec it would be fine, doesn't need to be a script.


RE: Image Scripting Help by markee on 03-30-2008 at 11:02 PM

You can use an image box of the text first to get the dimensions and then be able to centre that.  www.php.net/imagettfbox

i think you only need the 4th element of the array to get the width as well.  The you can compare it to the width of the background and divide the difference by 2, this will give the x offset tha you need for the text's placement.


RE: Image Scripting Help by Baggins on 03-30-2008 at 11:55 PM

Thanks for the tip, I never could figure out what the GD developers were smoking when they added TTF support. I found a nice looking class, so it shound be easier.

New plan: Use php to generate .html files, use OpenOffice.org to convert it to a PDF.


RE: Image Scripting Help by CookieRevised on 03-31-2008 at 12:09 AM

I would simply use PaintShopPro, open all the pngs and print them using the multi image option. Most likely PhotoShop has something similar. Using a script or whatever programming language seems a bit over the top... especially if it is only about 10 files ;)


RE: Image Scripting Help by Baggins on 03-31-2008 at 12:15 AM

It's not just 10 files, I plan to do at least 1000 :P

Also, having the number underneath is important.


RE: Image Scripting Help by CookieRevised on 03-31-2008 at 12:16 AM

quote:
Originally posted by Bilbo
It's not just 10 files, I plan to do at least 1000 :P
ah, lol, that's another case then (but still, PSP could do it)....
RE: Image Scripting Help by Jarrod on 03-31-2008 at 06:16 AM

quote:
Originally posted by CookieRevised
I would simply use PaintShopPro, open all the pngs and print them using the multi image option. Most likely PhotoShop has something similar. Using a script or whatever programming language seems a bit over the top... especially if it is only about 10 files ;)

if your doing 1000 it's probally obsolete but adobe does this, Via bridge, by going tools>photoshop>contact sheet II...