Jump to content

Saving a bitmap with alpha channel


Josh
 Share

Recommended Posts

What options did you use to save? Just wondering because the alpha is there but it removed the color from the non-alpha parts when brought into the Editor as shown in the picture on the left.

post-14-0-93510300-1465948094_thumb.jpg

When I saved Josh's png using Gimp as a 32-bit A8 R8 G8 B8 bitmap, it looks like the one on the right when brought into the Editor.

icon256_32bit.bmp

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

The bitmap you posted above has a black background shown in Windows Explorer, and when the Windows API loads it.

 

I am doing OS graphics stuff, not Leadwerks textures.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

They are all transparent, even if the desktop icons don't represent them correctly. Open them in a free program like XnView which lets you change the background, set it to something obvious like orange and you'll see. macklebee's version seems to preserve the shadow at the bottom correctly too.

 

You can change the background color in XnView by going to Tools, Options, View (on the left), Background Color. You may have to restart the application to display the images correctly.

Link to comment
Share on other sites

My Bitmap does have transparency. I loaded it in a web browser changing the background color to whatever I wanted.

 

http://martyj.phpdev.gurutech.ws/images/icon256.html

 

Windows might not show the color right in explorer.exe. But the color is right.

 

Here is the options for exporting.

bmpexport.png

 

What are you trying to do in win32? Set an icon for a button?

Link to comment
Share on other sites

Just some extra info if anybody is interested.

 

PNG files support transparency, but they don't utilize it as an alpha channel, like you might find in 32-bit TGA or BMP files. If you load this PNG file into Photoshop, you will see transparency, but no alpha channel. Which may seem a bit confusing.

 

In Photoshop, you can convert transparency to an alpha channel, by Ctrl+clicking on the layer icon, then open the Channels window, and click on the "Save selection as channel" button, to create a new alpha channel. This can then be saved as a 32-bit TGA or BMP file.

  • Upvote 3

Ultimate Unwrap 3D: http://www.unwrap3d.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...