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 B5C221382C5 for ; Mon, 1 Mar 2021 13:25:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 66C80E092E; Mon, 1 Mar 2021 13:25:35 +0000 (UTC) Received: from icp-osb-irony-out1.external.iinet.net.au (icp-osb-irony-out1.external.iinet.net.au [203.59.1.210]) by pigeon.gentoo.org (Postfix) with ESMTP id 7C622E08F1 for ; Mon, 1 Mar 2021 13:25:33 +0000 (UTC) X-SMTP-MATCH: 0 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CQWwCy6Txg/5xh69xiHAEBAQEBAQc?= =?us-ascii?q?BARIBAQQEAQFAB4FIAoN1AQEBji2HDwEBAQEBAQaBDQglAzcBTYMjhguQMIF?= =?us-ascii?q?oCwEBAQEBAQEBAQk0BAEBgRSDOQKBeyY5BQ0CEAEBAQUBAQEBAQYDAYZfhkU?= =?us-ascii?q?BBVYzCxguVxMIAQGCbIJiJa5tgTSFWYUAgTgBjUJCfoENgREnDAOBZkkHLj6?= =?us-ascii?q?ECQESAW6FBiIEggSBJgEqMYE/JDsOFJ0aVpt9gwacFAUHAx+TVZABtxuBMjp?= =?us-ascii?q?ZMHBNHxmDJU8ZDY4oGY4lDjQBAQFnAgYKAQEDCYwTAQE?= X-IPAS-Result: =?us-ascii?q?A2CQWwCy6Txg/5xh69xiHAEBAQEBAQcBARIBAQQEAQFAB?= =?us-ascii?q?4FIAoN1AQEBji2HDwEBAQEBAQaBDQglAzcBTYMjhguQMIFoCwEBAQEBAQEBA?= =?us-ascii?q?Qk0BAEBgRSDOQKBeyY5BQ0CEAEBAQUBAQEBAQYDAYZfhkUBBVYzCxguVxMIA?= =?us-ascii?q?QGCbIJiJa5tgTSFWYUAgTgBjUJCfoENgREnDAOBZkkHLj6ECQESAW6FBiIEg?= =?us-ascii?q?gSBJgEqMYE/JDsOFJ0aVpt9gwacFAUHAx+TVZABtxuBMjpZMHBNHxmDJU8ZD?= =?us-ascii?q?Y4oGY4lDjQBAQFnAgYKAQEDCYwTAQE?= X-IronPort-AV: E=Sophos;i="5.81,215,1610380800"; d="scan'208";a="346812950" Received: from 220-235-97-156.dyn.iinet.net.au (HELO mail.infra.localdomain) ([220.235.97.156]) by icp-osb-irony-out1.iinet.net.au with ESMTP; 01 Mar 2021 21:25:31 +0800 Received: from localhost (mail.infra.localdomain [127.0.0.1]) by mail.infra.localdomain (Postfix) with ESMTP id E8C92D0645C for ; Mon, 1 Mar 2021 21:25:30 +0800 (AWST) X-Virus-Scanned: amavisd-new at localdomain Received: from mail.infra.localdomain ([127.0.0.1]) by localhost (mail.infra.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tth0mn68bUdF for ; Mon, 1 Mar 2021 21:25:25 +0800 (AWST) Subject: Re: [gentoo-user] Re: [OT] Saving an image as black and white To: gentoo-user@lists.gentoo.org References: <603CD50B.9080303@youngman.org.uk> <603CE962.7070202@youngman.org.uk> From: William Kenworthy Message-ID: Date: Mon, 1 Mar 2021 21:24:19 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 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 In-Reply-To: <603CE962.7070202@youngman.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Archives-Salt: 76c4f3fc-c299-40ae-8f91-7d29d13aacb2 X-Archives-Hash: 47217d22db173f3e24190399e84023f6 save/convert to pdf - use gs from ghostscrpit to convert them (I use ebook for the target) which gives 10-20x reduction in size with only a small reduction in quality - perfect for emailing. I dont have the actual command string but I originally found the suggestion via google. BillK On 1/3/21 9:17 pm, Wols Lists wrote: > On 01/03/21 12:11, (Nuno Silva) wrote: >> On 2021-03-01, 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. >>> >>> 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. >>> >>> I'm using imagemagick, but so far all my attempts to strip out the >>> surplus information have resulted in INcreasing the file size ??? >>> >>> 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? >>> >>> Even at 300dpi, I make that 300*300/8 ~= 10KB/in^2 or 800KB of >>> uncompressed info for a page of A4, not 3MB. >>> >>> Cheers, >>> Wol >> Somebody else might have a better suggestion, or perhaps a better >> understanding of the JPEG format and of what needs to be tuned, but, for >> example: >> >> convert origin.jpg -threshold 70% -monochrome result.jpg >> >> (And adjust the "-threshold percent" if needed. It might be that you >> don't need thresholding at all, but if you do, it apparently must go >> before "-monochrome".) >> >> (Depending on the receiving end, you could also explore other >> formats. Here, if the scanned document can be stored in monochrome, I >> usually use djvu.) >> > Thanks but no, I've already tried that. It makes matters worse! > > I've messed about with the scanner, so it is now creating 800KB images, > but I don't want to rescan everything I've done. > > The problem is that it is clearly saving the images as greyscale, not as > black&white. And when I search for help, what I want is swamped by all > the false positives for greyscale. > > Oh - and for Nuno - sorry tesseract is no use, they are NOT text. That's > why I used the word "assume" - to make it clear that I want a > 1-bit/pixel palette, not a 5-byte/pixel greyscale. > > Cheers, > Wol >