getting pixel info from an image file

C

cppaddict

Hi,

Is there way to read in a .gif image file as a two-dimensional array
of pixel values? If not in the C++ standard library, does anyone know
of a free library that supports this?

Thanks,
cpp
 
J

John Harrison

cppaddict said:
Hi,

Is there way to read in a .gif image file as a two-dimensional array
of pixel values? If not in the C++ standard library, does anyone know
of a free library that supports this?

It's not in the C++ standard library which has no graphics capabilities at
all.

I'm not aware of any free libraries that support this. The notorious patent
that was claimed by Unisys over the GIF file format prevented the
development of these. Even if you were to write your own code to do this you
would be breaking the law unless you paid a royalty to Unisys. However that
patent has now expired in the US although it remains in force in other parts
of the world.

Suggest you use PNG instead if possible.

john
 
C

cppaddict

It's not in the C++ standard library which has no graphics capabilities at
all.

I'm not aware of any free libraries that support this. The notorious patent
that was claimed by Unisys over the GIF file format prevented the
development of these. Even if you were to write your own code to do this you
would be breaking the law unless you paid a royalty to Unisys. However that
patent has now expired in the US although it remains in force in other parts
of the world.

Suggest you use PNG instead if possible.

john

John,

Thanks. Two things:

1. Using PNG is fine. In fact, I can use any file format I want.
But where can I find a library/tutorial on how to do what I'm
describing?

2. You marked this post as OT. Where would be a better place to ask
this question?

Thanks again,
cpp
 
J

John Harrison

cppaddict said:
John,

Thanks. Two things:

1. Using PNG is fine. In fact, I can use any file format I want.
But where can I find a library/tutorial on how to do what I'm
describing?

2. You marked this post as OT. Where would be a better place to ask
this question?

Thanks again,
cpp

Everything about PNG can be found here

http://www.libpng.org/pub/png/libpng.html

didn't see any tutorials but there are certainly manuals.

There's a mailing list on the site above, that would be a good place for
questions about PNG, alternatively you could try a newsgroup with graphics
in its name, comp.graphics.algorithms perhaps (don't take that as a
recommendation, I've never used that group).

john
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top