Make show_image() cope with more formats
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 9 Jun 2012 13:42:56 +0000 (09:42 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Thu, 9 Aug 2012 15:24:37 +0000 (11:24 -0400)
commit04e878c231ad3624c57e51a5fcdc55a177d4dc0f
treedc1fc30130f397dcff1b755f5afc5db3d562de74
parent8db9ec9814a3dcd8211ec60cd4fd3c9ae9d77924
Make show_image() cope with more formats

This makes show_image() deal with more formats than just a8r8g8b8, in
particular, a8r8g8b8_sRGB can now be handled.

Images that are passed to show_image with a format of a8r8g8b8_sRGB
are displayed without modification under the assumption that the
monitor is approximately sRGB.

Images with a format of a8r8g8b8 are also displayed without
modification since many other users of show_image() have been
generating essentially sRGB data with this format. Other formats are
also assumed to be gamma compressed; these are converted to a8r8g8b8
before being displayed.

With these changes, srgb-test.c doesn't need to do its own conversion
anymore.
demos/composite-test.c
demos/gtk-utils.c
demos/gtk-utils.h
demos/srgb-test.c