babl r355 - in trunk: . babl/base extensions
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: babl r355 - in trunk: . babl/base extensions
- Date: Sun, 16 Nov 2008 12:12:20 +0000 (UTC)
Author: martinn
Date: Sun Nov 16 12:12:19 2008
New Revision: 355
URL: http://svn.gnome.org/viewvc/babl?rev=355&view=rev
Log:
* extensions/gegl-fixups.c (conv_rgbAF_sdl32)
* babl/base/model-gray.c (premultiplied_to_non_premultiplied):
Make un-pre-multiplication with close-to-zero alpha values result
in complete black instead of a bit brigher than black.
Modified:
trunk/ChangeLog
trunk/babl/base/model-gray.c
trunk/extensions/gegl-fixups.c
Modified: trunk/babl/base/model-gray.c
==============================================================================
--- trunk/babl/base/model-gray.c (original)
+++ trunk/babl/base/model-gray.c Sun Nov 16 12:12:19 2008
@@ -414,7 +414,7 @@
}
else
{
- *(double *) dst[band] = 0.001;
+ *(double *) dst[band] = 0.0;
}
}
*(double *) dst[dst_bands - 1] = alpha;
Modified: trunk/extensions/gegl-fixups.c
==============================================================================
--- trunk/extensions/gegl-fixups.c (original)
+++ trunk/extensions/gegl-fixups.c Sun Nov 16 12:12:19 2008
@@ -333,18 +333,14 @@
{
int i;
float alpha = src[3];
- if (alpha < 0.0001)
- alpha = 0.0001;
for (i = 0; i < 3; i++)
{
float ca = src[i];
- float c;
int ret;
- c = ca / alpha;
- if (alpha == 0.0)
+ if (alpha < 0.0001)
ret = 0;
else
- ret = table_F_8g[gggl_float_to_index16 (c)];
+ ret = table_F_8g[gggl_float_to_index16 (ca / alpha)];
if (ret <= 0)
dst[i] = 0;
else if (ret > 255)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]