• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

byte[] to BufferedImage

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.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic