I need to be able to take some variable text entered by the user and merge it with a "template" image to create a single image as PNG (or other). Can this be done with Livecode?

有帮助吗?

解决方案

There are several ways to do this. One way is to create a transparent field on top (or in front) of an image and group them. Give this group the name "Caption". Then use this script:

export snapshot from group "Caption" to myPictureData as PNG

Now you can create a new image and set the text of the image to myPictureData or save myPictureData to a file.

其他提示

If all you need is an image in your stack, the import snapshot command is a great option:

import snapshot from group "imgAndFld" with effects

The optional 'with effects' clause will preserve any graphic effects you have applied to the imported objects, important if you want your text to have a drop shadow or glow effect, for example.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top