Issue with applying clipping paths
Posted: 2011-09-22T08:33:00-07:00
First of all, I used the following two versions of ImageMagick to verify the problem described below.
Versions
These are the corresponding source files and resulting files:
http://www.filedropper.com/files_9
Description of the problem:
1. The outer path (red square) of the image src_test_l.jpg was created clockwise. The inner path around the blue square L was created clockwise as well. The inner path around the blue square R was created counter-clockwise.
Result of the command mentioned above: The inner path around the blue square R is applied properly, the path around the blue square L is not.
2. The outer path (red square) of the image src_test_r.jpg was created counter-clockwise. The inner path around the blue square R was created counter-clockwise as well. The inner path around the blue square L was created clockwise.
Result of the command mentioned above: The inner path around the blue square L is applied properly, the path around the blue square R is not.
Assumption: The inner paths are applied properly only if they were created opposed to the outer path.
Versions
- ImageMagick 6.7.2-6 2011-09-16 Q16
- ImageMagick 6.5.4-7 2010-12-13 Q16 OpenMP
Code: Select all
convert src_test_l.jpg +clip-path '#1' -fill transparent -draw "matte 0,0 reset" result_left.png
convert src_test_r.jpg +clip-path '#1' -fill transparent -draw "matte 0,0 reset" result_right.png
http://www.filedropper.com/files_9
Description of the problem:
1. The outer path (red square) of the image src_test_l.jpg was created clockwise. The inner path around the blue square L was created clockwise as well. The inner path around the blue square R was created counter-clockwise.
Result of the command mentioned above: The inner path around the blue square R is applied properly, the path around the blue square L is not.
2. The outer path (red square) of the image src_test_r.jpg was created counter-clockwise. The inner path around the blue square R was created counter-clockwise as well. The inner path around the blue square L was created clockwise.
Result of the command mentioned above: The inner path around the blue square L is applied properly, the path around the blue square R is not.
Assumption: The inner paths are applied properly only if they were created opposed to the outer path.