473,221 Members | 2,075 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,221 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 1336
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: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.