Save a Picture object without alpha channel

Hi,

I have Picture object which does not have an alpha channel, however, when I export it to png with p.Save(f, 150) the resulting png file has the alpha channel…how to avoid this? how to export to png without the alpha channel?

Thanks.

[quote=253307:@Davide Pagano]Hi,

I have Picture object which does not have an alpha channel, however, when I export it to png with p.Save(f, 150) the resulting png file has the alpha channel…how to avoid this? how to export to png without the alpha channel?

Thanks.[/quote]

Save it as jpg instead if you can.

Why does it matter? What will you be doing with the PNG file where the alpha channel existance becomes an issue… Just asking to help understand what you are wanting to do.

Amazingly enough, I recently encountered an issue with MAS where screen shots cannot use Alpha Channel, so I had to save my pics in jpg.

Strange… all my screenshots are PNG… don’t know if there is an alpha channel or not, since I just use the simulator to make the screen shots (for iOS you need shots for all devices, not sure why since it only shows one iphone and one ipad version)

the reason is that I have a code which decodes a png file and, at present, it does not support alpha channel.

not 100% sure this will work… but try it… (off the top of my head, so you may have to research the exact syntax)

  • Load you PNG into a picture object
  • pic.mask=nil
  • save picture

Are you certain there is no alpha channel ? Have you created the picture with depth such as New Picture(100, 100, 32)

[quote=253344:@Dave S]not 100% sure this will work… but try it… (off the top of my head, so you may have to research the exact syntax)

  • Load you PNG into a picture object
  • pic.mask=nil
  • save picture[/quote]

thank you! that works beautifully.