473,394 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

how to get rgbdata

Hi i am a newbie to python and PIL. can anyone tell me how to get
rgbdata from a jpeg image using PIL
as a double[] . is there an equiv method to java's
BufferedImage.getRGB(0,0,width,height,rgbdata,0,wi dth) ?

if anyone can advise pls do
sj

Oct 9 '07 #1
1 1342
sa*********@gmail.com wrote:
Hi i am a newbie to python and PIL. can anyone tell me how to get
rgbdata from a jpeg image using PIL
as a double[] . is there an equiv method to java's
BufferedImage.getRGB(0,0,width,height,rgbdata,0,wi dth) ?
The docs of PIL are quite good. And there you find the method

Image.getdata()

that does what you want. At least in a way, as it returns a slightly
different format (tuples of ints istead of floats), but I presume you can
convert that by yourself.

http://www.pythonware.com/library/pi...book/image.htm
Diez
Oct 9 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: andrew | last post by:
Hi, I have a web service application written in C# .NET 1.1 using MD5CryptoServiceProvider.ComputeHash(Byte) The problem is that after a while(web service processes requests) the call throws...
2
by: pynewbie | last post by:
hi i am a newbie to python..and trying to use it to get data in a jpeg image i can do this in java like FileInputStream fIn = new FileInputStream(filename); JPEGImageDecoder...
3
by: vbnandu86 | last post by:
some of my friends have planned to do A F.R. project using a simple algorithm Eigen Faces usnig Principal Component Analysis( by turk and Petland ) I have used the following code to extract pixel...
1
by: chetanankola | last post by:
BufferedImage image = null; image = ImageIO.read(new File("D:\testimage.jpg")); width=640; height=480; int rgbdata = new int; image.getRGB(0,0,width,height,rgbdata,0,width); bytes = new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.