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: 39
Joined: 2013-12-13T11:13:29-07:00
Authentication code: 6789

Infos about virtual-pixel method tile

Post by gubach » 2017-03-06T04:25:09-07:00

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

Re: Infos about virtual-pixel method tile

Post by snibgo » 2017-03-06T08:59:13-07:00

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: 39
Joined: 2013-12-13T11:13:29-07:00
Authentication code: 6789

Re: Infos about virtual-pixel method tile

Post by gubach » 2017-03-07T05:44:50-07:00

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

Re: Infos about virtual-pixel method tile

Post by snibgo » 2017-03-07T09:52:41-07:00

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: 11015
Joined: 2003-05-31T11:32:55-07:00

Re: Infos about virtual-pixel method tile

Post by magick » 2017-03-07T11:25:28-07:00

Virtual pixels respects the image mask in ImageMagick 7, but not in the ImageMagick 6 series.

snibgo
Posts: 11913
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Infos about virtual-pixel method tile

Post by snibgo » 2017-03-07T11:49:00-07:00

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