Invisible Colors on TImage

Please discuss general Delphi programming topics here.

Invisible Colors on TImage

Postby Codius » June 6th, 2006, 1:02 pm

I've been searching for a while following tutorials all over the internet, but whatever I do it wont work as I want it to.
It'll either hide everything or nothing.

What I want to do is to have 2 "layers" of Images, the first layer will be "solid", with no transparency. The other however will contain details and such, this layer need an "invisible color" like pink or so that is not to be displayed..

First I tried to use gif, but Delphi7 doesn't accept gif - something with copyright? So now I'm using .jpg files - but can't get an invisible color!
Is this even possible? if it is, how can I do this?

Thanks in advance!
Yours, Codius!
I've never let my schooling interfere with my education.
Codius
Active Member
Active Member
 
Posts: 17
Joined: June 6th, 2006, 12:55 pm
Location: Sweden

Postby Johnny_Bit » June 6th, 2006, 3:27 pm

try component that enables gif transparency for delphi, like eg. TGIFFile etc... Tons can be found on sites like torry or such, just search.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » June 6th, 2006, 4:03 pm

JPEG doesn't support transparency.

You can use Bitmap or PNG as replacement for GIF.

Delphi doesn't support PNG natively. Use GraphicEX Library for PNG (and many other image formats) support.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Codius » June 6th, 2006, 4:09 pm

I got the GraphicEx to work, and it's nice!
But am I doing something wrong or it doesn't support more then 256 colors? I couldn't find any information about it in the manual that came with it.

--------------------
Old posts, nevermind them:
--------------------
But is there no way to tell delphi that every pixel thats colored with "FF0000" for example - will be invisible?

I guess PNG would work aswell, possibly better then JPG..
But I'm having a problem when I try to use the GraphicEx stuff (never included something like that before) - It's complaining about GraphicEx.dcu not existing?
I've never let my schooling interfere with my education.
Codius
Active Member
Active Member
 
Posts: 17
Joined: June 6th, 2006, 12:55 pm
Location: Sweden

Postby HPW » June 6th, 2006, 6:12 pm

Hans-Peter
HPW
Moderator
Moderator
 
Posts: 238
Joined: February 25th, 2006, 10:19 am
Location: Germany

Postby Codius » June 6th, 2006, 8:34 pm

HPW wrote:I use for PNG: http://pngdelphi.sourceforge.net/


Thanks alot! This worked great!
I've never let my schooling interfere with my education.
Codius
Active Member
Active Member
 
Posts: 17
Joined: June 6th, 2006, 12:55 pm
Location: Sweden

Postby Kambiz » June 6th, 2006, 11:39 pm

HPW,

I didn't know about this library, thank you.

Cheers
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron