-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri 16 August 2002 8:40 am, Damian G wrote:
> i need a suggestion on programming languages.
>
> this is how it goes.
>
> i need to build a program that can tell me the RGB value
> of a given pixel inside of an image file. that is, load
> a graphic from file, and reading color values from it
> regardless of whether it's showing on the screen or not.
>
> i've tried kylix Open edition, but it fails to do it
> ( probably buggy libs ) as it loads and displays a
> graphic correctly on the form but when i try to
> read a pixel from it... the RGB value i get is wrong
> ( i think it's getting converted to 8-bit palette )
>
> while the same code does run correctly on windoze's Delphi 5,
> ( so much for cross-plattform programming ) i hate having
> to reboot my computer ( or even loading a virtual machine )
> just for the sole purpose of barfing fome clumsy lines of
> code -besides i'd like the linux binary- , so i've decided that
> i need to learn something other than pascal for killing time...
>
>
> can anyone recommend me a programming language that allows
> me to do this pixel-reading stuff and is as simple as possible?
> ( i will have to learn C sometime, but for the moment i think
> is a bit overkill... is there a choice? )

Python will do very nicely; it's installed by default and the command line is 
'just there'. I strongly recommend it as a grievously underestimated 
language.

A good place to get started is at O'Reilly:

http://www.onlamp.com/python/

You'll need to include a graphics manipulation library. I haven't used it in 
anger, but the Python Image Library:

http://www.pythonware.com/products/pil/index.htm

certainly does what you need, according to the online manual (see the getpixel 
method)!

Alastair
- -- 
Alastair Scott (London, United Kingdom)
http://www.unmetered.org.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9XLDXdasIDb/2nMwRAiQSAJsFeQs/nIrpUwyllGJ7ib8HB74g4QCdELLj
PN47BOPxA1Kkj1FiNWaa0sM=
=I/Ju
-----END PGP SIGNATURE-----


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to