By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,305 Members | 1,704 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,305 IT Pros & Developers. It's quick & easy.

getting pixel info from an image file

P: n/a
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
Jul 22 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
cppaddict wrote:
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


Try http://www.dcs.ed.ac.uk/home/mxr/gfx/2d-hi.html
Jacques.
Jul 22 '05 #2

P: n/a

"cppaddict" <he***@hello.com> wrote in message
news:cg********************************@4ax.com...
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
Jul 22 '05 #3

P: n/a

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

Jul 22 '05 #4

P: n/a

"cppaddict" <he***@hello.com> wrote in message
news:j0********************************@4ax.com...

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

I'm not aware of any free libraries that support this. The notorious patentthat 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 youwould be breaking the law unless you paid a royalty to Unisys. However thatpatent has now expired in the US although it remains in force in other partsof 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


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
Jul 22 '05 #5

P: n/a
Hi,

you can use Magick++, there are a lot of read, write and modify
functions available. See http://www.imagemagick.org/

Thomas
Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.