The small snippet below creates 1x1 image with one white pixel. I would expect it to print:
Code: Select all
min: 65535.000000, max: 65535.000000
Code: Select all
min: 0.000000, max: 65535.000000
Code: Select all
MagickGetImageRange() gets the range for one or more image channels.
I tried it with different built in images and it always does detect upper bound correctly and sets lower bound to 0.
And here comes full code:
Code: Select all
#include <wand/MagickWand.h>
int main()
{
MagickWandGenesis();
MagickWand* wand = NewMagickWand();
MagickReadImage(wand, "xc:white");
double min, max;
MagickGetImageRange(wand, &min, &max);
printf("min: %f, max: %f\n", min, max);
DestroyMagickWand(wand);
MagickWandTerminus();
return 0;
}