fix a bug in rotate_90
This commit is contained in:
@@ -15,7 +15,7 @@ extern int verbosity;
|
||||
int fimg_rotate_90(FloatImg *src, FloatImg *dst, int notused)
|
||||
{
|
||||
int foo;
|
||||
int x, y;
|
||||
int x, y, j, k;
|
||||
float rgb[3];
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
@@ -56,7 +56,12 @@ if ( (src->type != dst->type) ||
|
||||
for (y=0; y<src->height; y++) {
|
||||
for (x=0; x<src->width; x++) {
|
||||
fimg_get_rgb(src, x, y, rgb);
|
||||
fimg_put_rgb(dst, y, x, rgb);
|
||||
j = (dst->height - x) - 1;
|
||||
k = (dst->width - y) - 1;
|
||||
#if DEBUG_LEVEL > 1
|
||||
fprintf(stderr, "%6d %6d\n", k, j);
|
||||
#endif
|
||||
fimg_put_rgb(dst, k, x, rgb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user