Ask Your Question
0

How can I remove the metadata from my image.

asked 2020-05-27 01:54:31 -0500

snsinha gravatar image

updated 2020-06-03 00:12:16 -0500

I know we cannot extract the metadata but is there a way I can remove the metadata using OpenCV

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-05-27 02:57:52 -0500

berak gravatar image

that's really easy:

// load, discarding meta data 
Mat im = imread("some.png");

// save again
imwrite(im, "some.png");
edit flag offensive delete link more

Comments

So majority of images are JPEG.When I convert it to PNG ,the size increases(because PNG is lossless).But when I again convert it to JPEG its double the size of original JPEG.I want to remove the metadata just so the images was lighter.Is there a way out?

snsinha gravatar imagesnsinha ( 2020-06-03 00:11:06 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-27 01:54:31 -0500

Seen: 43 times

Last updated: May 27