PNG standard paintcompression for the import snapshot command?

Wouter wouter.abraham at pi.be
Fri Jan 23 20:42:06 EST 2004


Hi Dar,

> Re: PNG standard paintcompression for the import snapshot command?
> 	• 	From: Dar Scott
> 	• 	Subject: Re: PNG standard paintcompression for the import snapshot 
> command?
> 	• 	Date: Fri, 23 Jan 2004 10:04:50 -0800
>
> On Friday, January 23, 2004, at 09:42 AM, Wouter wrote:
>
>
> Can someone confirm (or deny) if the standard paintcompression
> for the import snapshot command in Revolution is PNG?
> In Metacard it is rle.
>
>
> The first few bytes of PNG contains the letters PNG.
>
> One test is to import and then look at the text of the image. 
> Unfortunately, often the text returns empty. Export is more reliable, 
> but it forces a type and may force a conversion.
>
> None of the types in export is rle.
>
> Maybe this would work... Import. Save the stack. Look for the PNG 
> signature (about 5 or so bytes) in the file. The rle should be easy to 
> calculate and you only need part, but some special variation of rle 
> might be used. You might see that pattern in the file.
>
> Since the doc says the compression is rle and this is confirming that, 
> I don't think this is reverse engineering, but will bow to whatever 
> RunRev says.

  I checked the image produced by the import snapshot command on my rig 
and it was rle in Metacard and PNG in Revolution.
To make sure this is the default paintcompression used by Revolution 
(and not something only on my machine) I asked this question.

>
> Why do you care? Speed? Size?
>

Because of the problem proposed by Chipp's alphatest (and one I had 
when trying out a metacard stack in revolution).
It made me run some tests on a png image with a transparency mask 
produced by script and Chipp's GoodAlpha image.
Chipp's GoodAlpha image is made with adobe imageready
And there was a huge difference in result when using this code on both 
of them:

on mouseup
export img <thename> to a as png
set the text of img <thename> to a
end mouseup

My image came out as it went in, but the Chipp's GoodAlpha image (made 
with adobe imageready) came out "flattened", no transparency anymore 
and the alphamask and background visible in black and white. This could 
mean that the engine is not recognizing all formats of png or not 
handling every chunk in a png image as it should. But I still have to 
run more tests to be sure.

> Dar Scott

Greetings and tnx,
WA





More information about the use-livecode mailing list