4lex4 / scantailor-advanced

ScanTailor Advanced is the version that merges the features of the ScanTailor Featured and ScanTailor Enhanced versions, brings new ones and fixes.
GNU General Public License v3.0
1.15k stars 128 forks source link

Convert image in picture zone to grayscale #125

Open FriedrichFroebel opened 4 years ago

FriedrichFroebel commented 4 years ago

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:

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.)

zvezdochiot commented 4 years ago

Hi, @FriedrichFroebel .

:link: See also #120 .

:information_source: I convert to grayscale using netpbm.

gorgobacka commented 4 years ago

information_source I convert to grayscale using netpbm.

May I ask how?

zvezdochiot commented 4 years ago

@gorgobacka say:

how?

:information_source: so:

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

Thanks. I will try it.

PS: Sorry, for hijacking this issue.

d4fe commented 4 years ago

@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?

FriedrichFroebel commented 4 years ago

@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.

d4fe commented 4 years ago

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.

hfiguiere commented 3 years ago

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