How to prevent Photoshop from adding an alpha channel to grayscale PNGs

adobe-photoshopimages

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?

Best Answer

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