Idea to reduce color number of a scanned image (to grey)
Posted: 2015-11-17T09:22:44-07:00
Hi,
I have a lot of scanned picture from comics. The original comic is in black and white anc can be old.
I don't scan myself.
I have some way to reduce image size with -level-colors and -colors and -colorspace . Moving a jpg picture to a png with 8 or 4 grey.
Sometimes : with some hand to find the best value for -level-colors it work good. But sometimes the original file have a lot of glitch. I like to find a way to reduce this glitch.
For example :
Part of original file
mogrify -fuzz 10% -level-colors "#404040","#b0b0b0"
mogrify -adaptive-blur 5 -fuzz 10% -level-colors "#404040","#b0b0b0"
With adaptive-blur it's better, and after i reduce the image size.
But sometimes it's less good, here on the same page:
mogrify -fuzz 10% -level-colors "#404040","#b0b0b0"
mogrify -adaptive-blur 5 -fuzz 10% -level-colors "#404040","#b0b0b0"
I do some test with +dither and -contrast-stretch 0 with directly reduce the file colors and size.
Original:
https://framapic.org/6IgMESPafdWn/hLi9a6GK
convert attualita_supernera-004A-004.jpg +dither -colors 4 -colorspace gray -contrast-stretch 0 -resize 1100 attualita_supernera-004A-004_stre.png
https://framapic.org/6fTEYaw3iomd/M3kqnbWL
convert attualita_supernera-004A-004.jpg -adaptive-blur 5 -fuzz 10% -level-colors "#404040","#b0b0b0" -colors 4 -colorspace gray -resize 1100 attualita_supernera-004A-004_reduceblur.png
https://framapic.org/dVVS8pPymfnr/tKjozY6g
convert attualita_supernera-004A-004.jpg +dither -fuzz 10% -level-colors "#404040","#b0b0b0" -colors 4 -colorspace gray -resize 1100 attualita_supernera-004A-004_reducedither.png
https://framapic.org/Kk6mhoeU7Kik/T6VQZKPs
I think add a blur is the best solution (want to script the process on whole directory), but maybe there are other solution ?
Regards
I have a lot of scanned picture from comics. The original comic is in black and white anc can be old.
I don't scan myself.
I have some way to reduce image size with -level-colors and -colors and -colorspace . Moving a jpg picture to a png with 8 or 4 grey.
Sometimes : with some hand to find the best value for -level-colors it work good. But sometimes the original file have a lot of glitch. I like to find a way to reduce this glitch.
For example :
Part of original file
mogrify -fuzz 10% -level-colors "#404040","#b0b0b0"
mogrify -adaptive-blur 5 -fuzz 10% -level-colors "#404040","#b0b0b0"
With adaptive-blur it's better, and after i reduce the image size.
But sometimes it's less good, here on the same page:
mogrify -fuzz 10% -level-colors "#404040","#b0b0b0"
mogrify -adaptive-blur 5 -fuzz 10% -level-colors "#404040","#b0b0b0"
I do some test with +dither and -contrast-stretch 0 with directly reduce the file colors and size.
Original:
https://framapic.org/6IgMESPafdWn/hLi9a6GK
convert attualita_supernera-004A-004.jpg +dither -colors 4 -colorspace gray -contrast-stretch 0 -resize 1100 attualita_supernera-004A-004_stre.png
https://framapic.org/6fTEYaw3iomd/M3kqnbWL
convert attualita_supernera-004A-004.jpg -adaptive-blur 5 -fuzz 10% -level-colors "#404040","#b0b0b0" -colors 4 -colorspace gray -resize 1100 attualita_supernera-004A-004_reduceblur.png
https://framapic.org/dVVS8pPymfnr/tKjozY6g
convert attualita_supernera-004A-004.jpg +dither -fuzz 10% -level-colors "#404040","#b0b0b0" -colors 4 -colorspace gray -resize 1100 attualita_supernera-004A-004_reducedither.png
https://framapic.org/Kk6mhoeU7Kik/T6VQZKPs
I think add a blur is the best solution (want to script the process on whole directory), but maybe there are other solution ?
Regards