Best threshold for converting grayscale to black and white
Date : March 29 2020, 07:55 AM
Hope that helps 0.5 usually ends up loosing a lot of information unless the original image is extremely bright. In fact, any absolute threshold will mess up one kind of images or another. A better method would be to make a histogram of luminosities and choose a threshold near the mode. This should work better on most images than any absolute threshold.
|
Getting a Black and White UIImage (Not Grayscale)
Tag : ios , By : Tony Siu
Date : March 29 2020, 07:55 AM
seems to work fine If what you're looking for is to threshold the image -- everything brighter than a certain value turns white, everything darker turns black, and you pick the value -- then a library like GPU Image will work for you.
|
Check if PDF is colored or grayscale or black&white
Tag : pdf , By : user178709
Date : March 29 2020, 07:55 AM
Any of those help You can use Ghostscript's inkcov device to get color information about each PDF page. Here is an example command for a sample PDF (cmyk.pdf) of mine with its output: gs -o - -sDEVICE=inkcov cmyk.pdf
GPL Ghostscript 9.10 (2013-08-30)
Processing pages 1 through 5.
Page 1
0.00000 0.00000 0.00000 0.02231 CMYK OK
Page 2
0.02360 0.02360 0.02360 0.02360 CMYK OK
Page 3
0.02525 0.02525 0.02525 0.00000 CMYK OK
Page 4
0.00000 0.00000 0.00000 0.01983 CMYK OK
Page 5
0.13274 0.13274 0.13274 0.03355 CMYK OK
gs -q -o - -sDEVICE=inkcov cmyk.pdf
0.00000 0.00000 0.00000 0.02231 CMYK OK
0.02360 0.02360 0.02360 0.02360 CMYK OK
0.02525 0.02525 0.02525 0.00000 CMYK OK
0.00000 0.00000 0.00000 0.01983 CMYK OK
0.13274 0.13274 0.13274 0.03355 CMYK OK
gs \
-o cmyk.pdf \
-sDEVICE=pdfwrite \
-g5950x2105 \
-c "/F1 {100 100 moveto /Helvetica findfont 42 scalefont setfont} def" \
-c "F1 (100% 'pure' black) show showpage" \
-c "F1 .5 .5 .5 setrgbcolor (50% 'rich' rgbgray) show showpage" \
-c "F1 .5 .5 .5 0 setcmykcolor (50% 'rich' cmykgray) show showpage" \
-c "F1 .5 setgray (50% 'pure' gray) show showpage" \
-c " 1 0 0 0 setcmykcolor 100 130 64 64 rectfill" \
-c " 0 1 0 0 setcmykcolor 200 130 64 64 rectfill" \
-c " 0 0 1 0 setcmykcolor 300 130 64 64 rectfill" \
-c " 0 0 0 1 setcmykcolor 400 130 64 64 rectfill" \
-c " 0 1 1 0 setcmykcolor 100 30 64 64 rectfill" \
-c " 1 0 1 0 setcmykcolor 200 30 64 64 rectfill" \
-c " 1 1 0 0 setcmykcolor 300 30 64 64 rectfill" \
-c " 1 1 1 0 setcmykcolor 400 30 64 64 rectfill showpage"
|
GhostScript PDF to PCL Black and White with No Grayscale
Date : March 29 2020, 07:55 AM
seems to work fine Well that's a black and white output, its been halftoned to produce 1-bit output from 8-bit input. No matter what you do, if your device only supports 1-bit output then you're always going to have to apply some kind of screening to represent grayscale or colour. You don't give any clues as to why ljetplus is the only device you can use. Without knowing why its going to be hard to offer any concrete advice.
|
iOS grayscale/black & white
Tag : iphone , By : Tim Coffman
Date : March 29 2020, 07:55 AM
|