From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 59C241382C5 for ; Mon, 1 Mar 2021 13:48:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55BD4E0956; Mon, 1 Mar 2021 13:48:36 +0000 (UTC) Received: from mail.digimed.co.uk (mail.digimed.co.uk [82.69.83.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 78A57E091B for ; Mon, 1 Mar 2021 13:48:35 +0000 (UTC) Received: from digimed.co.uk (fenchurch.digimed.co.uk [192.168.1.6]) by mail.digimed.co.uk (Postfix) with ESMTPA id 7BC3266BA8 for ; Mon, 1 Mar 2021 13:48:31 +0000 (GMT) Date: Mon, 1 Mar 2021 13:48:26 +0000 From: Neil Bothwick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] Saving an image as black and white Message-ID: <20210301134826.55f643c9@digimed.co.uk> In-Reply-To: <603CD50B.9080303@youngman.org.uk> References: <603CD50B.9080303@youngman.org.uk> Organization: Digital Media Production X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/sRqUj=oE/06rW3G6OqryVl5"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Archives-Salt: 00d6a8ba-8d25-4aa8-9079-a49e7baa900d X-Archives-Hash: 912754c83d0bece1c8fe502a59f6e4b8 --Sig_/sRqUj=oE/06rW3G6OqryVl5 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 1 Mar 2021 11:50:35 +0000, Wols Lists wrote: > I've got a bunch of scans, let's assume they're text documents. And > they're rather big ... I want to email them. >=20 > How on earth do I convert them to TRUE b&w documents? At the moment they > are jpegs that weigh in at 3MB, and I guess they're using about 5 bytes > to store all the colour, luminance, whatever, per pixel. But actually, > there's only ONE BIT of information there - whether that pixel is black > or white. >=20 > I'm using imagemagick, but so far all my attempts to strip out the > surplus information have resulted in INcreasing the file size ??? >=20 > So basically, how do I save an image as "one bit per pixel" like you'd > think you'd send to a B&W printer? $ convert input.jpg -threshold 50% output.png should do it, you may need to play with the threshold setting. The file command reports the output file as being "1-bit grayscale". You can also use -monochrome but that will produce a dithered image, that's probably not what you want judging by your description. --=20 Neil Bothwick If we aren't supposed to eat animals, why are they made of meat? --Sig_/sRqUj=oE/06rW3G6OqryVl5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmA88KoACgkQ92eFu0QS MJhcHA//dFgnlUdN/1OJpB7bhlPESImHURRjes5hkET/xvzzpt+ZL1hr/0xnnEBh dS83ey80traX1jMohLRSnny9QaCMZdIaIh/cEQgzVKKcD35rQ8GhocfrcUioUjEb 2vXC2ruuMa7dQmy0YVfW6qDdMfNFIkwTNuq8olAkcuqC5QxkOnTv+mvt0NWtuTxl Vyf6RqA74pGHmu0WCm5iugJH2VH+0H+aq+iGI/NVNfVe/hzLveDFhx/+3IzHqPTA Zs7SVYCOLzT+j75EJgyw3jWzZFX5NmJ2/ofsJccTJD1gGWccHPyLjMbPktTNRnRK oCsat3e6ec/U/LJG2PY+IuyYk78gu5cOF4JYsZP2XkNc1S2Mxg1TpdTjzg/ndKqO zCfmnwEHVP4iFh4uLFSkeXEVm51rVTIiYKal1fjNeXNuROIZ3ciIUYsnoSE6c/vO JQCy6XtoKdblbsFpYKmR1+gL9cGH37WmZyU70ql70qyUzvjo+3uUFA+FgRO8iUKa pzdv/lOxPb4rPYAp5NFPzJ7q4/8bUQC4CLelupT/sXvkvXrVZ4JSJRG2LecaNdgJ axTiJC/aVXvFfQdIB5KBRy27Gbb2odpoYFjrjc55LZudOSm1eYsRz4iH4hFoabLQ xGhAnTHluruzmDmm08l91oEaf2Qls8Y6j+hOzYhIg230IPBSZqI= =v2GU -----END PGP SIGNATURE----- --Sig_/sRqUj=oE/06rW3G6OqryVl5--