Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Combining Graphics and Text

Featured Replies

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!

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

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 by Guest
provision of detailed sourc code example

I stand very much corrected! Hadn't even thought of ScriptMaster for this.

  • Author

This sounds like it will do what I need.

Thanks for your help!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.