Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Reading and writing an image file


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 jenny_wui   Members   -  Reputation: 196

Like
0Likes
Like

Posted 24 April 2013 - 03:39 PM

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.



Sponsor:

#2 jHaskell   Members   -  Reputation: 1388

Like
0Likes
Like

Posted 24 April 2013 - 03:43 PM

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?



#3 Paradigm Shifter   Crossbones+   -  Reputation: 5597

Like
2Likes
Like

Posted 24 April 2013 - 03:43 PM

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

#4 jenny_wui   Members   -  Reputation: 196

Like
0Likes
Like

Posted 24 April 2013 - 05:19 PM

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.



#5 0r0d   Members   -  Reputation: 831

Like
0Likes
Like

Posted 24 April 2013 - 07:11 PM

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/



#6 Bacterius   Crossbones+   -  Reputation: 11343

Like
0Likes
Like

Posted 24 April 2013 - 07:24 PM

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.”





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS