473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

getting pixel info from an image file

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
5 2982
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

"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

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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: CoreyMas | last post by:
Hello All, Here is what I would like to do I am creating a game program that displays a map (preferably in hexes but that is another matter) and whenever the user is over the "map" I want to...
2
by: CoreyMas | last post by:
Hello Again, Here is what I want to do: I have an image that is 100 px by 100 px I want to parse each pixel in said image, and store the color of that pixel in a file (the reasons for...
3
by: karimL | last post by:
Hi, how can I retrieve the height and width of a System.Web.UI.WebControls.Image after populating it's ImageUrl property. It's seems not to be filled ? Does someone have a solution ? Thanks...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
1
by: sympatico | last post by:
Hi, I am trying to compare 2 images to check if they are exactly identical (in terms of data), I thought this would be quicker than analysing pixels of the images. I have found lots of examples...
8
by: **Developer** | last post by:
Seems that Dot.net can not handle files of Indexed Pixel Format as well as other types of formats. Given a file or and Image of type Indexed Pixel Format is there a method to convert it to some...
10
by: Lucas | last post by:
I want to change some pixel value in the picture file. how to do it? If I read the file in binary mode, a bit == a pixel ? Thanks
2
by: rghai6 | last post by:
Hi, i've been trying to create a program for implementing high/low pass filters on images. I get the data from a 24 bit .bmp file using the old file handling techniques. The file handling portion...
1
by: ofiras | last post by:
In bitmap, how can I find the nearest pixel (pixel 1) to a specific pixel (pixel 2) that has different color from pixel 2? Or how can I find a pixel in a specific distance from pixel 2 (like a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.