Commit d16097c2 authored by Helvetix Victorinox's avatar Helvetix Victorinox

Fixed another bug in initialising the compositing context for the special

* app/paint-funcs/paint-funcs.c (initial_sub_region): Fixed
  another bug in initialising the compositing context for the
  special case of dissolve mode.  A further attempt to fix bug
  #121438.

* app/composite/gimp-composite-generic.c
  (gimp_composite_dissolve_any_any_any_generic): Fixed bug in
  calculating whether the destination has an alpha channel (or
  not).
parent 5cfcf048
2003-09-05 Helvetix Victorinox <helvetix@gimp.org>
* app/paint-funcs/paint-funcs.c (initial_sub_region): Fixed
another bug in initialising the compositing context for the
special case of dissolve mode. A further attempt to fix bug
#121438.
* app/composite/gimp-composite-generic.c
(gimp_composite_dissolve_any_any_any_generic): Fixed bug in
calculating whether the destination has an alpha channel (or
not).
2003-09-05 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-merge.c (gimp_image_merge_layers): unref
......@@ -989,7 +989,7 @@ gimp_composite_dissolve_any_any_any_generic (GimpCompositeContext * ctx)
gint alpha;
gint b;
gint combined_opacity;
gint db = gimp_composite_pixel_bpp[ctx->pixelformat_B];
gint db;
gint length = ctx->n_pixels;
gint opacity = ctx->dissolve.opacity;
gint sb = gimp_composite_pixel_bpp[ctx->pixelformat_B];
......@@ -999,7 +999,7 @@ gimp_composite_dissolve_any_any_any_generic (GimpCompositeContext * ctx)
gint32 rand_val;
guchar *dest = ctx->D;
guchar *src = ctx->B;
guint has_alpha = gimp_composite_pixel_alpha[ctx->pixelformat_B];
guint has_alpha = gimp_composite_pixel_alphap[ctx->pixelformat_B];
/*
* if destination does not have an alpha channel, add one to it.
......@@ -1008,6 +1008,7 @@ gimp_composite_dissolve_any_any_any_generic (GimpCompositeContext * ctx)
if (!gimp_composite_pixel_alphap[ctx->pixelformat_D]) {
ctx->pixelformat_D = gimp_composite_pixel_alpha[ctx->pixelformat_D];
}
db = gimp_composite_pixel_bpp[ctx->pixelformat_D];
gr = g_rand_new_with_seed(random_table[y % RANDOM_TABLE_SIZE]);
......
......@@ -4320,7 +4320,7 @@ initial_sub_region (struct initial_regions_struct *st,
GimpCompositeContext ctx;
ctx.A = NULL;
ctx.pixelformat_A = GIMP_PIXELFORMAT_ANY;
ctx.pixelformat_A = GIMP_PIXELFORMAT_RGBA8;
ctx.B = s;
ctx.pixelformat_B = (src->bytes == 1 ? GIMP_PIXELFORMAT_V8
......@@ -4329,7 +4329,7 @@ initial_sub_region (struct initial_regions_struct *st,
: src->bytes == 4 ? GIMP_PIXELFORMAT_RGBA8
: GIMP_PIXELFORMAT_ANY);
ctx.D = buf;
ctx.pixelformat_D = gimp_composite_pixel_alpha[ctx.pixelformat_A];
ctx.pixelformat_D = ctx.pixelformat_B;
ctx.M = m;
......@@ -4366,7 +4366,7 @@ initial_sub_region (struct initial_regions_struct *st,
GimpCompositeContext ctx;
ctx.A = NULL;
ctx.pixelformat_A = GIMP_PIXELFORMAT_ANY;
ctx.pixelformat_A = GIMP_PIXELFORMAT_RGBA8;
ctx.B = s;
ctx.pixelformat_B = (src->bytes == 1 ? GIMP_PIXELFORMAT_V8
......@@ -4375,7 +4375,7 @@ initial_sub_region (struct initial_regions_struct *st,
: src->bytes == 4 ? GIMP_PIXELFORMAT_RGBA8
: GIMP_PIXELFORMAT_ANY);
ctx.D = buf;
ctx.pixelformat_D = gimp_composite_pixel_alpha[ctx.pixelformat_A];
ctx.pixelformat_D = ctx.pixelformat_B;
ctx.M = m;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment