On Wed, 2002-05-29 at 19:52, Adam Morton wrote:

> You want to "read the RGB pixel values from them and write these to a file"?
> As was already pointed out, that is already what is in the file for some
> graphics formats!  

Yes, I know. But I wanted a way to be format independent and was hoping
for a quick way to do it in Perl. I could do this all in C, but want a
nice way to make my program available to my Windows using colleagues (I
have the idea of building a GUI in).

Plus, I want to learn Perl...

> What is it you are actually trying to accomplish here?

Integrate what I am doing now into one program.

> Maybe you just want to use imagemagick on the command line to convert your
> files to a single format?

Nope, I want to create a program, partly to get to know Perl and partly
to make things very easy for people to use the program. I have to do the
conversion, processing,calculation plotting separately - I'd like a
program to do all of it.

> In any case, image magick (as also previously mentioned) is the way to go.
> Using the perl library (http://www.imagemagick.org/www/perl.html) you just
> have to open the image (the library figures out what format it is
> automagickally), get width and height, then loop through calling pixel and
> writing the results.

I looked through the docs for image magick and found:

pixel[x, y]  string  hex value (e.g. #ccc) at position (x, y) in the
Set() function section, this didn't imply to me that I could read the
value. Am I just missing something, I feel I must be?

Thanks,

Chris.

> > Hi,
> >
> > I'm very new to Perl and have a question that I haven't been able to
> > find an answer to. I want to be able to read an image file (BMP, PNG,
> > JPEG, etc...) or a series if image files and read the RGB pixel values
> > from them and write these to a file.
> >
> > I have looked at various image libraries for Perl and around on the
> > Internet but I have not been able to find a method of doing what I want
> > to do. I'd like to make the program as platform and image independent as
> > possible, hence me trying it in Perl.
> >
> > Could any point me in the right direction or provide a few hints?


-- 
Chris Egan
[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to