ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Transparent Background: TIF vs. PNG

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Fellafoo Posted - May 03 2022 : 06:33:35
Is there something unique I need to handle when reading a TIF file?

For example...

      IsTransparent := False;
      ieBmp := TIEBitmap.Create;
      ieBmp.Read(ImgFName);
      IsTransparent := ieBmp.HasAlphaChannel;

When I read the attached TIF file, IsTransparent is True;

However, when I pass it to...

ieBmp.RenderToCanvasWithAlpha(ieCnv.GDICanvas, pxTL.X, pxTL.Y, pxWd, pxHt, 0, 0, ieBmp.Width, ieBmp.Height, 255, rfFastLinear, ielNormal, 1);

The background is not transparent. PNG files have been working as expected.

Thank You,

MFM

attach/FELLAFOO/20225363236_8ARMMAR0.TIF
2   L A T E S T    R E P L I E S    (Newest First)
Fellafoo Posted - May 04 2022 : 08:03:59
OK thanks, I'm guessing these images were intended to have black set as the transparent color.
xequte Posted - May 03 2022 : 21:35:45
Hi

This image contains an alpha channel, even though it is not used. You should validate the alpha channel:

  IsTransparent := ieBmp.HasAlphaChannel( True );


Nigel
Xequte Software
www.imageen.com