Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I save an Image file to disk in JPG or GIF format?

disk file format GIF image jpg
0
Posted

How can I save an Image file to disk in JPG or GIF format?

0

• If you have an Image and you want a JPG in a file, download James Weeks’s code from http://www.obrador.com/essentialjpeg/ • Sean Breslin also wrote a program that compresses a Java Image into a JPEG file. http://www.afu.com/jpeg.txt • If you just want to convert some file, a non-Java solution is to use the standard IJG ‘cjpeg’ utility. It supports GIF, PPM, BMP, PNG and Targa input files. • If you have an Image and you want a GIF or PPM in a file, download Jef Poskanzer’s abstract ImageEncoder class at http://www.acme.com/java/software/ • (Sect. 14) What causes this problem: $ appletviewer m.html Premature end of JPEG file sun.awt.image.Im…Exception: JPEG datastream contains no image at sun.awt.image. … .produceImage(JPEGImageDecoder.java:133) at sun.awt.image.Inpu…mageSource.doFetch( InputStreamImageSource.java:215) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:98) There’s a known bug in early releases of the JDK which can cause the above failure when reading a JPEG acro

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123