Jump to content

  • Log In with Google      Sign In   
  • Create Account

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: 1023

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: 5370

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: 819

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: 8828

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.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis





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