[reportlab-users] Importing a gif-graphic in reportlab

Robin Becker reportlab-users@reportlab.com
Wed, 2 Apr 2003 18:44:04 +0100


In article <20030402171712.GA6384@mail.librelogiciel.com>, Jerome Alet
<alet@librelogiciel.com> writes
>On Wed, Apr 02, 2003 at 05:13:49PM +0100, Robin Becker wrote:
>> 
>> However, the conversion is carried out using the simplistic
>> im.convert("RGB"). Any better ideas and I'll be glad to try and add a
>> mechanism to get the conversion done properly.
>> 
>> One idea might be some way to indicate a 'raw' PIL image which needs no
>> conversion.
>
>One idea maybe : from a lot of tests done by different people, which 
>I confirm based on my own tests, it seems that PIL is of lower 
>quality compared to ImageMagick, as far as file format conversions 
>are concerned, at least to/from jpeg. 
>
>Unfortunately Python's ImageMagick support lacked for a long time 
>(not maintained), but I seem to remember that a new project was 
>launched some time ago (or was it the same re-launched ?) 
>
>Maybe using ImageMagick instead of PIL when possible or when
>better quality is needed would be a solution.
>
>bye,
>
>Jerome Alet
Well I was trying to say that conversion to JPEG shouldn't be a problem
here. We use conversion to RGB (ie 3 x 8bit planes) and that should be
OK for GIF. We then tell PDF to display an RGB image (using A85
compression etc).

PDF should be able to display simple 3 plane images just fine. I wonder
if the image is not being displayed at its natural size.

As for PIL there are a lot of things you can do that are hidden under
the hood and I don't have access to the 'professional edition' so cannot
say what all of the options are.
-- 
Robin Becker