Re: Using a png or xcf in Dia



On 02/08/2010 05:24:18 PM, Hans Breuer wrote:
At 08.02.2010 23:29, Karl O. Pinc wrote:
I've a png image, from a gimp xcf, that I'd like
to use as an object in Dia.  

Unfortunately the old website has a highly outdated copy of the 
custom-shapes document. The most recent version is available via:
http://git.gnome.org/browse/dia/tree/doc/custom-shapes

Cool.  Thanks.

Is there a way to use an arbitrary image in dia?

Yes, instead of following the documentation you could try to export 
as

shape instead, there is no need for the round-trip to Inkscape.

I upgraded to 0.97 from backports.org (whether I needed
to or not) and have no problem making a shape.  Thanks.  But...

The particular image I'm interested in has
transparency, which may be yet another issue.
Is there any support for this?

Yes, full support as far as I know.

Transparency looks good on the dia screen, but not
when exported to pdf.

The cairo export to pdf does funny things to the color
map (it seems) on the transparent portions of the shape.
Printing the resultant pdf in black and white looks fine
but the colors that appear when the pdf is displayed
on the screen are 8-bit-ish, and wrong.
I tried upgrading to libcairo2 1.8.8, again from
backports.org, and this did not solve the problem.
Neither did putting a white filled rectangle behind
the transparent shape or a white rectangle shape
I made from a png.

Exporting to eps (using pango fonts) and then using
epstopdf makes the transparent shape look right, but
the transparency is lost and anything behind the
shape is obscured with white.

Humm...  What seems to work is exporting (via cairo)
to ps and then using ps2pdf (in the ghostscript package)
to convert to pdf.  After testing it seems that it
does not matter whether libcairo2 is upgraded or not.
(Note: the cairo ps export option is not available
in stock Lenny.)

I notice that regardless of the libcairo2 version
the resultant pdf has a flaw.  A line "coming out
from behind" a transparent region is shifted
up 1 pixel at the transition in the pdf.

I'm running dia 0.96.1 on Debian Lenny (5.4).

Any comments?  Should I be sending a bug to someone?
Who?

Karl <kop meme com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein




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