Jump to content

Saving BML transparency/alpha values?


Recommended Posts

BMP's unfortunately don't really offically support transparency -- even Photoshop doesn't work with BMP transparency.

If you want to work with transparency I would suggest PNG images, although that may not be compatible with what you are trying to use the BMP's with.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Version 2.2 supports GIF transparency.

You can download the Alpha 1 from our download page: http://www.eecs.wsu.edu/paint.net/download.htm

... I've wanted to say that for so long :) (we didn't support GIF transparency for a looooong time and people have always asked for it)

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 10 months later...

Dear Rick Brewster,

I just want to clarify a thing. NET Framework 2.0 officially has support for 32-Bit Bitmap with Alphachannel although in MSDN documentation the alpha bit is stated as unused.

You can try this out by doing following:

Bitmap Bmp = new Bitmap(Width, Height, Format32bppArgb);

Then just draw a bit with colors with alpha < 255

Bmp.Save("test.bmp", Imaging.ImageFormat.Bmp)

You will see (just open the corresponding Bitmap file with a hex viewer) that alpha values are correctly saved. So it means, it is supported. Image.FromFile() does currently not support this alpha channel of Bitmaps afaik. But loading a 32 bit bitmap isn't that difficult by direct reading bit values into buffer. Just take a look at http://www.codeproject.com/cs/miscctrl/ ... etDemo.asp

So if you want I will provide you with the corresponding 32-Bitmap Loader code which could be added to Paint.Net.

Btw. Photoshop does officially support alphachannel in bitmaps ... even though there seems to be a bug in theire code.

Another way storing alpha information in bitmaps would be the possibility to use Bitfields (Compression = BI_BITFIELDS insteadt of BI_RGB). Since there is a BitmapHeader.RedMask ... AlphaMask, the Bitmap may be saved as 32 Bit Bitmap with BI_BITFIELDS by setting corresponding masks.

However this isn't mentioned officially in MSDN documentation, but nothing speaks against it

regards

bkausbk

Link to comment
Share on other sites

I think what you are ment is this "thread" is almost one year old.

If yes, that's true, but the problem is still available. Paint.NET isn't able to create and handle Alpha Bitmaps even if the Bitmap File Format supports Alpha channel ... there are at least 2 ways to implement this as I stated in my posting.

bkausbk

Link to comment
Share on other sites

  • 1 year later...

I would like to second the request from the previous posters. 32-bit Bitmap support with alpha channel would be extremely helpful for Visual C++ developers where dealing with such bitmaps is still very common.

Please reconsider this feature request.

Thank you

Best Regards,

Mat

SmartFTP

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...