center of axis for x,y

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
eryd
Posts: 1
Joined: 2012-01-19T17:36:37-07:00
Authentication code: 8675308

center of axis for x,y

Post by eryd »

Hello All,

I am trying to report the rgb values of every pixel in a JPG file. I use the following command:

Code: Select all

convert [filename] txt:-
It will report something like:

Code: Select all

# ImageMagick pixel enumeration: 5616,3744,255,rgb
0,0: (107,111,110)  #6B6F6E  rgb(107,111,110)
1,0: (108,112,111)  #6C706F  rgb(108,112,111)
2,0: (108,113,109)  #6C716D  rgb(108,113,109)
3,0: (109,114,110)  #6D726E  rgb(109,114,110)
4,0: (110,115,109)  #6E736D  rgb(110,115,109)
5,0: (111,116,110)  #6F746E  rgb(111,116,110)
My question is: where is (0,0) located? Bottom left corner of the picture?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: center of axis for x,y

Post by fmw42 »

top left corner. X increase to the right, Y increases downward.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: center of axis for x,y

Post by anthony »

This is the coordinate direction use by ALL IM operators.

Though having Y axis increasing in a downward directly does result in 'rotate' angles being clock-wise rather than counter-clockwise as you may expect in mathematical operations.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply