don't load any layers from a TIFF directory which don't match the mode of

2007-06-13  Mukund Sivaraman  <muks@mukund.org>

        * plug-ins/common/tiff-load.c: don't load any layers from a TIFF
        directory which don't match the mode of the first image in the TIFF 
        directory.


svn path=/trunk/; revision=22769
This commit is contained in:
Mukund Sivaraman
2007-06-13 09:57:43 +00:00
committed by Mukund Sivaraman
parent c59478af2a
commit a8ab7fad18
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-06-13 Mukund Sivaraman <muks@mukund.org>
* plug-ins/common/tiff-load.c: don't load any layers from a TIFF
directory which don't match the mode of the first image in the TIFF
directory.
2007-06-13 Sven Neumann <sven@gimp.org>
* app/errors.[ch]: added errors_exit() and unset the Gimp

View File

@ -491,6 +491,7 @@ load_image (const gchar *filename,
gboolean alpha;
gint image = 0, image_type = GIMP_RGB;
gint layer, layer_type = GIMP_RGB_IMAGE;
gint first_layer_type = GIMP_RGB_IMAGE;
float layer_offset_x = 0.0;
float layer_offset_y = 0.0;
gint layer_offset_x_pixel = 0;
@ -677,6 +678,14 @@ load_image (const gchar *filename,
layer_type = GIMP_RGBA_IMAGE;
}
if (target == GIMP_PAGE_SELECTOR_TARGET_LAYERS)
{
if (li == 0)
first_layer_type = layer_type;
else if (layer_type != first_layer_type)
continue;
}
if ((target == GIMP_PAGE_SELECTOR_TARGET_IMAGES) || (! image))
{
if ((image = gimp_image_new (cols, rows, image_type)) == -1)