Is it possible to do simple string concatenation to ‘join’ 2 base 64 encoded images together if the images have the same characteristics (width/height/color depth etc)?
eg
img1 w=100, h=200
img2 w=100, h=200
img1+img2 results in
img3 w=100, h=400
intuitively this feels like a stupid question since presumably the encoding includes headers containing meta data, but i don’t know enough about base64 to know any better 😉
So far my preliminary tests have yielded broken results.
Thanks,
Eli
You’re right: The content of a
data:URI is the base64 encoded representation of the full image file data, including headers. You won’t have any luck concatenating them that way.The only way that could be possible on client side is using a
Canvas. Here’s a SO question that goes into that direction (it fetches an image into a canvas object).