• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPEGImageEncoder problem

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am seeing the following problem using JPEGImageEncoder to create a .jpg file: If I try to view the created .jpg file with MS Photo Editor, I see a 'Error Reading File' error box pop up. The image is viewable if I use a Java program to view it. Does anyone know what is going on here?
Thanks in advance...
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"WoodChucker" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

If you could post the code where you set up your JPEGEncoder and write to it (along with creating a BufferedImage, if you are using one) it would help a lot. It may be that the encoding params on the JPEG are something that is not recognized by MS Photo Editor... have you tried opening it in a browser?

This example code generates an image that I can open in MS Photo Editor... see if you can, too...


Thanks! and welcome to the JavaRanch!
 
reply
    Bookmark Topic Watch Topic
  • New Topic