0

I have a few files that contain 1bpp black and white images, encoded simply as a stream of bits. Is there any easy way to open these files in Photoshop? In the past I've dealt with RAW 8bpp grayscale bitmaps by opening them as Photoshop RAW, but the dialog for Photoshop RAW only allows choosing a bit depth of 8,16 or 32 bits.

The only solution I've come up with is to write some program to go through the files bit-by-bit and output each bit as either a 0x00 or 0xFF byte to create a file compatible with the formats Photoshop RAW supports, but this seems like such a basic task for an image editor, I find it hard to believe there's no easier way to do this.

I'd also be happy with a script or a (relatively) simple to use tool to do the same thing.

  • 1
    I'm voting to close this question as off-topic because it seems to be more appropriate for SUSE, (Super User), rather than GDSE. – Hanna Nov 17 '15 at 16:19
0

FFmpeg supports reading 1-bit pixel formats, two of them - monob and monow

So, a basic command like this is a starting point

ffmpeg -pix_fmt monow -i input.raw -pix_fmt gray output.bmp

Since this is a RAW file, I don't know how the pixels are packed or new rows signalled, so that may be a stumbling block.

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.