Page 1 of 1

Why MagickSetImageVirtualPixelMethod always return 0?

Posted: 2008-11-29T21:24:30-07:00
by smileface
why MagickSetImageVirtualPixelMethod(magick_wand,VirtualPixelMethod) always return 0?

Code: Select all

VirtualPixelMethod vpm=MagickSetImageVirtualPixelMethod(magick_wand,GrayVirtualPixelMethod) ;
printf("%d\n",vpm);
and the result is always print 0,whenever I use GrayVirtualPixelMethod or WhiteVirtualPixelMethod or TransparentVirtualPixelMethod etc enum for the 2nd parameter.

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Posted: 2008-11-29T21:38:27-07:00
by magick
You found a bug. We will have a patch available by sometime tomorrow in ImageMagick 6.4.6-7. Thanks.

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Posted: 2008-11-29T23:02:54-07:00
by smileface
i send a message to u,magick i am waitting for your reply online.
if u could,could u release ImageMagick 6.4.6-7 on Nov 30.I hope i could solve my problem earlier.

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Posted: 2008-11-30T13:01:17-07:00
by el_supremo
I was sure that the function was returning true but when I tested it earlier this morning it was returning false.
I have now installed 6.4.6-7 and tried it again and
MagickSetImageVirtualPixelMethod(mw,TransparentVirtualPixelMethod)
returns false.

Pete

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Posted: 2008-11-30T13:21:16-07:00
by magick
MagickSetImageVirtualPixelMethod() returns the previous setting. The first time its called it returns UndefinedVirtualPixelMethod since that is the default setting. The next time its called it returns whatever setting you supplied in the first call (e.g. TransparentVirtualPixelMethod).

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Posted: 2008-11-30T13:46:11-07:00
by smileface
thanks,it works well:)