You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should it be possible to use -strip and -profile together to remove all EXIF data, but keep the profile?
The usecase is to use ImageMagick (actually the PHP imagick extension, but the same issue seems to apply to the CLI) to resize images and at the same time stripping potentially sensitive data from the image in the context of a CMS (as in Content Management System).
The issue is that the -profile option seems to be ignored when used after the -strip option when producing a PNG file:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
ImageMagick version
ImageMagick 6.9.11-60
Operating system, version and so on
Ubuntu 22.04.2 LTS
Description
Should it be possible to use
-strip
and-profile
together to remove all EXIF data, but keep the profile?The usecase is to use ImageMagick (actually the PHP imagick extension, but the same issue seems to apply to the CLI) to resize images and at the same time stripping potentially sensitive data from the image in the context of a CMS (as in Content Management System).
The issue is that the
-profile
option seems to be ignored when used after the-strip
option when producing a PNG file:Works for JPG files:
Doesn't work for PNG files:
For PNGs the
-profile
option seems to work when used without-strip
:But this needs to encode the image twice, which isn't ideal in the context of a web request.
Is there maybe a workaround which doesn't involve encoding the image twice and doesn't rely on a third party tool (like Exiftool)?
Here are the sample files:
Beta Was this translation helpful? Give feedback.
All reactions