I have seen the source for crop, and no, path information are not adjusted when cropped. But then I do not think path information understands the use of virtual canvases whcih is what crop concerns itself with keeping correct. That is the path relative to the virtual canvas would remain correct (unless a 'viewport crop' was used).
Remember a virtual canvas is very important to many image processing tasks, providing a generally larger area and offset opon which the actual image sites.
In other words if you crop, then flatten the image onto its vitual canvas, then the path would be again be correct. -crop is not the problem, the offset adjustment that follows is.
As such it is the '+repage' function that should probably 'fix' any path elements as it is the function that would change the offset of images on virtual canvases. The "-set path" function on the other hand should not as it is purely a low level assignment, just as a -path create/read image setting is.
Also note that other virtual canvas modifying elements may also need adjustments. Things like -border, -frame, -rotate, -affine/-transform, etc etc etc.
A distortion map (not encoded into library) or displacment map (mis-encoded as a alpha composition operation) would not be able to 'fix' paths as it is a non-linear free form distortion that does not have a simple 'reverse mapping'. the same is true for -wave distortions.
Photoshop paths problem using -crop function
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/