garbage collecting again
This commit is contained in:
@@ -100,22 +100,18 @@ Image_noise(Image_Desc *source, Image_Desc *but, int intensite)
|
||||
{
|
||||
int x, y, r, g, b, foo;
|
||||
|
||||
if ( (foo=Image_compare_desc(source, but)) )
|
||||
{
|
||||
fprintf(stderr, "%s : images are differents %d\n", __func__, foo);
|
||||
return foo;
|
||||
}
|
||||
if ( (foo=Image_compare_desc(source, but)) ) {
|
||||
fprintf(stderr, "%s : images are differents %d\n", __func__, foo);
|
||||
return foo;
|
||||
}
|
||||
|
||||
if (intensite < 1)
|
||||
{
|
||||
fprintf(stderr, "%s : bad intensity %d\n", __func__, intensite);
|
||||
intensite = 1;
|
||||
}
|
||||
if (intensite < 1) {
|
||||
fprintf(stderr, "%s : bad intensity %d\n", __func__, intensite);
|
||||
intensite = 1;
|
||||
}
|
||||
|
||||
for (x=0; x<source->width; x++)
|
||||
{
|
||||
for (y=0; y<source->height; y++)
|
||||
{
|
||||
for (x=0; x<source->width; x++) {
|
||||
for (y=0; y<source->height; y++) {
|
||||
r = Image_clamp_pixel((source->Rpix[y])[x]
|
||||
+ (rand()%intensite) - (intensite/2));
|
||||
g = Image_clamp_pixel((source->Gpix[y])[x]
|
||||
|
||||
Reference in New Issue
Block a user