The PerlMagick library appears to have a very mis-matched binding for the LevelColors call, or least differs from the online documentation:
Magick.xs: Line 525:
Code: Select all
{ "LevelColors", { {"invert", MagickBooleanOptions},
{"black-point", RealReference}, {"white-point", RealReference},
{"channel", MagickChannelOptions}, {"invert", MagickBooleanOptions} } },
In addition: Line 10499
Code: Select all
case 129: /* LevelColors */
{
MagickPixelPacket
black_point,
white_point;
(void) QueryMagickColor("#000000",&black_point,exception);
(void) QueryMagickColor("#ffffff",&black_point,exception);
With this configuration I can't find a way to run level colors without getting this exception:
Code: Select all
$image->LevelColors('black-point' => "#ff0000", 'white-point' => '#ffffff');
Code: Select all
magick/color.c:2542: QueryMagickColorCompliance: Assertion `name != (const char *) ((void *)0)' failed.
Thanks
Jonathan