Why MagickSetImageVirtualPixelMethod always return 0?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
smileface

Why MagickSetImageVirtualPixelMethod always return 0?

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Post by magick »

You found a bug. We will have a patch available by sometime tomorrow in ImageMagick 6.4.6-7. Thanks.
smileface

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Post 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.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Post 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).
smileface

Re: Why MagickSetImageVirtualPixelMethod always return 0?

Post by smileface »

thanks,it works well:)
Post Reply