Re: Getting the color of a pixel
Posted: 2018-09-20T17:17:39-07:00
We can also use expressions for the coordinates, eg:
"hex:" also works for me. In Windows, "#" isn't a special character so we don't need quotes (but they are harmless). What are the tradeoffs for "hex:" versus "pixel:"? "Hex:" always rounds HDRI values to integers, and clamps values, eg:
Any other difference between "hex:" and "pixel:"?
Code: Select all
-transparent %[pixel:p{0,h-1}]
Code: Select all
f:\web\im>%IMG7%magick xc:gray(150%) -format %[pixel:p{0,0}] info:
gray(150%)
f:\web\im>%IMG7%magick xc:gray(150%) -format #%[hex:p{0,0}] info:
#FFFFFFFFFFFF