[pdftex] graphic{s,x} PNG + pdflatex bug

Nico Schlömer nico.schloemer at gmail.com
Fri May 7 15:55:03 CEST 2010


I can confirm that making sure the image as a same dpi value solves the problem.

A bug has been submitted to matplotlib and it's already been fixed
there as well.

Cheers,
Nico



On Thu, May 6, 2010 at 7:41 PM, Martin Heller <mr_heller at yahoo.dk> wrote:
> On 2010-05-06 16:31, Nico Schlömer wrote:
>>
>> Hi all,
>>
>> I experienced a weird bug using \includegraphics of the graphicx
>> package with pdflatex 1.40.10.
>>
>> I try to load the attached PNG file, and unlike with other PNG files,
>> pdflatex would just bail out with
>>
>> ==================== *snip* ====================
>> [...]
>> [Loading MPS to PDF converter (version 2006.09.02).]
>> )
>> ! Dimension too large.
>> <argument>  \wd \@tempboxa
>> l.7 \includegraphics{img1.png}
>> ?
>> ==================== *snap* ====================
>>
>> David Carlisle, maintainer of graphicx, suggests that may be a bug in
>> pdflatex -- What do you reckon?
>>
>
> Your image has a rather odd resolution.
>
> Image: img1.png
>  Format: PNG (Portable Network Graphics)
>  Class: DirectClass
>  Geometry: 250x250+0+0
>  Resolution: 0.39x0.39
>  Print size: 641.026x641.026
>  Units: PixelsPerInch
>
> So your png is 250/0.39 = 641.026 in wide.
>
> That is 46153 pt which is larger than \maxdimen. Change the resolution and
> your image works fine with \includegraphics.
>
>



More information about the pdftex mailing list