1

I use sockets to send jpg images from server (android) to client. I want to attach timestamps to these images which are of type long. Since these images are already processed by image filters I don't want to save them before transmission, so using ExifInterface seems impossible. I therefore tried to use IIOMetadata but never got it to work. I dont want to use external libs like senselan.

What is the easiest way to do it? If using IIOMetadata is the best way to do it, could you please provide me with a working example on how to attach this to my byte[] and extract it later?

Tim Schulz
  • 49
  • 4

2 Answers2

0

You can send a jpg file and then add 8 bytes to encode the long timestamp, then another jpg and 8 bytes of timestam, and so on.

You can detect the end of the jpeg, using what it is commented here

Detect Eof for JPG images

Community
  • 1
  • 1
  • Thanks Pablo! This is a good idea. However I'd rather not touch the protocol but attach the information to the image, so that it is easier to process the image later. – Tim Schulz Jan 22 '15 at 10:18
0

Okay, I did what Pablo suggested, but attached the timestamp to the front of the image.

Tim Schulz
  • 49
  • 4