Exporting PNG images

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Exporting PNG images

Post by richmond62 » Thu Sep 22, 2016 6:30 pm

This is a response to a current posting on the Use-List:

"I want to compose an image using a bunch of LC objects, then export a PNG, with an alpha channel containing a mask (ideally > 1 bit, but that part's not critical).
The documentation for export snapshot is not very clear. I've tried things like exporting a transparent group containing some objects; the PNG was just filled with black where there were no objects.
There is an option "with mask xx", but it appears that this is only for PBM format - and in any case I can't make it work.
Is there any way to do this?" [my bolding]
Pingu.livecode.zip
Stack to export PNG with transparent areas
(16.99 KiB) Downloaded 187 times
decor2.png
decor2.png (1.77 KiB) Viewed 2721 times
http://lessons.livecode.com/m/4071/l/68 ... ndow-shape

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Exporting PNG images

Post by richmond62 » Thu Sep 22, 2016 6:43 pm

pongu.png
pongu.png (21.3 KiB) Viewed 2721 times
Pongu.livecode.zip
Stack with windowShape set to image
(2.3 KiB) Downloaded 216 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Exporting PNG images

Post by richmond62 » Thu Sep 22, 2016 6:50 pm

The image "decor2.png" is exported from a group consisting of an image and a graphic object.
Groupies-630x420.jpg
Group everything!

Post Reply