summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPawel Piatek <xj@wp.pl>2017-03-13 22:51:34 +0100
committerBastien Nocera <hadess@hadess.net>2017-03-15 14:31:00 +0100
commit47c587bf5fe5d62197e0ab2b26a5d93f434cade1 (patch)
treeb7eda6e8c74376d4f04ce8b286a7bed58ce18367 /tests
parent54edaaa55a3081d5883c6e1abfdd9823ea84c69f (diff)
downloadgdk-pixbuf-47c587bf5fe5d62197e0ab2b26a5d93f434cade1.tar.gz
jpeg: Add support for JPEG_COM EXIF tag
https://bugzilla.gnome.org/show_bug.cgi?id=143608
Diffstat (limited to 'tests')
-rw-r--r--tests/bug143608-comment.jpgbin0 -> 191869 bytes
-rw-r--r--tests/pixbuf-jpeg.c20
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/bug143608-comment.jpg b/tests/bug143608-comment.jpg
new file mode 100644
index 000000000..7c3c93a71
--- /dev/null
+++ b/tests/bug143608-comment.jpg
Binary files differ
diff --git a/tests/pixbuf-jpeg.c b/tests/pixbuf-jpeg.c
index 073104a32..ea1d62eae 100644
--- a/tests/pixbuf-jpeg.c
+++ b/tests/pixbuf-jpeg.c
@@ -96,6 +96,25 @@ test_bug_775218 (void)
g_clear_object (&ref);
}
+static void
+test_comment(void)
+{
+ GError *error = NULL;
+ GdkPixbuf *ref;
+
+ if (!format_supported ("jpeg") || !format_supported ("png"))
+ {
+ g_test_skip ("format not supported");
+ return;
+ }
+
+ ref = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "bug143608-comment.jpg", NULL), &error);
+ g_assert_no_error (error);
+
+ g_assert_cmpstr (gdk_pixbuf_get_option (ref, "comment"), ==, "COMMENT HERE");
+ g_object_unref (ref);
+}
+
int
main (int argc, char **argv)
{
@@ -104,6 +123,7 @@ main (int argc, char **argv)
g_test_add_func ("/pixbuf/jpeg/inverted_cmyk_jpeg", test_inverted_cmyk_jpeg);
g_test_add_func ("/pixbuf/jpeg/type9_rotation_exif_tag", test_type9_rotation_exif_tag);
g_test_add_func ("/pixbuf/jpeg/bug775218", test_bug_775218);
+ g_test_add_func ("/pixbuf/jpeg/comment", test_comment);
return g_test_run ();
}