
p{12,34} in an ImageMagick FX expression addresses an absolute pixel coordinate. p[-1,0] addresses a neighbor relative to each current pixel. If an expression fills the result with one repeated source color, inspect braces versus brackets before changing the image dimensions or color profile.
Distinguish an anchor from a neighborhood
An absolute coordinate can intentionally sample one fixed reference location. A relative address moves with the pixel being evaluated, allowing an expression to sample a local neighbor at each output position.
The official FX guide documents column and row addressing and distinguishes relative brackets from absolute braces. These are source-raster addresses, not percentages of a preview window.
Isolate the addressing choice
For a proposed POSIX-shell comparison, use a retained input with visibly varying colors:
magick input.png -fx 'p{12,34}' absolute-reference.png
magick input.png -fx 'p[-1,0]' relative-neighbor.png
These commands have not been executed. Confirm the installed ImageMagick 7 build and shell syntax. Select an input whose dimensions actually include the absolute coordinate; this is not a recipe for discovering an unknown subject's location.
The first expression repeatedly uses the fixed position's channel values. The second samples the left-hand neighbor relative to each evaluated position. Boundary handling needs separate consideration at the left edge.
Keep channel and source identity explicit
FX evaluates channel data; the documented color values are normalized rather than arbitrary display-code integers. A suffix such as .r or .b selects a particular channel value. Decide whether the expression should carry each current channel or deliberately route one channel across the result.
With several source images, also identify which image supplies the sample. A correct absolute coordinate in the wrong source still produces the wrong result.
The Photoshop sampler guide compares point and averaged measurements; it does not define this per-output-pixel sampling expression.
Verify more than one output position
Inspect several recognizable positions and the boundary affected by relative sampling. A single matching pixel cannot distinguish a constant reference fill from a moving neighborhood operation.
If coordinates came from a scaled interface, resolve the source-pixel mapping first. This task closes with an expression whose addressing mode matches the intended mathematical operation. It does not restore hidden detail or claim an executed image transformation.
Related tasks
- Why Does My Image Edit Land in the Wrong Place When I Copy Preview Coordinates?
- Why Does a Photoshop Color Reading Change with Every Pixel?
Sources and scope
- ImageMagick 7 option reference: fx: FX distinguishes absolute p{12,34} from relative p[-1,-1], with normalized channel values and defined source/current-image symbols.
- ImageMagick FX language and source addressing: FX distinguishes absolute p{12,34} from relative p[-1,-1], with normalized channel values and defined source/current-image symbols.
Official ImageMagick 7 documentation was captured October 23, 2026. Examples, calculations and inspections are proposed rather than executed. Confirm installed-build support and shell interpretation before use.
Prepared by Imagild Editorial, the company editorial team responsible for these guides. AI assisted research and drafting. This is documentation-based guidance with proposed examples, not a claim of hands-on testing or an independent product review. Report a correction.
Cover: Paparazzi Ratzfatzzi / Pexels, Pexels License. This is an illustrative source photograph, not an application screenshot or a generated test result.