In writing some image processing routines in Matlab, I found that I don't know how to write metadata in to a newly processed and saved image. To keep it simple, my flow is as follows:
K>>image = imread('Base_Pic.jpg'); K>>image_info = imfinfo('Base_Pic.jpg');
Process image... Update metadata...
K>>imwrite(image,'Updated_Image.jpg','JPEG','Quality',100);
image = imread('Base_Pic.jpg'); image_info = imfinfo('Base_Pic.jpg'); %Process image... %Update metadata... imwrite(image,'Updated_Image.jpg','JPEG','Quality',100); I basically want the newly processed image to have all the same metadata attributes as the original image, with a few fields updated of course.
How can I append the >>image_info structureimage_info structure to the newly saved JPEGJPEG? Thanks!