Skip to content

Commit

Permalink
tiny formatting revision
Browse files Browse the repository at this point in the history
  • Loading branch information
jcupitt committed Feb 24, 2025
1 parent 7228c33 commit 5ca47ef
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions libvips/mosaicing/global_balance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1495,18 +1495,12 @@ vips__build_mosaic(SymbolTable *st, VipsImage *out, transform_fn tfn, void *a)
static int
vips__matrixtranspose(VipsImage *in, VipsImage **out)
{
int yc, xc;

/* Allocate output matrix.
*/
if (!(*out = vips_image_new_matrix(in->Ysize, in->Xsize)))
return -1;

/* Transpose.
*/
for (yc = 0; yc < (*out)->Ysize; ++yc)
for (xc = 0; xc < (*out)->Xsize; ++xc)
*VIPS_MATRIX(*out, xc, yc) = *VIPS_MATRIX(in, yc, xc);
for (int y = 0; y < (*out)->Ysize; y++)
for (int x = 0; x < (*out)->Xsize; x++)
*VIPS_MATRIX(*out, x, y) = *VIPS_MATRIX(in, y, x);

return 0;
}
Expand Down

0 comments on commit 5ca47ef

Please sign in to comment.