• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

byte[] to BufferedImage

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing an application that serializes images into an Object as a byte array since the Image is not serializable.

I am dealing with images that is 7000 by 7000. So at I/O processing of deserializing the object from byte[] to BufferedImage, there is a slight delay in processing time. (0.3 seconds).

BufferedImage bimg = ImageIO.read(byteArray);


My question is: Is there a way to process that byte[] to BufferedImage in say 0.1 seconds?


Once the byte[] is in BufferedImage, dealing with the images itself takes no time at all, just the conversion from byte[] to BufferedImage.

Perhaps there's a way to store Image into a serialized object and deserialize it without having to deal with conversions from byte[] to BufferedImage.

I tried overriding the readObject and writeObject when serializing/deserializing and the delay of 0.3 seconds still exists.

That's why I'm making a callout to see if there's an alternative.
reply
    Bookmark Topic Watch Topic
  • New Topic