Thank you all for the quick responses so far. I will look into your suggestions. However, let me just elaborate on what I really need. Ideally, I'm looking for read and write routines that would take as input a .jpg image and output an array (each pixel is a RGB value); and would take in as input an array and output a .jpg image. Thanks again for the responses. Vinhthuy Phan On Mon, 23 Oct 2000, Marc Lehmann wrote: > On Mon, Oct 23, 2000 at 01:51:20PM -0400, Vinhthuy T Phan <vphan@xxxxxxxxxxxxx> wrote: > > Hello, thanks for your help. > > > > My goal is to extract an array (each entry is a RGB value) out of a .jpg > > file (for my current project). The only way I can think of is to save a > > .jpg file in gimp as a RGB format, then read the file and > > store in an array. Unfortunately, I dont know how to convert a > > .jpg file to a readable RGB format. > > use imagemagick: > > convert img.jpg test.rgb > > (or test.ppm for human-readable format, or ...) > > -- > -----==- | > ----==-- _ | > ---==---(_)__ __ ____ __ Marc Lehmann +-- > --==---/ / _ \/ // /\ \/ / pcg@xxxxxxxxxxxxx |e| > -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ > The choice of a GNU generation | > | >