Page 1 of 1

center of axis for x,y

Posted: 2012-01-23T08:44:31-07:00
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?

Re: center of axis for x,y

Posted: 2012-01-23T12:26:28-07:00
by fmw42
top left corner. X increase to the right, Y increases downward.

Re: center of axis for x,y

Posted: 2012-01-25T21:32:53-07:00
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.