From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68716 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: compresslevel and png graphics (mkiv) Date: Wed, 25 May 2011 16:48:03 +0200 Message-ID: <4DDD16A3.6000005@elvenkind.com> References: <4DDCF96A.3050703@gmx.net> <4DDD14BC.40203@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1306334911 32752 80.91.229.12 (25 May 2011 14:48:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 May 2011 14:48:31 +0000 (UTC) Cc: Hans Hagen , Hartmut Henkel To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 25 16:48:27 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QPFNq-0004dQ-J1 for gctc-ntg-context-518@m.gmane.org; Wed, 25 May 2011 16:48:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BE830CAD47; Wed, 25 May 2011 16:48:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AEsl6wV3sJBV; Wed, 25 May 2011 16:48:21 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D21E2CAD27; Wed, 25 May 2011 16:48:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 06BF0CAD27 for ; Wed, 25 May 2011 16:48:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ALrvO5JMVxyR for ; Wed, 25 May 2011 16:48:06 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 95205CAD20 for ; Wed, 25 May 2011 16:48:06 +0200 (CEST) Original-Received: from pilot.elvenkind.com (elvenknd.xs4all.nl [82.95.203.226]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4PEm4lO029387 for ; Wed, 25 May 2011 16:48:06 +0200 Original-Received: from localhost (pilot.elvenkind.com [127.0.0.1]) by pilot.elvenkind.com (Postfix) with ESMTP id D781397C; Wed, 25 May 2011 16:45:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at localhost.localdomain Original-Received: from pilot.elvenkind.com ([127.0.0.1]) by localhost (pilot.elvenkind.com [127.0.0.1]) (amavisd-new, port 10025) with LMTP id FslmWK-jvmmz; Wed, 25 May 2011 16:45:58 +0200 (CEST) Original-Received: from glenlivet.elvenkind.com (glenlivet.elvenkind.com [10.10.0.6]) by pilot.elvenkind.com (Postfix) with ESMTP id E7A22231; Wed, 25 May 2011 16:45:57 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.14) Gecko/20101022 Mandriva/3.0.9-0.1mdv2010.1 (2010.1) Thunderbird/3.0.9 In-Reply-To: <4DDD14BC.40203@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=82.95.203.226; country=NL; region=11; city=Capelle; latitude=51.9333; longitude=4.5833; http://maps.google.com/maps?q=51.9333,4.5833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03ELOM4i3 - a25264f407f2 - 20110525 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:68716 Archived-At: On 05/25/11 16:39, Hans Hagen wrote: > On 25-5-2011 2:43, Peter Rolf wrote: >> Hi, >> >> I just made a one pager (TEXpage) out of a big png graphic (5900x4094). >> The compressed size of the graphics is normally around 1.37MB on the >> highest png compress level (9) and 1.32MB after using optipng (only >> around 3% reduction this time). To my surprise the size of the final PDF >> was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to >> 1.48MB. Still not what I wanted... >> >> So I was wondering: is there an option to embed the png graphic as it is >> (no re-compression)? Otherwise the time consuming usage of optipng would >> be a complete waste of time. Believe it or not, but size matters :-) Well, that depends on what optipng does to your image. PDF can do some types of png compression natively (no re-compression), but for that the png has to follow some rules: not everything in the png spec is supported that way. If you see '' during inclusion, then the png follows those rules. Otherwise, it is included in recompressed form, where everything is possible that is allowed by png, but it will not be as small as the original. The finer details are in writepng.w from the luatex source and/or the pdf specification, it is much too detailed to repeat here. Best wishes, Taco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________