encode text to image
dsc at swcp.com
Fri Sep 1 17:48:39 CDT 2006
On Sep 1, 2006, at 3:24 PM, Wilhelm Sanke wrote:
> Text-of-image data in Rev, when displayed in a field, show "PNG" as
> chars 2 to 4, irrespective of the prior format of the images, i.e.
> it doesn't matter if they are JPG or PNG images or are images
> created from scratch by setting the imagedata to some color
> pattern. In the MC IDE this header "PNG" never appears when text-of-
> image data are extracted from an image.--
This sure looks like a property is set by the IDE.
> So what could be the benefits of using text-of-image data instead
> of "imagedata"?
> One thing I noticed is that restoring an image from text data is
> somewhat faster than using imgedata. Otherwise I see no advantage.
Well, setting it is also simpler. To set the image with image data,
you need to clear 'the text', set the size, set the image data and
then set the alpha data. Or did I get the order wrong or leave out
> The imagedata of an image of the same width and height are always
> the same in terms of the number of chars. With text-of-image data
> the numbers of chars differ with each image, making it impossible
> to manipulate the text-of-image data in a consistent way like I am
> able to do with image data (filters, mirroring, creating new images
> etc. etc.) like I have implemented it in my forthcoming "Imagedata
> Toolkit". I had underestimated the time to complete a presentable
> version of that toolkit that comprises about 200 options to
> manipulate imagedata and I needed to explore a number of ideas I
> choose to integrate in that toolkit.
I agree. The imageData is easier to manipulate and to convert-to-
from alternate forms. I look forward to hearing about "Imagedata
More information about the use-livecode