I'm writing a project where I need to transfer a set of similar images over the net. To speed things up, I thought about doing what most movie codecs do. having keyframes and then just send the changes.
Now, what I got is a set of BufferedImage
s so in an analogy to text file I basically just want to diff them and send the patch.
However I've never really worked with images before so if I will do this, it will be rather crappy.
So, what's the best way of implementing something like this, or is there already an good implementation for something like this?
I guess storing the images in a byte array and binary diff them wont be very effective.
Edit: I need to stream this the images. Edit2: It's not so much about the specifics of the implementation it's more: what is the most efficient idea for an algorithm. Like only work with 5px chunks and not ignore a px if it has only changed so little the eye won't notice (I can live with some quality loss)