scantailor-advanced icon indicating copy to clipboard operation
scantailor-advanced copied to clipboard

Convert image in picture zone to grayscale

Open FriedrichFroebel opened this issue 5 years ago • 8 comments
trafficstars

In old books, the pages may be not white, but some sort of yellow or brown. If they contain grayscale images, the current export options are not really enough:

  • I could export the page in black-and-white mode. This will lead to missing image details.
  • I could export the page in mixed mode with the image being in color mode. This will lead to a yellowish image.

To fix this problem, I would like to have an option to convert the picture zones from the mixed content to grayscale. (Scanning or converting the original pages into grayscale mode is not really an option as this would require manual work beforehand if the book contains some colored images as well.)

FriedrichFroebel avatar May 12 '20 16:05 FriedrichFroebel

Hi, @FriedrichFroebel .

:link: See also #120 .

:information_source: I convert to grayscale using netpbm.

zvezdochiot avatar May 12 '20 17:05 zvezdochiot

information_source I convert to grayscale using netpbm.

May I ask how?

gorgobacka avatar May 12 '20 18:05 gorgobacka

@gorgobacka say:

how?

:information_source: so:

mkdir g; for ttif in *.tif; do echo "$ttif"; anytopnm "$ttif" | ppmtopgm | pnmtotiff > "g/$ttif"; done

zvezdochiot avatar May 12 '20 18:05 zvezdochiot

Thanks. I will try it.

PS: Sorry, for hijacking this issue.

gorgobacka avatar May 12 '20 22:05 gorgobacka

@FriedrichFroebel, that is, you do not want to put aside the yellowness caused by old age, but to make the picture turn gray just like in a new book?

d4fe avatar May 22 '20 15:05 d4fe

@d4fe As the original images have been grayscale (but the pages have been scanned in color mode), I want them to be grayscale afterwards, so basically yes.

FriedrichFroebel avatar May 22 '20 17:05 FriedrichFroebel

It is possible that when converting pictures with yellowness to gray, a loss of contrast will occur. I would probably leave a color image in such cases, especially since the scan files are initially color.

d4fe avatar May 22 '20 18:05 d4fe

The option to convert to grayscale should also be in "Color / Grayscale" output.

hfiguiere avatar Jan 10 '21 04:01 hfiguiere