Page 1 of 1

any way to set depth of a .png file?

Posted: Wed Nov 12, 2014 9:21 pm
by adventuresofgreg
Hi: I am exporting many .png files, and I'm converting them to a way smaller file size using a conversion utility than changes the color depth. Is there any way to do that within LiveCode as I export? I know I can set a .jpg compression, but these files have to be .png with alpha. According to the dictionary,

"If the image has an alpha channel, the export snapshot ... as PNG form creates a 32-bit PNG file."

so maybe not...

export snapshot from graphic "ThisGraphic" to file saveplace as PNG

Re: any way to set depth of a .png file?

Posted: Wed Nov 12, 2014 9:47 pm
by Klaus
Hi Greg,

never used this feature, but look under "export with palette" in the dictionary.
Looks like you need to "store" the snapshot temporarily in an image in the stack before "export ... with palette...".


Best

Klaus

Re: any way to set depth of a .png file?

Posted: Wed Nov 12, 2014 10:01 pm
by adventuresofgreg
BINGO! excellent. That worked - I shaved a 30 KB file down to a 4 KB file. Thanks Klaus.

Re: any way to set depth of a .png file?

Posted: Wed Nov 12, 2014 11:25 pm
by Klaus
Cool! :D



Your message contains 8 characters. The minimum number of characters you need to enter is 10.