Android Question Appending Bytes from multiple JPEG's

Tyler

Member
Licensed User
Longtime User
Would it be possible to append the resulting Bytes from a camera image to an existing .JPG file and have the pics both show, linked either vertically or horizontally but in a single .JPG if that makes any sense. Might be a dumb question but thanks for any insight!
 

JordiCP

Expert
Licensed User
Longtime User
I would use a canvas and draw both pictures in it, arranged as you want (horizontally or vertically)
 
Upvote 0

Tyler

Member
Licensed User
Longtime User
So, same concept but using canvas? Something to the affect of

B4X:
Canvas1.Bitmap.WriteToStream(Image A params)
Canvas1.Bitmap.WriteToStream(Image B params)

Would work?

Thanks again for the replies:)
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
The trick is to "paint" both pictures on one canvas and the store the canvas as one new picture containing both.

A JPG is a structured data object. You cant just append some bytes to an existing. Merging two jpg's bytewise will need a deep knowlege of the jpeg format: https://en.wikipedia.org/wiki/JPEG
 
Upvote 0
Top