improved handling of attached non-RGB profiles.

2007-05-09  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/lcms.c (lcms_icc_apply): improved handling of
	attached non-RGB profiles.

	* plug-ins/common/oilify.c: use GIMP_RGB_LUMINANCE() instead of
	the self-made INTENSITY macro.

	* plug-ins/common/tiff-load.c
	* plug-ins/common/tiff-save.c: reduced number of progress 
updates.


svn path=/trunk/; revision=22461
This commit is contained in:
Sven Neumann 2007-05-09 16:14:18 +00:00 committed by Sven Neumann
parent 936324adfe
commit ddbfbace2e
5 changed files with 21 additions and 9 deletions

View File

@ -1,3 +1,14 @@
2007-05-09 Sven Neumann <sven@gimp.org>
* plug-ins/common/lcms.c (lcms_icc_apply): improved handling of
attached non-RGB profiles.
* plug-ins/common/oilify.c: use GIMP_RGB_LUMINANCE() instead of
the self-made INTENSITY macro.
* plug-ins/common/tiff-load.c
* plug-ins/common/tiff-save.c: reduced number of progress updates.
2007-05-09 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-console.c (script_fu_browse_response):

View File

@ -477,17 +477,17 @@ lcms_icc_apply (GimpColorConfig *config,
src_profile = lcms_image_get_profile (config, image);
if (! src_profile && ! dest_profile)
return GIMP_PDB_SUCCESS;
if (src_profile && ! lcms_icc_profile_is_rgb (src_profile))
{
g_warning ("Attached color profile is not for RGB color space.");
g_printerr ("lcms: attached color profile is not for RGB color space.");
cmsCloseProfile (src_profile);
src_profile = NULL;
}
if (! src_profile && ! dest_profile)
return GIMP_PDB_SUCCESS;
if (! src_profile)
src_profile = cmsCreate_sRGBProfile ();
@ -828,7 +828,7 @@ lcms_drawable_transform (GimpDrawable *drawable,
done += rgn.h * rgn.w;
if (count++ % 16 == 0)
if (count++ % 32 == 0)
gimp_progress_update (progress_start +
(gdouble) done /
(drawable->width * drawable->height) * range);

View File

@ -38,7 +38,6 @@
#define MODE_RGB 0
#define MODE_INTEN 1
#define INTENSITY(p) ((guint) (p[0]*77+p[1]*150+p[2]*29) >> 8)
typedef struct
{
@ -395,7 +394,7 @@ oilify (GimpDrawable *drawable,
{
if (use_inten_alg)
{
c = INTENSITY(src);
c = GIMP_RGB_LUMINANCE (src[0], src[1], src[2]);
++Hist[c];
for (b = 0; b < bytes; b++)
Hist_rgb[b][c] += src[b];

View File

@ -1097,7 +1097,8 @@ load_rgba (TIFF *tif,
channel[0].pixels + row * imageWidth * 4,
0, imageLength -row -1, imageWidth, 1);
gimp_progress_update ((gdouble) row / (gdouble) imageLength);
if ((row % 32) == 0)
gimp_progress_update ((gdouble) row / (gdouble) imageLength);
}
}

View File

@ -822,7 +822,8 @@ save_image (const gchar *filename,
}
}
gimp_progress_update ((gdouble) row / (gdouble) rows);
if ((row % 32) == 0)
gimp_progress_update ((gdouble) row / (gdouble) rows);
}
TIFFFlushData (tif);