Infos about virtual-pixel method tile

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
gubach
Posts: 45
Joined: 2013-12-13T11:13:29-07:00
Authentication code: 6789

Infos about virtual-pixel method tile

Post 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!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Infos about virtual-pixel method tile

Post 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
snibgo's IM pages: im.snibgo.com
gubach
Posts: 45
Joined: 2013-12-13T11:13:29-07:00
Authentication code: 6789

Re: Infos about virtual-pixel method tile

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Infos about virtual-pixel method tile

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Infos about virtual-pixel method tile

Post by magick »

Virtual pixels respects the image mask in ImageMagick 7, but not in the ImageMagick 6 series.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Infos about virtual-pixel method tile

Post by snibgo »

magick wrote:Virtual pixels respects the image mask in ImageMagick 7 ...
Ah, I didn't know that, thanks.
snibgo's IM pages: im.snibgo.com
Post Reply