• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get format / mime type (eg. PNG, JPG) of a buffered image

 
Rohit Kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to get format or mime type (eg. PNG or JPG) of a buffered image?
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. The simple reason is, a BufferedImage is detached from stuff like file types and mime types. It's in memory, and that's it.

You can get the mime type of files or streams though. Check out this link.
 
Darryl Burke
Bartender
Posts: 5131
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just another cross poster.
http://forums.sun.com/thread.jspa?threadID=5354932
http://forums.sun.com/thread.jspa?threadID=5354933
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Be Forthright When Cross Posting To Other Sites.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic