Added RGB and Gray tRNS support for Steven Grady
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2000-05-09 Nick Lamb <njl195@zepler.org.uk>
|
||||||
|
|
||||||
|
* plug-ins/common/png.c: tRNS expansion using transforms for
|
||||||
|
the RGB and Grayscale cases, for Steven Grady
|
||||||
|
|
||||||
2000-05-08 Michael Natterer <mitch@gimp.org>
|
2000-05-08 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/errors.c (gimp_fatal_error): oops, forgot a debugging
|
* app/errors.c (gimp_fatal_error): oops, forgot a debugging
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
* Constants...
|
* Constants...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PLUG_IN_VERSION "1.3.1 - 25 April 2000"
|
#define PLUG_IN_VERSION "1.3.2 - 9 May 2000"
|
||||||
#define SCALE_WIDTH 125
|
#define SCALE_WIDTH 125
|
||||||
|
|
||||||
#define DEFAULT_GAMMA 2.20
|
#define DEFAULT_GAMMA 2.20
|
||||||
@ -429,6 +429,10 @@ load_image (gchar *filename) /* I - File to load */
|
|||||||
* Latest attempt, this should be my best yet :)
|
* Latest attempt, this should be my best yet :)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (info->bit_depth == 16) {
|
||||||
|
png_set_strip_16(pp);
|
||||||
|
}
|
||||||
|
|
||||||
if (info->color_type == PNG_COLOR_TYPE_GRAY && info->bit_depth < 8) {
|
if (info->color_type == PNG_COLOR_TYPE_GRAY && info->bit_depth < 8) {
|
||||||
png_set_expand(pp);
|
png_set_expand(pp);
|
||||||
}
|
}
|
||||||
@ -437,8 +441,13 @@ load_image (gchar *filename) /* I - File to load */
|
|||||||
png_set_packing(pp);
|
png_set_packing(pp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->bit_depth == 16) {
|
/*
|
||||||
png_set_strip_16(pp);
|
* Expand G+tRNS to GA, RGB+tRNS to RGBA
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (info->color_type != PNG_COLOR_TYPE_PALETTE &&
|
||||||
|
(info->valid & PNG_INFO_tRNS)) {
|
||||||
|
png_set_expand(pp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user