2

I am trying to make a binary image. I want more than just the look of the image to be black/white, but I want the actual file to be a binary file. Every pixel should be either black, or white.

I don't just want a monochrome image. I can't have varying shades of gray, every pixel needs to be black or white.

Is this possible? I looked under Image > Mode but nothing there seems to indiciate a binary style image.

3
  • do you mean creating pixel art from a photo?
    – Ilan
    Jul 13, 2014 at 9:30
  • The purpose is far less artistic than I think anybody here cares to hear about. I would be using the image in MATLAB to conduct image analysis and manipulations. The particular things I want to do require a binary image (one that does not have color data)
    – leigero
    Jul 13, 2014 at 9:47
  • photography.tutsplus.com/tutorials/… try this... the real solution depends on what the analyse you want to run - you should find format specifications. I think you should export an image as BMP format
    – Ilan
    Jul 13, 2014 at 9:50

3 Answers 3

5

You can try this:

1 - change the image mode to Grayscale (top menu Image > Mode > Grayscale)

2 - open Image > Adjustments > Threshold. That will allow you to adjust which parts of the grayscale will be converted to black or to white, making your image truly binary.

From the Adobe help:

The Threshold filter converts grayscale or color images into high-contrast, black-and-white images. You can specify a certain level as a threshold. All pixels lighter than the threshold are converted to white; and all pixels darker are converted to black. The Threshold command is useful for determining the lightest and darkest areas of an image.

Threshold adjustment

0
2

After using Image > Mode > Grayscale to convert to a grayscale image, you’ll be able to now select Image > Mode > Bitmap, which does exactly what you’re after.

Many of Photoshop’s functions aren’t available in bitmap mode, but hopefully that’s not an issue. If it is, you can run them when still in grayscale, then convert to bitmap.

0
2

Check out Image Trace in Adobe Illustrator.

I like using python and PIL, however.

from PIL import Image
image_file = Image.open("myimage.bmp") 
image_file = image_file.convert('1') # convert
image_file.save('result.bmp')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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