Image Transparent Color

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
thebelg
Posts: 24
Joined: Thu Nov 01, 2012 8:51 pm

Image Transparent Color

Post by thebelg »

How can I set the "transparent"-color of an Image-object (JPG or png) so that I get some Parts of my Image Transparent to the underlining one.
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Image Transparent Color

Post by FourthWorld »

JPG doesn't support transparency.

IIRC PNG supports it through the alpha channel, rather than through the setting of a color as with GIF.

PNG alpha data can be obtained through the image's alphaData property, and you can manipulate those pixels however you want.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10509
Joined: Wed May 06, 2009 2:28 pm

Re: Image Transparent Color

Post by dunbarx »

Hi. You can set the blendLevel of an image.

Import a JPEG as "a control" from the "File" menu. There are a million forms of "ink", though the default is "srcCopy". Put your image above another object. The transparency can be adjusted as required.

Craig Newman
thebelg
Posts: 24
Joined: Thu Nov 01, 2012 8:51 pm

Re: Image Transparent Color

Post by thebelg »

Thanks a lot for the informations.
I've transfered the Images into PNG (with GIMP) and adding a Alpha-Level.

Greets
Post Reply