Commit graph

12 commits

Author SHA1 Message Date
Bryce Harrington
6059f5f260 test: Free resources in pdf2png
Patch proposed by Bofa.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/317
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2018-10-17 17:53:12 -07:00
Adrian Johnson
11667ec47c pdf2png: fix deprecated warning 2016-04-16 17:42:56 +09:30
Chris Wilson
f74b11415a test: Use a group to render PDF correctly using poppler.
In order to support blend modes, we need to use a clear background
whilst rendering the PDF, which inspired the use of DEST_OVER to avoid
having to render to an intermediate surface. However, the adjunct of
using subpixel text means that we cannot simply using the alpha channel
as the sole mask and so need to render to an intermediate and paint it
over an opaque background.
2010-06-11 14:12:23 +01:00
Chris Wilson
7f227ec8d3 Revert "test/pdf2png: Don't use DEST_OVER as poppler starts using subpixel text."
This reverts commit 506b2ebe71.

We have conflicting requirements here. In order to support extended
blend modes correctly we need to use DEST_OVER, at the expense of
supporting subpixel text. More thought required.
2010-06-11 12:54:15 +01:00
Chris Wilson
506b2ebe71 test/pdf2png: Don't use DEST_OVER as poppler starts using subpixel text.
Using DEST_OVER in this form to paint the background white fails in the
presence of subpixel geometry (particular text), so remove the hack and
simply paint the background white prior to passing the surface to
poppler. KISS.
2010-06-11 12:07:21 +01:00
Carlos Garcia Campos
1e1f4fd092 [test] Use poppler_page_render with a transparent surface
Instead of using an opaque surface filled in white, use a transparent
surface and fill it in white by using CAIRO_OPERATOR_DEST_OVER after
rendering.
2009-07-02 14:50:15 +02:00
Chris Wilson
19e8c5c7f4 [test] Fix mismatched free.
A couple of strings allocated using glib functions but freed with system
malloc.

Reported: http://bugs.freedesktop.org/show_bug.cgi?id=19210.
2009-01-02 09:53:21 +00:00
Chris Wilson
34564aa84a [test/pdf2png] Remove dependency on GdkPixbuf
It's appears to be dropped from the current poppler trunk, so just use our
own venerable cairo_surface_write_ton_png().
2008-11-05 19:27:49 +00:00
Dom Lachowicz
32d049a7bf Bug 5306: test/pdf2png: Add missing include of stdio.h 2006-06-14 04:37:27 -07:00
Carl Worth
44572fdcc8 Revert "pdf2png: Use new poppler_page_render to render directly through cairo."
This introduced a rather gratuitous dependency on a newer version of
poppler, which caused a fair amount of pain for no significant
benefit.

This reverts 253472492e commit.
2006-05-05 07:51:59 -07:00
Carl Worth
253472492e pdf2png: Use new poppler_page_render to render directly through cairo.
...as opposed to using poppler_page_render_to_pixbuf.
2006-05-02 16:57:27 -07:00
Carl Worth
45c350e328 Add checks for poppler and friends which are needed by pdf2png. Set CAIRO_CAN_TEST_PDF_SURFACE as both a #define and an automake conditional.
Build pdf2png if possible.
Add support for testing the PDF backend.
New utility program to convert a PDF file into a PNG image using poppler (thanks to Kristian Høgsberg).
Ignore new stuff generated by PDF backend testing.
2005-12-07 16:06:11 +00:00