Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:29:19+00:00 2026-06-03T22:29:19+00:00

Guys. I use getpixel & getdata to retrieve data from the same pic.but some

  • 0

Guys.
I use getpixel & getdata to retrieve data from the same pic.but some points are different.
why?

im = Image.open("cljr.jpg") 
t=list(im.getdata())
for i in range(10):
    print "%d %x %x %x"%(i,t[i][0],t[i][1],t[i][2])

print '' 

print "%x %x %x"% im.getpixel((0,7))
print "%x %x %x"% im.getpixel((0,8))

and here is the output:

0 ec f7 f9
1 ec f7 f9
2 ec f7 f9
3 ec f7 f9
4 ec f7 f9
5 ec f7 f9
6 ec f7 f9
7 ec f7 f9
8 eb f6 f8
9 eb f6 f8

ec f7 f9
ed f8 fa
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:29:21+00:00Added an answer on June 3, 2026 at 10:29 pm

    From this, you can see that im.getdata is ordered in column-major and im.getpixel will be row-major.

    >>> import Image
    >>> import numpy as np
    >>> x = np.array([[1., 2.], [3., 4.]])
    >>> im = Image.fromarray(x)
    >>> list(im.getdata())
    [1.0, 2.0, 3.0, 4.0]
    >>> [im.getpixel(x) for x in [(0,0), (0,1), (1,0), (1,1)]]
    [1.0, 3.0, 2.0, 4.0]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

some guys use a firewall on their laptops which not only blocks their own
Which libraries do you guys use for generic data structures like linked list, binary
Hey guys i'm trying to use drawString() function to draw the result from a
Hi guys can I use Visual Studio 2010 express edition to create a telco-grade
Hey guys i want to use the jquery Autocomplete plugin and instead of separating
Would you guys say that the use of mocks is better than not using
What do you guys use for debugging in ruby 1.9? rdebug doesn't seem to
Just wondering which Xcode syntax colouring 'theme' all you guys use, and why??
Until BCL finally ships System.Numeric.BigInt , what do you guys use for arbitrary precision
Two scenarios for you guys: 1: I use Netbeans with the built in sftp.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.