[Rawstudio-commit] r1173 - trunk/src
Anders Brander
anders at brander.dk
Fri Feb 23 02:56:30 CET 2007
Author: abrander
Date: 2007-02-23 02:56:30 +0100 (Fri, 23 Feb 2007)
New Revision: 1173
Modified:
trunk/src/rs-image.c
Log:
Now allocates new images as black.
Modified: trunk/src/rs-image.c
===================================================================
--- trunk/src/rs-image.c 2007-02-22 22:10:33 UTC (rev 1172)
+++ trunk/src/rs-image.c 2007-02-23 01:56:30 UTC (rev 1173)
@@ -535,7 +535,7 @@
rsi->channels = channels;
rsi->pixelsize = pixelsize;
ORIENTATION_RESET(rsi->orientation);
- rsi->pixels = (gushort *) g_malloc(sizeof(gushort)*rsi->h*rsi->rowstride);
+ rsi->pixels = g_new0(gushort, rsi->h*rsi->rowstride);
return(rsi);
}
@@ -576,7 +576,7 @@
{
rsi->image = NULL;
rsi->rowstride = PITCH(width) * pixelsize;
- rsi->pixels = (guchar *) g_malloc(sizeof(guchar)*rsi->h*rsi->rowstride);
+ rsi->pixels = g_new0(guchar, rsi->h*rsi->rowstride);
rsi->channels = channels;
rsi->pixelsize = pixelsize;
}
More information about the Rawstudio-commit
mailing list