Tux

...making Linux just a little more fun!

PPM Image Reader in C

Amit Kumar Saha [amitsaha.in at gmail.com]


Fri, 17 Aug 2007 11:47:38 +0530

Hi all,

Has anyone got a "ready-made" PPM image reading program in C? I have to meet a deadline for a project, so it would really be useful if anyone could provide me with such a program.

Thanks

-- 
Amit Kumar Saha
[URL]:http://amitsaha.in.googlepages.com

Top    Back


Thomas Adam [thomas at edulinux.homeunix.org]


Fri, 17 Aug 2007 07:24:09 +0100

On Fri, Aug 17, 2007 at 11:47:38AM +0530, Amit Kumar Saha wrote:

> Hi all,
> 
> Has anyone got a "ready-made" PPM image reading program in C? I have to meet
> a deadline for a project, so it would really be useful if anyone could
> provide me with such a program.

Can't you just use display(1) from imagemagick?

-- Thomas Adam

-- 
"He wants you back, he screams into the night air, like a fireman going
through a window that has no fire." -- Mike Myers, "This Poem Sucks".

Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]


Fri, 17 Aug 2007 12:05:23 +0530

Hello,

On Fri, 17 Aug 2007, Amit Kumar Saha wrote:

> Has anyone got a "ready-made" PPM image reading program in C? I have to meet
> a deadline for a project, so it would really be useful if anyone could
> provide me with such a program.

It is not clear what you want/need. What is wrong with "open" (as in the standard C library function to open a file and read it?

Probably you want the image to be read into a different format. So unless the format is specified the question is not meaningful.

Kapil. --


Top    Back


Amit Kumar Saha [amitsaha.in at gmail.com]


Fri, 17 Aug 2007 12:12:27 +0530

On 8/17/07, Kapil Hari Paranjape <kapil@imsc.res.in> wrote:

>
> Hello,
>
> On Fri, 17 Aug 2007, Amit Kumar Saha wrote:
> > Has anyone got a "ready-made" PPM image reading program in C? I have to
> meet
> > a deadline for a project, so it would really be useful if anyone could
> > provide me with such a program.
>
> It is not clear what you want/need. What is wrong with "open" (as in
> the standard C library function to open a file and read it?

I am using "open", but just that I am getting terribly messed up with the character encodings, Image header, etc.

Probably you want the image to be read into a different format. So

> unless the format is specified the question is not meaningful.

Basically what I want is access to the individual pixels of the image for a image filtering operation

Hope that information will enable you to help me!

Thanks

-- 
Amit Kumar Saha
[URL]:http://amitsaha.in.googlepages.com

Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]


Fri, 17 Aug 2007 12:37:41 +0530

Hello,

On Fri, 17 Aug 2007, Amit Kumar Saha wrote:

> I am using "open", but just that I am getting terribly messed up with the
> character encodings, Image header, etc.
> Basically what I want is access to the individual pixels of the image for a
> image filtering operation

Sorry to be so obtuse to begin with. Anyway, you are probably look for the netpbm library which does all these things and more.

Regards,

Kapil. --


Top    Back


Amit Kumar Saha [amitsaha.in at gmail.com]


Fri, 17 Aug 2007 12:42:02 +0530

Hi Kapil,

On 8/17/07, Kapil Hari Paranjape <kapil@imsc.res.in> wrote:

>
>
> Sorry to be so obtuse to begin with. Anyway, you are probably look
> for the netpbm library which does all these things and more.

Yeah. I was trying to first flirt with the libraries, but as I told earlier I am fighting hard to meet a deadline for a publication. So i thought I will just use the C library for working with Images.

Anyways thanks for the info!

Regards

-- 
Amit Kumar Saha
[URL]:http://amitsaha.in.googlepages.com

Top    Back