plug-ins: fix indentation b0rk from previous commit

This commit is contained in:
Michael Natterer 2012-01-31 21:28:12 +01:00
parent 2871093626
commit 9a4abedb98
1 changed files with 28 additions and 28 deletions

View File

@ -689,41 +689,41 @@ ReadImage (FILE *fd,
(gdouble) max_progress); (gdouble) max_progress);
} }
if (channels == 4) if (channels == 4)
{ {
gboolean has_alpha = FALSE; gboolean has_alpha = FALSE;
/* at least one pixel should have nonzero alpha */ /* at least one pixel should have nonzero alpha */
for (ypos = 0; ypos < height; ypos++) for (ypos = 0; ypos < height; ypos++)
{
temp = dest + (ypos * rowstride);
for (xpos = 0; xpos < width; xpos++)
{
if (temp[3])
{ {
has_alpha = TRUE; temp = dest + (ypos * rowstride);
break; for (xpos = 0; xpos < width; xpos++)
{
if (temp[3])
{
has_alpha = TRUE;
break;
}
temp += 4;
}
if (has_alpha)
break;
} }
temp += 4;
}
if (has_alpha)
break;
}
/* workaround unwanted behaviour when all alpha pixels are zero */ /* workaround unwanted behaviour when all alpha pixels are zero */
if (!has_alpha) if (!has_alpha)
{
for (ypos = 0; ypos < height; ypos++)
{
temp = dest + (ypos * rowstride);
for (xpos = 0; xpos < width; xpos++)
{ {
temp[3] = 255; for (ypos = 0; ypos < height; ypos++)
temp += 4; {
temp = dest + (ypos * rowstride);
for (xpos = 0; xpos < width; xpos++)
{
temp[3] = 255;
temp += 4;
}
}
} }
} }
}
}
} }
break; break;