MagickGetSize always returns 0 height and 0 length
Posted: 2007-01-01T06:18:52-07:00
Hey,
I wanna use MagickGetSize to get the size in pixels of an image in a wand, but the rows and the columns are every time zero.
The output is only: columns: 0 rows: 0
Thx in advance,
Bary
I wanna use MagickGetSize to get the size in pixels of an image in a wand, but the rows and the columns are every time zero.
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <wand/MagickWand.h>
#include <unistd.h>
int main()
{
long colls, rows;
MagickWand *wand;
MagickWandGenesis();
wand = NewMagickWand();
MagickReadImage(wand, "test.jpg");
MagickGetSize(wand, &colls, &rows);
printf("columns: %ld rows: %ld\n", colls, rows);
MagickWandTerminus();
_exit(0);
}
Thx in advance,
Bary