1

I'm creating a mosaic using grayscale PNGs which have no alpha channel. I load the images into layers and align and stack them, then merge the layers. Finally, I crop the edges (which have transparent areas created by the alignment process) to remove the transparent parts, leaving just an opaque image. When I look at the Channels, there is only the grayscale channel and there is no mask on the layer and the image mode is still set to grayscale.

The problem is that Photoshop is saving it with an alpha channel in the PNG when I choose Save As to write this out. The alpha channel that Photoshop saves is completely opaque, but the problem is that it can't be there at all since it screws up my toolchain on some subsequent processing.

The Save As dialog has an Alpha option, which is turned off, yet I get an alpha channel anyhow. Is there any way to get Photoshop to write out a grayscale PNG without adding a superfluous alpha channel to it?

  • tried 'save for web', with 'transparency' specifically switched off? [otherwise it will add the extra 8 bits, whether used or not] BTW, 'transparency' in png does not equal 'alpha channel' in the way you would think, it's the difference between 24 & 32-bit saves. – Tetsujin Jan 17 '15 at 20:28
  • I tried Save For Web but the PNG24 option is saving three channels and the PNG8 option is palletizing the 256 grayscale levels down to 247 levels. I am reading the images in software using libpng and they come in correctly with a single 8-bit data channel before Photoshop, but two 8-bit channels after (the second being the unwanted alpha). – John Stephen Jan 17 '15 at 21:15
  • 1
    Sorry, idk then. I've had a look through en.wikipedia.org/wiki/… but that doesn't explain what pshop might be doing to it. Maybe GraphicConverter might do a better job? – Tetsujin Jan 18 '15 at 7:11
  • Thanks for your help Tetsujin, it turned out that using Flatten Image before saving does the trick and prevents an alpha channel from being output. – John Stephen Jan 18 '15 at 21:34
5

Flattening the image (Layer > Flatten Image) fixed it. It became a locked "background" layer and now it saves without the alpha channel.

  • In short, in menu > Layer > Flatten Image – Raptor Jun 21 '19 at 6:52
  • Thank you Raptor, I was being kind of wordy in my answer so I've edited it to be more direct. – John Stephen Jul 6 '19 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.