From 9561148831551bbd05d05782ef7b69bca559205b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Thu, 18 May 2006 07:07:15 +0000 Subject: [PATCH] add some remarks about the 'bad' flate compression git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@2698 069f4177-920e-0410-937b-c2a4a81bcd90 --- examples/bitmap/jpeg.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/bitmap/jpeg.txt b/examples/bitmap/jpeg.txt index 5680151b..70863e65 100644 --- a/examples/bitmap/jpeg.txt +++ b/examples/bitmap/jpeg.txt @@ -24,10 +24,13 @@ straight forward solution would be to replace the creation of the While this works perfectly, it'll result in a totally uncompressed image. The size of the EPS file will for example become almost 1.1MB. -Of course you could than turn on the default gzip based compression by -omitting the 'compressmode=None'. This will reduce the filesize down -to about 727KB. Still much, much larger than the version we get by the -jpeg compression. +In a next step you may turn on the default gzip based compression by +omitting the 'compressmode=None' (or setting `compressmode="Flate"` +explicitely). This will reduce the file size down to about 727KB (EPS) +which is still much, much larger than the version we get by the jpeg +compression. Note that this does not mean that the gzip based +compression method is bad in general - it is just bad compared to the +jpeg method for certain kind of image data like photos. Since the image instance is a PIL instance we can also use `compressmode="DCT"`, which turns on the loosy jpeg compression -- 2.11.4.GIT