Author: post
Date: 2010-01-16 11:08:20 +0100 (Sat, 16 Jan 2010)
New Revision: 3004
Modified:
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c
Log:
CS-transform: Make a few checks into assertions - we really need to know if
this should ever happend.
Modified:
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c
===================================================================
---
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c
2010-01-16 10:02:07 UTC (rev 3003)
+++
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c
2010-01-16 10:08:20 UTC (rev 3004)
@@ -264,15 +264,14 @@
return;
/* A few sanity checks */
- if (input_image->w != output_image->w)
- return;
- if (input_image->h != output_image->h)
- return;
+ g_assert(input_image->w == output_image->w);
+ g_assert(input_image->h == output_image->h);
/* If input/output-image differ, but colorspace is the same, do a
simple copy */
- else if (input_space == output_space)
+ if (input_space == output_space)
{
/* FIXME: Do some sanity checking! */
+ /* FIXME: Don't assume images have same pitch! */
memcpy(output_image->pixels, input_image->pixels,
input_image->rowstride*input_image->h*2);
}
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit