Reading and writing an image file

Started by
4 comments, last by Bacterius 10 years, 12 months ago

Hello, I would like to read a png file and display it and then again modify some pixel value and write it back. How can that be done? Pleasse provide some advice.

Advertisement

You want to do this programmatically? If so, what language and Environment?

Or do you want to do this manually, as in some image editing software like Paint, Paint.NET, GIMP, or Photoshop?

libpng http://www.libpng.org/pub/png/libpng.html is probably your best bet.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Thank you very much. I had some mistake. It is a jpg file. I have extracted the header i.e. width and height. Now I would like to read the pixel and display it. Please provide me some suggestion. Thanks.

Thank you very much. I had some mistake. It is a jpg file. I have extracted the header i.e. width and height. Now I would like to read the pixel and display it. Please provide me some suggestion. Thanks.

Go here:

http://www.ijg.org/

The JPEG spec is kind of tricky to implement, so unless you really want to know how it works, I'd suggest using an existing library to read and write JPG files.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

This topic is closed to new replies.

Advertisement