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
 Photoshop PNG to BMP convert problem

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
microtech Posted - Apr 01 2015 : 02:33:31
Hello,

we use the latest version of ImageEn (Build 6.0.0.25.9884).

Our customer wants to convert a transparent PNG file to BMP.
He creates the PNG file with Photoshop.

But after the conversion the output BMP has fragmented segments
of different colors on the former-transparent parts of the image.

We use this code:

var
  bmp: TIEBitmap;
begin
  bmp := TIEBitmap.Create;
  try
    bmp.Read('C:\input.png');
    bmp.Write('C:\output.bmp');
  finally
    bmp.Free;
  end;
end;


Does anyone has an idea how to fix this issue?


4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 14 2015 : 01:48:35
Hi

FYI, in the next update it will auto-merge for non-alpha formats.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
microtech Posted - Apr 01 2015 : 07:11:21
Thanks, the function RemoveAlphaChannel(True) fixed the problem.
rmklever Posted - Apr 01 2015 : 04:43:11
Hi,

Before saving it as a bmp file you need to render the image to a white or black background image without alpha channel. That should fix the problem. Bmp does not support transparencies.

Hope this helps.


Roy M Klever
Klever on Delphi - www.rmklever.com
xequte Posted - Apr 01 2015 : 02:51:06
Hi

Can you also attach your source PNG file.

Also, try calliing RemoveAlphaChannel prior to saving:

http://www.imageen.com/help/TIEBitmap.RemoveAlphaChannel.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com