Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Swing / AWT / SWT and the fly likes image format from a byte array ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "image format from a byte array ?" Watch "image format from a byte array ?" New topic

image format from a byte array ?

Titus Abraham
Ranch Hand

Joined: Jun 03, 2009
Posts: 36
hello ,

given a byte array is there any way we can know whats the image format ?

as i am getting data from the server in byte format only.

Best regards,
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41089
The ImageInfo class could be adapted to work with byte[], assuming it covers the formats you need to deal with.

Ping & DNS - my free Android networking tools app
It is sorta covered in the JavaRanch Style Guide.
subject: image format from a byte array ?
Similar Threads
Image object to png Image format
CoreJ2Me Book examples
displaying pdf image
create ImageIcon from bytes[], not from file
checking for iso 19794-4 format