Search found 3 matches

by jlehrer
2012-08-29T22:49:54-07:00
Forum: Users
Topic: convert 50% of pixels to black, 50% to white
Replies: 5
Views: 6882

Re: convert 50% of pixels to black, 50% to white

> convert input.jpg -colorspace OHTA -channel R -separate +channel -linear-stretch 50%x50% output.gif

Wow, thanks for the quick responses.

Unfortunately, this does not give me an image with half black and half white. The images are mostly white. This does generate a neat edge-detection effect but ...
by jlehrer
2012-08-29T21:23:35-07:00
Forum: Users
Topic: convert 50% of pixels to black, 50% to white
Replies: 5
Views: 6882

Re: convert 50% of pixels to black, 50% to white

> convert input.jpg -colorspace gray -linear-stretch 50x50% output.gif

Thank you, that worked.

Can you explain why it didn't work for me without the "-set colorspace RGB" and "-colorspace gray" before the "-linear-stretch 50x50%"?

Without those two modifiers I get a white image. You gave me the ...
by jlehrer
2012-08-29T19:20:02-07:00
Forum: Users
Topic: convert 50% of pixels to black, 50% to white
Replies: 5
Views: 6882

convert 50% of pixels to black, 50% to white

I've spent about 3 hours trying to figure this out and finally am reaching out for help.

I have a JPG color image. I would like to convert to a black and white image (all pixels are black or white) with no dithering where 50% of the pixels are black and 50% of the pixels are white.

I have tried ...