
Signature
Knute Johnson
email s/nospam/knute/
>> please give source code or method to convert raw or PGM to JPG,PNG
>> format.
>> this is one of my module in academic project.
>
> http://netpbm.sourceforge.net/doc/pgm.html
Or, if you are on linux and have appropriate man pages, man pgm.
PNG specification can be obtained from
http://www.w3.org/TR/2003/REC-PNG-20031110/, JPG from
http://www.digicamsoft.com/itu/itu-t81-1.html, GIF from
http://www.w3.org/Graphics/GIF/spec-gif89a.txt, and Windows' BMP from
http://www.digicamsoft.com/bmp/bmp.html. For more information, Wikipedia
has detailed information and a list of relevant links (the sources for
those I gave you).
Alternatively, reading up on javax.imageio could save the trouble of
reading/writing PNG, JPG, GIF, and BMP for you, although you'll have to
still churn PGM yourself.
As a final note, I don't give out source code for how to do XXX unless
I'm fixing someone else's code. It's better to work it out on your own
with occasional guidance.