Page 1 of 1

Infos about virtual-pixel method tile

Posted: 2017-03-06T04:25:09-07:00
by gubach
I am interested in the virtual-pixel method tile (and perhaps mirror) and I would like to look at algorithms and/or source code. Can anyone help? Thank you very much!

Re: Infos about virtual-pixel method tile

Posted: 2017-03-06T08:59:13-07:00
by snibgo
The virtual pixel methods are used in GetVirtualPixelsFromNexus() in cache.c. The v7 source for that in github is at https://github.com/ImageMagick/ImageMag ... re/cache.c

Re: Infos about virtual-pixel method tile

Posted: 2017-03-07T05:44:50-07:00
by gubach
Thanks for the link. I am interested how the algo identifies pixel that should be set/changed via a virtual pixel method (VPM). Is it possible to externalize those pixels given the following task: Given are an image I and a grayscale mask M with the same h x w. Task: Change all pixel coordinates in I with a VPM whose corresponding coordinates in M are non-white.

Re: Infos about virtual-pixel method tile

Posted: 2017-03-07T09:52:41-07:00
by snibgo
VPMs are about what happens when a program reads an image coordinate that is outside the image boundary. For some VPMs, it will transform the coordinates to be inside the image, and read that pixel.

VPMs don't use a mask.

I don't understand what you want to do.

Re: Infos about virtual-pixel method tile

Posted: 2017-03-07T11:25:28-07:00
by magick
Virtual pixels respects the image mask in ImageMagick 7, but not in the ImageMagick 6 series.

Re: Infos about virtual-pixel method tile

Posted: 2017-03-07T11:49:00-07:00
by snibgo
magick wrote:Virtual pixels respects the image mask in ImageMagick 7 ...
Ah, I didn't know that, thanks.