vanderark1 Posted November 13, 2009 Posted November 13, 2009 Using FM8 Advanced I have a table containing graphics. I have a table containing names. I would like to end up with a container field that combines the graphics and the names. Example: A png of a flower and I want 50 different versions of it, each with one name from the name table. I need to have this become a new png. I could potentially need to do this 1000's of times, so I need to automate somehow. I can't have a layout with the name under the flower and then print that. I need a png file when it's done (1000's of them). Is this something FM could do or do I need to work with graphics software? Any suggestions would be appreciated. Thanks!
dstuchbury Posted November 14, 2009 Posted November 14, 2009 FileMaker can't manipulate graphics in the way you're looking to do. I can't add anything regarding how you could automate this I'm afraid, or even comment on if it's possible. Not sure it is though TBH. HTH. Regards, Dan
fseipel Posted November 14, 2009 Posted November 14, 2009 (edited) I would suggest GIMP for sophisticated manipulations, the open source alternative to Adobe Photoshop, coupled with 'Script-fu', its scripting language. This should provide the necessary tools to manipulate the files, after which they can be re-imported. http://www.gimp.org/tutorials/Basic_Batch/ This will permit automation of nearly any image manipulation. To simply add text, you will also be able to use the free 360Works ScriptMaster plugin, to load, manipulate, and save images using the javax.imageio class. With ScriptMaster, you will be able to add text to images with drawstring. This may be a more elegant solution than GIMP Use bufferedimage and drawstring; bufferedimage to load file, drawstring to add text, and imageio to save it. For example, this script adds "Hello Caption" to the file c:pengbrew.png, and writes results back to c:newpingbrew.png. For testing purposes, I obtained pengbrew here: http://palmzlib.sourceforge.net/images/dir.html Of course, you'd want to modify this to get image size & put caption at correct relative coordinates, accept input & output filename as parameters, handle exceptions, and set font size/typeface, but this should get you started! Set new filename = old filename to overwrite. If files are in containers, just export them, add caption, re-import them. With Java you should be able to do a lot of other image manipulations beyond this. import javax.imageio.*; import java.awt.image.*; import java.awt.*; // Load image file called pengbrew File f = new File("c:pengbrew.png"); BufferedImage bufferedImage = ImageIO.read(f); Graphics2D g = bufferedImage.createGraphics(); g.setPaint(Color.black); // add Caption text g.drawString("Hello Caption Test",10,10); g.dispose(); // save new file (or overwrite old one) File f2 = new File("c:newpingbrew.png"); ImageIO.write(bufferedImage, "png", f2); Edited November 14, 2009 by Guest provision of detailed sourc code example
dstuchbury Posted November 15, 2009 Posted November 15, 2009 I stand very much corrected! Hadn't even thought of ScriptMaster for this.
vanderark1 Posted November 16, 2009 Author Posted November 16, 2009 This sounds like it will do what I need. Thanks for your help!
Recommended Posts
This topic is 5484 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now