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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 In Imageen there is no option to save 32 bits png
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

nwscomps

190 Posts

Posted - Apr 28 2020 :  12:09:05  Show Profile  Reply
I was trying to create a 32 bits image by removing parts of the alpha channel of the background. But to my surprise when i went to save to png only 24 bits, 256 colors and black-white is supported, in the save dialog.
Please add support for 32 bits with alpha channel.

Francesco Savastano
Add-ons for the ImageEn Library
web: http://www.fssoft.it/delphicomps.html

xequte

39141 Posts

Posted - Apr 29 2020 :  01:42:18  Show Profile  Reply
Hi Francesco

If you have a ie24RGB bitmap in ImageEn with the Alpha channel assigned and save it to a PNG file you will get a 32bit PNG with alpha.

Can you show me the code you are using?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

nwscomps

190 Posts

Posted - Apr 30 2020 :  04:05:25  Show Profile  Reply
I found out the reason why the modified alpha channel wasn't taken into account when saving.
The reason is the way I modified it through scanline does not affect tthe property Full of the alpha channel that remains true.
When the alpha channel Full property is true the images get saved as without alpha channnel. So i found a trick I modify one pixel of the alpha channel using Pixels_ie8 and then set it back, and that sets the full property to false.

Francesco Savastano
Add-ons for the ImageEn Library
web: http://www.fssoft.it/delphicomps.html
Go to Top of Page

xequte

39141 Posts

Posted - Apr 30 2020 :  21:10:29  Show Profile  Reply
Hi Francesco

Please call iebmp.AlphaChannel.SyncFull() after editing the alpha channel via scanline.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

nwscomps

190 Posts

Posted - May 01 2020 :  06:02:59  Show Profile  Reply
SyncFull is much slower because it goes through all the pixels. The trick I use is much faster, just setting 1 pixel two times.
I would like that the Full property was read-write, so that we don't have to call syncfull or make tricks.

Francesco Savastano
Add-ons for the ImageEn Library
web: http://www.fssoft.it/delphicomps.html
Go to Top of Page

xequte

39141 Posts

Posted - May 01 2020 :  22:58:49  Show Profile  Reply
Full property is read/write.

Also, SyncFull exits as soon as it finds one changed pixel.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: