dvipng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dvipng] transparent PNGs via \includegraphics ?


From: Jan-Ake Larsson
Subject: Re: [Dvipng] transparent PNGs via \includegraphics ?
Date: Thu, 20 Nov 2008 09:26:34 +0100
User-agent: Thunderbird 2.0.0.12 (X11/20080213)

jw wrote:
> I have a transparent image that I want to insert into my document, and
> I was hoping that dvipng would preserve that transparency in the final
> output.
> Is that possible?

Yes, it should be.

> Using the "-bg Transparent" option for dvipng makes all the "white
> space" on the page transparent, but the inserted graphic still is not.
> The inserted bitmap looks as if it were placed over a black background.

Apparently there is a bug in the code that rescales included bitmap
images so that transparency is converted into black background. I will
fix that and release 1.12 when I get the time. Thanks for the bug report

A workaround is to include the image at its correct size from the start
to avoid rescaling. Possibly by rescaling before inclusion. For example,
if I have a DVI to be rendered at 100 dpi and want to include a 200
pixels square image so that it is 200 pixels wide in the output, I use

   \includegraphics[bb=0 0 200 200,width=2in]{Smiley.png}

This means that the output is 2in=200px wide, so there is no rescaling,
and the inclusion works as intended.

/JÅ






reply via email to

[Prev in Thread] Current Thread [Next in Thread]