diff options
51 files changed, 57 insertions, 5 deletions
diff --git a/tests/pixbuf-slow-load.c b/tests/pixbuf-slow-load.c index d22217ec2..6ccc6ce54 100644 --- a/tests/pixbuf-slow-load.c +++ b/tests/pixbuf-slow-load.c @@ -93,6 +93,7 @@ test_reftest_success (gconstpointer file) char *ref_filename; guchar *contents; gsize i, contents_length; + char *content_type, *mime_type; gboolean success; filename = file; @@ -104,16 +105,21 @@ test_reftest_success (gconstpointer file) g_assert_no_error (error); g_assert (reference != NULL); - loader = gdk_pixbuf_loader_new (); + success = g_file_get_contents (filename, (gchar **) &contents, &contents_length, &error); + g_assert_no_error (error); + g_assert (success); + + content_type = g_content_type_guess (filename, contents, contents_length, NULL); + mime_type = g_content_type_get_mime_type (content_type); + g_assert (mime_type); + + loader = gdk_pixbuf_loader_new_with_mime_type (mime_type, &error); + g_assert_no_error (error); g_assert (loader != NULL); g_signal_connect (loader, "size-prepared", G_CALLBACK (loader_size_prepared), &loaded); g_signal_connect (loader, "area-prepared", G_CALLBACK (loader_area_prepared), &loaded); g_signal_connect (loader, "area-updated", G_CALLBACK (loader_area_updated), &loaded); - success = g_file_get_contents (filename, (gchar **) &contents, &contents_length, &error); - g_assert_no_error (error); - g_assert (success); - for (i = 0; i < contents_length; i++) { success = gdk_pixbuf_loader_write (loader, &contents[i], 1, &error); @@ -131,6 +137,8 @@ test_reftest_success (gconstpointer file) g_assert_no_error (error); g_assert (success); + g_free (mime_type); + g_free (content_type); g_free (contents); g_object_unref (loaded); g_object_unref (loader); diff --git a/tests/test-images/tga/gtk-logo-16bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-16bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..53a66caff --- /dev/null +++ b/tests/test-images/tga/gtk-logo-16bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-16bpp.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-16bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-16bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..53a66caff --- /dev/null +++ b/tests/test-images/tga/gtk-logo-16bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-16bpp.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-16bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-16bpp-top-left.tga.ref.png new file mode 120000 index 000000000..53a66caff --- /dev/null +++ b/tests/test-images/tga/gtk-logo-16bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-16bpp.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-16bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-16bpp-top-right.tga.ref.png new file mode 120000 index 000000000..53a66caff --- /dev/null +++ b/tests/test-images/tga/gtk-logo-16bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-16bpp.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-16bpp.ref.png b/tests/test-images/tga/gtk-logo-16bpp.ref.png Binary files differnew file mode 100644 index 000000000..dd8570a36 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-16bpp.ref.png diff --git a/tests/test-images/tga/gtk-logo-24bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-24bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-24bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-24bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-24bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-24bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-24bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-24bpp-top-left.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-24bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-24bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-24bpp-top-right.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-24bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-32bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-32bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-32bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-32bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-32bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-32bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-32bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-32bpp-top-left.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-32bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-32bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-32bpp-top-right.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-32bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-8bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-8bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-8bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-8bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-8bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-8bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-8bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-8bpp-top-left.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-8bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-8bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-8bpp-top-right.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-8bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-top-left.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-top-right.tga.ref.png new file mode 120000 index 000000000..35b1c6791 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap-rle-8bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-cmap.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-cmap.ref.png b/tests/test-images/tga/gtk-logo-cmap.ref.png Binary files differnew file mode 100644 index 000000000..a9281992e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-cmap.ref.png diff --git a/tests/test-images/tga/gtk-logo-gray-16bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-16bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-16bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-16bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-16bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-16bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-16bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-16bpp-top-left.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-16bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-16bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-16bpp-top-right.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-16bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-8bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-8bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-8bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-8bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-8bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-8bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-8bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-8bpp-top-left.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-8bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-8bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-8bpp-top-right.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-8bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-opaque.ref.png b/tests/test-images/tga/gtk-logo-gray-opaque.ref.png Binary files differnew file mode 100644 index 000000000..315b78c50 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-opaque.ref.png diff --git a/tests/test-images/tga/gtk-logo-gray-rle-16bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-rle-16bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-rle-16bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-top-left.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-rle-16bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-top-right.tga.ref.png new file mode 120000 index 000000000..010f46cde --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-16bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-rle-8bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-rle-8bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-rle-8bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-top-left.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray-rle-8bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-top-right.tga.ref.png new file mode 120000 index 000000000..54c802da1 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray-rle-8bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-gray-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-gray.ref.png b/tests/test-images/tga/gtk-logo-gray.ref.png Binary files differnew file mode 100644 index 000000000..5b7617f73 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-gray.ref.png diff --git a/tests/test-images/tga/gtk-logo-opaque.ref.png b/tests/test-images/tga/gtk-logo-opaque.ref.png Binary files differnew file mode 100644 index 000000000..1244945f3 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-opaque.ref.png diff --git a/tests/test-images/tga/gtk-logo-rle-24bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-24bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-24bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-rle-24bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-24bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-24bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-rle-24bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-24bpp-top-left.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-24bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-rle-24bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-24bpp-top-right.tga.ref.png new file mode 120000 index 000000000..15a79d54e --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-24bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo-opaque.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-rle-32bpp-bottom-left.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-32bpp-bottom-left.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-32bpp-bottom-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-rle-32bpp-bottom-right.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-32bpp-bottom-right.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-32bpp-bottom-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-rle-32bpp-top-left.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-32bpp-top-left.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-32bpp-top-left.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo-rle-32bpp-top-right.tga.ref.png b/tests/test-images/tga/gtk-logo-rle-32bpp-top-right.tga.ref.png new file mode 120000 index 000000000..b53330e31 --- /dev/null +++ b/tests/test-images/tga/gtk-logo-rle-32bpp-top-right.tga.ref.png @@ -0,0 +1 @@ +gtk-logo.ref.png
\ No newline at end of file diff --git a/tests/test-images/tga/gtk-logo.ref.png b/tests/test-images/tga/gtk-logo.ref.png Binary files differnew file mode 100644 index 000000000..9f1431ea2 --- /dev/null +++ b/tests/test-images/tga/gtk-logo.ref.png |