Page 1 of 1

Question about templateImage

Posted: Wed Dec 17, 2014 7:58 pm
by keithglong
Hi All,

This might be a dumb question, but here goes... In the dictionary it states:
You can use the set command to set the properties of the templateImage before creating an image. The new image has the properties of the templateImage, by default. Changing the properties of the templateImage does not affect existing images.
Suppose you already have an empty image object in place. When you put a new image into the object, do the set properties of the templateImage apply to the image? Or do you have to create the object first for the properties to apply accordingly? From the dictionary, it seems that the image object must be created first.

Thanks,

- Boo
Gulf Breeze, FL

Re: Question about templateImage

Posted: Wed Dec 17, 2014 8:35 pm
by Klaus
Hi Boo,
keithglong wrote:Suppose you already have an empty image object in place. When you put a new image into the object, do the set properties of the templateImage apply to the image?
no. :D
keithglong wrote:Hi All,
This might be a dumb question, but here goes... In the dictionary it states:
Or do you have to create the object first for the properties to apply accordingly? From the dictionary, it seems that the image object must be created first.
Sorry, not quite sure what you are after?


Best

Klaus

Re: Question about templateImage

Posted: Wed Dec 17, 2014 8:44 pm
by keithglong
Hi Klaus,

I am currently experimenting. Anyway, what I meant is that it seems that after you set the properties of the templateImage, you must then create the image object programmatically directly afterwards, and then add your image to the image object for the properties to apply to the said image. Correct?

Thanks,

- Boo
Gulf Breeze, FL

Re: Question about templateImage

Posted: Wed Dec 17, 2014 9:07 pm
by jacque
The templateImage (and all other templates) only apply when creating a new object. Existing objects do not acquire properties suddenly (we'd be upset if that happened.)

The templateImage can include imagedata or a filename, which would mean the image content is already there when the new object is made. If you don't supply those, then the new image object will be empty but any other properties you've set on the template will be there.

The template objects are most useful when you need to script the creation of many similar objects. If you are only creating a single image, it isn't any harder to set the properties on the one you just made without messing around with templates.

Re: Question about templateImage

Posted: Wed Dec 17, 2014 9:15 pm
by keithglong
Thanks Jacqueline (and Klaus). Per my previous post, I am experimenting with images in an effort to optimize my efforts.

As always, I appreciate the input.

Cheers,

- Boo
Gulf Breeze, FL