encode text to image

Jeanne A. E. DeVoto revolution at jaedworks.com
Sat Sep 2 16:42:09 EDT 2006


At 11:24 PM +0200 9/1/2006, Wilhelm Sanke wrote:
>The "text of image" property apparently does not work in the MC IDE, 
>regardless of which engine is used, old or new ones - from 2.4 to 
>2.7.3.

I strongly suspect a problem with the paintCompression property, in 
this case. I believe the Rev IDE sets it to "PNG", while the MC IDE 
(or the bare engine) sets it to "RLE". You might experiment with 
setting the paintCompression to "PNG" before transferring the image 
using the text property - the later engines might be making 
assumptions they shouldn't about the property value.

>So what could be the benefits of using text-of-image data instead of 
>"imagedata"?

They're different formats with different uses. The imageData is an 
expanded pixmap form (one pixel per four bytes - a byte of zeroes 
plus the R, G, and B channels) of the data currently presented on 
screen, while the text of the image (the content of the image 
container) is the base data of the image itself, in whatever format 
the image was created or imported in (PNG, GIF, etc.). The text 
property doesn't change if you change the image size, while the 
imageData does - it's recomputed from the content of the image every 
time you change the object size. The imageData form is more amenable 
to transformations such as changing the brightness or dropping out a 
channel. And so on.

There are various differences and which one is more useful depends on 
the circumstances.
-- 
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com



More information about the use-livecode mailing list