gm
gm copied to clipboard
autoOrient strips profiles
When using autoOrient all profile-data is being stripped.
gm(path).autoOrient().options({ imageMagick : true }).write(path, function(err) {});
Is this a bug, or how can one prevent profiles (e.g. exif-data) from being lost?
From the GraphicsMagick Documentation: "GraphicsMagick does not include an EXIF editor"
Since GraphicsMagick doesn't support this you'll have to find another way to write EXIF data.
And what about when using gm with imagemagick ? I can see that it's also running with -strip
argument.
There is PR #482, but is not yet closed.
In the mean time I'm doing this work around
const imageMagick = gm.subClass({imageMagick: true})
imageMagick(file_path)
// .autoOrient() // waiting for this PM to be resolved https://github.com/aheckmann/gm/pull/482
.in('-auto-orient')
.write(file_path, function(err) {});