getting pixel info from an image file

Discussion in 'C++' started by cppaddict, May 8, 2004.

  1. cppaddict

    cppaddict Guest

    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
    cppaddict, May 8, 2004
    #1
    1. Advertising

  2. 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.
    Jacques Labuschagne, May 8, 2004
    #2
    1. Advertising

  3. [OT] Re: getting pixel info from an image file

    "cppaddict" <> wrote in message
    news:...
    > 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
    John Harrison, May 8, 2004
    #3
  4. cppaddict

    cppaddict Guest

    Re: [OT] Re: getting pixel info from an image file


    >
    >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
    cppaddict, May 8, 2004
    #4
  5. Re: [OT] Re: getting pixel info from an image file

    "cppaddict" <> wrote in message
    news:...
    >
    > >
    > >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
    >


    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
    John Harrison, May 8, 2004
    #5
  6. cppaddict

    Thomas Lempa Guest

    Re: [OT] Re: getting pixel info from an image file

    Hi,

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

    Thomas
    Thomas Lempa, May 24, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rfractal30
    Replies:
    5
    Views:
    6,919
    rfractal30
    Mar 6, 2005
  2. André Wagner

    Fastest pixel by pixel operation

    André Wagner, Mar 17, 2008, in forum: Java
    Replies:
    12
    Views:
    1,037
    Larry A Barowski
    Mar 19, 2008
  3. jimgardener
    Replies:
    1
    Views:
    353
    Knute Johnson
    Jul 8, 2008
  4. jimgardener
    Replies:
    3
    Views:
    330
  5. Neraph

    getting pixel colors from an image?

    Neraph, Feb 14, 2006, in forum: Javascript
    Replies:
    3
    Views:
    167
    Thomas 'PointedEars' Lahn
    Feb 14, 2006
Loading...

Share This Page