Questions tagged [monochrome]

64 questions
26
votes
4 answers

Android: Converting a Bitmap to a Monochrome Bitmap (1 Bit per Pixel)

I want to print a Bitmap to a mobile Bluetooth Printer (Bixolon SPP-R200) - the SDK doesn't offer direkt methods to print an in-memory image. So I thought about converting a Bitmap like this: Bitmap bitmap = Bitmap.createBitmap(width, height,…
AgentKnopf
  • 4,295
  • 7
  • 45
  • 81
21
votes
6 answers

RGB to monochrome conversion

How do I convert the RGB values of a pixel to a single monochrome value?
Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
12
votes
1 answer

Image conversion to Grayscale using ImageMagick is very dark

I converted a bunch of "normal" JPG photos via convert infile -colorspace Gray outfile to monochrome. However the result is for all images very dark. Here a sample conversion: original photo and converted monochrome image. Is there a better way to…
halloleo
  • 9,216
  • 13
  • 64
  • 122
5
votes
3 answers

How do I convert a Color Image to Black and White using ImageMagick?

Background: I performed an Indexed conversion in Gimp of a color image and the result was a nice B&W version of the source Image. I have tried numerous options in ImageMagick to no avail. I can get close but never quite as clear and crisp as what…
Rex Bloom
  • 364
  • 4
  • 14
5
votes
3 answers

Create monochrome BMP from bitset

I could need some help to figure out how to feed the proc below. I need to write a monochrome BMP file. The code below (its from: How to Save monochrome Image as bmp in windows C++ ?) looks like to be able to do this. I'm now stuck on how to convert…
zaskar
  • 73
  • 1
  • 6
5
votes
1 answer

How to convert a BufferedImage to black and white?

How can I convert an existing colored BufferedImage to monochrome? I want the image to be completely split between only two rgb codes, black and white. So if there's a border around the image which is a lighter or darker shade of the background, and…
user2790209
  • 339
  • 2
  • 5
  • 17
5
votes
1 answer

Gnuplot Stacked Histogram in Black and White

I'm trying to print stacked histogram from gnuplot into black and white png. By this I mean I would like each region in the bar to be hatched or checked alongside the legend on the side; that way when it's printed people can still identify the…
homemade-jam
  • 245
  • 4
  • 12
4
votes
2 answers

How to convert a DICOM from Monochrome 1 to Monochrome 2?

I am working on a project with DICOM images where I need to compare two DICOM images. The problem is, one is in monochrome 1 and the other is in monochrome 2 (zero means white and black, respectively). How can I convert these pixel intensities to…
Sean M
  • 91
  • 2
  • 5
4
votes
2 answers

Java BufferedImage get single pixel brightness

I want to convert coloured image to a monochrome, i thought to loop all pixel, but I don't know how to test if they are bright or dark. for(int y=0;y
Tobia
  • 9,165
  • 28
  • 114
  • 219
3
votes
0 answers

Python Pillow not producing true 1Bit Monochrome Image

In python, I'm using the following code to create a 1bpp image: import Image img = Image.open(filename) img = img.convert('1') pix = img.load() I found this code on Stack here: Can't format BMP image data to 1 bit per pixel in PIL This code…
Gernatch
  • 175
  • 3
  • 19
3
votes
1 answer

R raster package plot() producing monochrome images

I would like to get monochrome images using plot function. But it keeps on producing color images. I even had monochrome images that i plotted using plot function and i got them in some weird green and orange color. How can i make plot function…
user2543622
  • 5,760
  • 25
  • 91
  • 159
3
votes
0 answers

Saving Bitmap as 1bpp PNG on Android

I'm searching for a method to save a small monochrome Bitmap to a 1bpp PNG file. By default, the bitmap.compress(CompressFormat.PNG, 100, os) produces a 32bpp PNG file having only 2 colors, and about twice the size of the same PNG using 1bpp. I saw…
3
votes
2 answers

Getting pixels' colors of a monochrome image using C#

As the subject says, I have a .bmp image and I need to write a code which will be able to get the color of any pixel of the image. It is a 1bpp (indexed) image, so the colour will be either black or white. Here is the code I currently have: …
Cracker
  • 912
  • 2
  • 14
  • 26
2
votes
1 answer

Library for reading/writing bitonal (1bpp) images in Linux?

I'm trying to write a C program to run under Linux that includes reading and writing image files. All the image files I'll be dealing with are TIFF format bitonal images, at 1 bit per pixel. I've been quite surprised at the poor support for these…
Chris
  • 21
  • 1
2
votes
3 answers

What is the best lossless way to scale up a barcode image in c#

I've come across this problem many times over the years and still live in hope that there is an easy way to do this that I have missed. I work with barcodes a lot. They are usually made of black dots or lines on a white background. Barcode readers…
DougPi
  • 33
  • 6
1
2 3 4 5