Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Saving an image as black and white
Date: Mon, 01 Mar 2021 14:23:04
Message-Id: CAGfcS_kPf6kUNQOmXtabi3GC4WCurMj4xqa=fSX92zMPpj4O7A@mail.gmail.com
In Reply to: Re: [gentoo-user] [OT] Saving an image as black and white by Neil Bothwick
1 On Mon, Mar 1, 2021 at 8:48 AM Neil Bothwick <neil@××××××××××.uk> wrote:
2 >
3 > should do it, you may need to play with the threshold setting. The file
4 > command reports the output file as being "1-bit grayscale".
5 >
6 > You can also use -monochrome but that will produce a dithered image,
7 > that's probably not what you want judging by your description.
8
9 Keep in mind that your starting image might not be 1-bit. You might
10 be scanning in greyscale, which is probably 8-bit.
11
12 Nothing wrong with converting to 1-bit, but in that case you would be
13 throwing away detail. If you plan to do any processing of the file
14 you might want to do that before throwing out the detail. You also
15 may or may not want the threshold to be 50%.
16
17 Also, as some are starting to hit on, jpeg may or may not be an ideal
18 format depending on what you're scanning. It was designed for
19 photographs, and it doesn't really cope well with sharp edges unless
20 you use very high quality levels. I don't want to offer too much
21 advice beyond that as I don't really deal with document scanning at
22 any kind of scale where I get concerned with this stuff - defaults are
23 almost always fine for me. I'm sure the right format and process
24 would depend a bit on what you intend to do with the files.
25
26 --
27 Rich