Sign up now! · Forgot password?
gimpusers.com RSS feed
58 @ identi.ca
819 @ Twitter

Exporting high-quality PNG w/transparency?

ForumsFor GIMP users ► Exporting high-quality PNG w/transparency?

Sent: 2012-01-28 21:58:28 UTC (4 months ago)

From: Keith Purtell

Exporting high-quality PNG w/transparency?

Several times a week I need to take a PDF (single-page doc), then convert
to a page-sized PNG with quality good enough to read the text (and a
transparent border), and then convert to a SWF. I have a PNG-to-SWF
utility, but when I used it on the PNG saved after I opened my PDF and
exported from GIMP, the end result was not good enough. A co-worker said
GIMP couldn't make a PNG (w/transparency) with enough quality. He said we'd
have to use some other software. Part of the issue was not being able to
resize without losing quality before the PNG export. True or false?

Keith

» Reply to this message

Sent: 2012-01-28 22:39:20 UTC (4 months ago)

From: Chris Mohler

Exporting high-quality PNG w/transparency?

On Sat, Jan 28, 2012 at 3:58 PM, Keith Purtell wrote:
> A co-worker said GIMP couldn't make a PNG (w/transparency) with enough
> quality. He said we'd have to use some other software. Part of the issue was
> not being able to resize without losing quality before the PNG export. True
> or false?

False. As long as the PDF has sufficient resolution (or is vector),
and you select a high enough resolution setting when importing the PDF
into GIMP, you shouldn't have quality issues.

Chris

» Reply to this message

Sent: 2012-01-29 00:02:05 UTC (4 months ago)

From: Liam R E Quin

Exporting high-quality PNG w/transparency?

On Sat, 2012-01-28 at 15:58 -0600, Keith Purtell wrote:
> A co-worker said
> GIMP couldn't make a PNG (w/transparency) with enough quality. He said we'd
> have to use some other software. Part of the issue was not being able to
> resize without losing quality before the PNG export. True or false?

It may be true that your co-worker said that . :-)

But there's some confusion here.

PNG is a lossless format, so the quality is always 100%
On the other hand, scaling an image *is* lossy. Enlarging an image
introduces errors where the software inventes the extra detail.
Shrinking an image throws away detail, and it's easy to lose serifs,
punctuation, the cross-bars of H and e, and so forth, or to weaken them.

A method that may help for rescaling text:
(1) open the PDF at 3 times final resolution
(2) use filter->distorts-Value Propagate, with 'more black' and an
amount of about 0.25 or 0.33; this will strengthen the weaker parts of
the letters.
(3) use filters->gaussian blur, radius 3 (you can experiment, radius 5
may work better)
(4) scale the image to 33.33%
(5) use colours->curves and make an S-shaped curve, so that the curve
goes below the diagona lline on the bottom left, then emerges slightly
to the left of centre, and is then above the diagonal. Or for a sharper
look, just drag the two endpoints of the diagona lline in slightly
towards the middle, e.g. by 1.5 squares on the dialogue grid.

Having said that, you'll likely get even better results using pstoedit
to generate wmf fro pdf directly. PDF and WMF are both vector formats,
and you can resize a vector image without loss of quality. PNG is a
bitmap image, and cannot so easily be resized.

Liam

Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

» Reply to this message

Sent: 2012-01-29 01:10:20 UTC (4 months ago)

From: Keith Purtell

Exporting high-quality PNG w/transparency?

Outstanding! That not only gives me immediately useful answers, but I'm
looking into pstoedit and Ghostedit as tools.

Keith

» Reply to this message