[test] Use a different jpeg image for mime-data

Detect when we successfully encode the JPEG data from the mime-type by
using a completely image.
This commit is contained in:
Chris Wilson 2008-11-04 13:00:36 +00:00
parent 8407470409
commit c13a09ddb4
5 changed files with 8 additions and 1 deletions

View file

@ -694,6 +694,8 @@ REFERENCE_IMAGES = \
meta-surface-pattern.svg12.argb32.ref.png \
meta-surface-pattern.svg12.rgb24.ref.png \
mime-data.ref.png \
mime-data.ps.ref.png \
mime-data.pdf.ref.png \
miter-precision.ref.png \
miter-precision.ps2.ref.png \
miter-precision.ps3.ref.png \
@ -1002,6 +1004,7 @@ EXTRA_DIST += \
make-html.pl \
romedalen.jpg \
romedalen.png \
scarab.jpg \
surface-source.c \
$(REFERENCE_IMAGES)

View file

@ -35,7 +35,11 @@ read_jpg_file (const cairo_test_context_t *ctx,
unsigned char **data_out,
unsigned int *length_out)
{
const char jpg_filename[] = "romedalen.jpg";
/* Deliberately use a non-matching jpeg image, so that we can identify
* when the JPEG representation is used in preference to the image
* surface.
*/
const char jpg_filename[] = "scarab.jpg";
FILE *file;
unsigned char *buf;
unsigned int len;

BIN
test/mime-data.pdf.ref.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

BIN
test/mime-data.ps.ref.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

BIN
test/scarab.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB