mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 08:10:08 +01:00
[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:
parent
8407470409
commit
c13a09ddb4
5 changed files with 8 additions and 1 deletions
|
|
@ -694,6 +694,8 @@ REFERENCE_IMAGES = \
|
||||||
meta-surface-pattern.svg12.argb32.ref.png \
|
meta-surface-pattern.svg12.argb32.ref.png \
|
||||||
meta-surface-pattern.svg12.rgb24.ref.png \
|
meta-surface-pattern.svg12.rgb24.ref.png \
|
||||||
mime-data.ref.png \
|
mime-data.ref.png \
|
||||||
|
mime-data.ps.ref.png \
|
||||||
|
mime-data.pdf.ref.png \
|
||||||
miter-precision.ref.png \
|
miter-precision.ref.png \
|
||||||
miter-precision.ps2.ref.png \
|
miter-precision.ps2.ref.png \
|
||||||
miter-precision.ps3.ref.png \
|
miter-precision.ps3.ref.png \
|
||||||
|
|
@ -1002,6 +1004,7 @@ EXTRA_DIST += \
|
||||||
make-html.pl \
|
make-html.pl \
|
||||||
romedalen.jpg \
|
romedalen.jpg \
|
||||||
romedalen.png \
|
romedalen.png \
|
||||||
|
scarab.jpg \
|
||||||
surface-source.c \
|
surface-source.c \
|
||||||
$(REFERENCE_IMAGES)
|
$(REFERENCE_IMAGES)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,11 @@ read_jpg_file (const cairo_test_context_t *ctx,
|
||||||
unsigned char **data_out,
|
unsigned char **data_out,
|
||||||
unsigned int *length_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;
|
FILE *file;
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
|
||||||
BIN
test/mime-data.pdf.ref.png
Normal file
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
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
BIN
test/scarab.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Loading…
Add table
Reference in a new issue