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

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

Image Transparent Color

Post by thebelg » Fri Nov 02, 2012 7:27 am

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: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Image Transparent Color

Post by FourthWorld » Fri Nov 02, 2012 3:47 pm

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: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Image Transparent Color

Post by dunbarx » Fri Nov 02, 2012 11:45 pm

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 » Sat Nov 03, 2012 9:25 am

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

Greets

Post Reply