PNG Brown paper bag version, 1.2.1 -- that'll teach me to hurry
the testing process. This should fix it all image types.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2000-04-02 Nick Lamb <njl195@zepler.org.uk>
|
||||||
|
* plug-ins/common/png.c
|
||||||
|
Brown paper bag version, 1.2.1 -- that'll teach me to hurry
|
||||||
|
the testing process. This should fix it all image types.
|
||||||
|
|
||||||
2000-04-02 Garry R. Osgood <gosgood@idt.net>
|
2000-04-02 Garry R. Osgood <gosgood@idt.net>
|
||||||
|
|
||||||
* gimp/app/colormap_dialog.i.c
|
* gimp/app/colormap_dialog.i.c
|
||||||
@ -22,7 +27,6 @@
|
|||||||
I reverted the png change since, while it worked fine for RGBA and
|
I reverted the png change since, while it worked fine for RGBA and
|
||||||
INDEXEDA it totally shred RGB and INDEXED images to pieces.. :(
|
INDEXEDA it totally shred RGB and INDEXED images to pieces.. :(
|
||||||
|
|
||||||
>>>>>>> 1.2502
|
|
||||||
Sun Apr 2 16:55:47 BST 2000
|
Sun Apr 2 16:55:47 BST 2000
|
||||||
|
|
||||||
* app/bezier_select.c
|
* app/bezier_select.c
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
* Constants...
|
* Constants...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PLUG_IN_VERSION "1.2 - 2 April 2000"
|
#define PLUG_IN_VERSION "1.2.1 - 2 April 2000"
|
||||||
#define SCALE_WIDTH 125
|
#define SCALE_WIDTH 125
|
||||||
|
|
||||||
#define DEFAULT_GAMMA 2.20
|
#define DEFAULT_GAMMA 2.20
|
||||||
@ -858,7 +858,7 @@ save_image (gchar *filename, /* I - File to save to */
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (info->valid | PNG_INFO_tRNS) {
|
if (info->valid & PNG_INFO_tRNS) {
|
||||||
/* It's not really a VERY evil hack, right? -- ruth */
|
/* It's not really a VERY evil hack, right? -- ruth */
|
||||||
png_set_tRNS(pp, info, (png_bytep) "\0", 1, NULL);
|
png_set_tRNS(pp, info, (png_bytep) "\0", 1, NULL);
|
||||||
}
|
}
|
||||||
@ -901,13 +901,21 @@ save_image (gchar *filename, /* I - File to save to */
|
|||||||
num = end - begin;
|
num = end - begin;
|
||||||
|
|
||||||
gimp_pixel_rgn_get_rect (&pixel_rgn, pixel, 0, begin, drawable->width, num);
|
gimp_pixel_rgn_get_rect (&pixel_rgn, pixel, 0, begin, drawable->width, num);
|
||||||
if (info->valid | PNG_INFO_tRNS) {
|
if (info->valid & PNG_INFO_tRNS) {
|
||||||
for (i = 0; i < num; ++i) {
|
for (i = 0; i < num; ++i) {
|
||||||
fixed= pixels[i];
|
fixed= pixels[i];
|
||||||
for (k = 0; k < drawable->width; ++k) {
|
for (k = 0; k < drawable->width; ++k) {
|
||||||
fixed[k] = (fixed[k*2+1] > 127) ? fixed[k*2] + 1 : 0;
|
fixed[k] = (fixed[k*2+1] > 127) ? fixed[k*2] + 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Forgot this case before, what if there are too many colors? */
|
||||||
|
} else if (info->valid & PNG_INFO_PLTE && bpp == 2) {
|
||||||
|
for (i = 0; i < num; ++i) {
|
||||||
|
fixed= pixels[i];
|
||||||
|
for (k = 0; k < drawable->width; ++k) {
|
||||||
|
fixed[k] = fixed[k*2];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
png_write_rows (pp, pixels, num);
|
png_write_rows (pp, pixels, num);
|
||||||
|
Reference in New Issue
Block a user