Saving Labels in Images

I have labels on an imagewell, where I have an image loaded in the imagewell. The labels are updated based on what is typed in a text field.

I can save the imagewell contents as an image. The actual picture loaded in it I mean.

But Is there a way to save everything inside the boundaries of a imagewell to the image? Like the labels, and possibly another imagewell on top of the current one, inside it’s boundaries.

Once you have the Image you can use the Graphics object to draw whatever you want in the image. Keep in mind this is a one way trip because once you write to the image there’s no easy way to back it out.

Also, layering controls is a bad idea. It will almost always cause issues in Windows. You might want to look up how the Canvas object works and use that instead. Drawing the image and whatever text you need in the Paint event is easy.

Thanks Bob, will take a look at that. If you have any links to specifics, I would appreciate those.

Picture graphics
http://documentation.xojo.com/index.php/Picture.Graphics

Canvas Doc
http://documentation.xojo.com/index.php/Canvas

Graphics
http://documentation.xojo.com/index.php/Graphics

Thanks again Bob! :wink:

[quote=402899:@Don VF]I have labels on an imagewell, where I have an image loaded in the imagewell. The labels are updated based on what is typed in a text field.

I can save the imagewell contents as an image. The actual picture loaded in it I mean.

But Is there a way to save everything inside the boundaries of a imagewell to the image? Like the labels, and possibly another imagewell on top of the current one, inside it’s boundaries.[/quote]

Don,

You may want to create a “storage” class with no type and then assign two (or more) properties to it. The first property can be the picture property type and the second property can be a text or string type (for your label). (of course you have to instantiate this in order to use this class.property1 and class.property2 for example)

This would make loading your imagewell/canvas and the label easier to build dynamically and without worry of managing text strings drawn onto a picture.You would just pull the image and text out of this storage class.

HTH
Mike