Fixed a bug in color_only_pixels(), fixed a possible bug in

Sun Sep 27 13:53:03 BST 1998  Adam D. Moss <adam@gimp.org>

	* app/paint_funcs.c: Fixed a bug in color_only_pixels(),
	fixed a possible bug in border_region().
This commit is contained in:
BST 1998 Adam D. Moss 1998-09-27 12:59:44 +00:00 committed by Adam D. Moss
parent d1d3697c9d
commit 2d5e991cb1
3 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Sun Sep 27 13:53:03 BST 1998 Adam D. Moss <adam@gimp.org>
* app/paint_funcs.c: Fixed a bug in color_only_pixels(),
fixed a possible bug in border_region().
Sat Sep 26 20:46:18 BST 1998 Adam D. Moss <adam@gimp.org>
* app/channel.c app/channel_ops.c app/drawable.c

View file

@ -377,6 +377,7 @@ color_pixels (unsigned char *dest,
register unsigned char c0, c1, c2;
register guint32 *longd, longc;
register guint16 *shortd, shortc;
switch (bytes)
{
case 1:
@ -662,7 +663,7 @@ color_only_pixels (const unsigned char *src1,
b1 = b2;
/* set the destination */
hls_to_rgb (&r1, &g1, &bytes1);
hls_to_rgb (&r1, &g1, &b1);
dest[0] = r1; dest[1] = g1; dest[2] = b1;
@ -4040,11 +4041,11 @@ border_region(PixelRegion *src, gint16 radius)
}
if (radius == 0)
{
char color[] = "\0\0\0";
char color[] = "\0\0\0\0";
color_region(src, color);
return;
}
if (radius == 1) /* optomize this case specificaly */
if (radius == 1) /* optimize this case specifically */
{
guchar *transition;
guchar *source[3];

View file

@ -377,6 +377,7 @@ color_pixels (unsigned char *dest,
register unsigned char c0, c1, c2;
register guint32 *longd, longc;
register guint16 *shortd, shortc;
switch (bytes)
{
case 1:
@ -662,7 +663,7 @@ color_only_pixels (const unsigned char *src1,
b1 = b2;
/* set the destination */
hls_to_rgb (&r1, &g1, &bytes1);
hls_to_rgb (&r1, &g1, &b1);
dest[0] = r1; dest[1] = g1; dest[2] = b1;
@ -4040,11 +4041,11 @@ border_region(PixelRegion *src, gint16 radius)
}
if (radius == 0)
{
char color[] = "\0\0\0";
char color[] = "\0\0\0\0";
color_region(src, color);
return;
}
if (radius == 1) /* optomize this case specificaly */
if (radius == 1) /* optimize this case specifically */
{
guchar *transition;
guchar *source[3];