Crop and Repage with MPC Behaves Differently Than With PNG
Posted: 2015-07-24T00:42:07-07:00
Running the crop and repage commands result in different input if the image file is a MPC or PNG derived from the MPC.
Version: ImageMagick 6.9.1-Q16
Operating System: Windows 7 x64
Processor: Intel(R) Core(TM) i5-3570K CPU @ 3.40 GHz
Installed memory (RAM): 8.00 GB
Command line:
Given the MPC and Cache files available at OneDrive: http://1drv.ms/1DATSjd
1. convert "iCopy 2015-07-23 11-16 000_1.mpc" -virtual-pixel edge -blur 0x15 -fuzz 10% -trim -format "%wx%h%O" info:
2. You will see "1875x3484+1350+567"
3. convert "iCopy 2015-07-23 11-16 000_1.mpc" "iCopy 2015-07-23 11-16 000_1.png"
4. convert "iCopy 2015-07-23 11-16 000_1.png" -virtual-pixel edge -blur 0x15 -fuzz 10% -trim -format "%wx%h%O" info:
5. You will see "1875x3484+1350+567" again
6. Run the following commands to crop the images and get rid of the gray
convert "iCopy 2015-07-23 11-16 000_1.mpc" -monitor -crop "1875x3484+1350+567" +repage "bad.png"
convert "iCopy 2015-07-23 11-16 000_1.png" -monitor -crop "1875x3484+1350+567" +repage "good.png"
7. Notice that bad.png shows a tiny sliver of the receipt whereas good.png shows the entire receipt.
Version: ImageMagick 6.9.1-Q16
Operating System: Windows 7 x64
Processor: Intel(R) Core(TM) i5-3570K CPU @ 3.40 GHz
Installed memory (RAM): 8.00 GB
Command line:
Given the MPC and Cache files available at OneDrive: http://1drv.ms/1DATSjd
1. convert "iCopy 2015-07-23 11-16 000_1.mpc" -virtual-pixel edge -blur 0x15 -fuzz 10% -trim -format "%wx%h%O" info:
2. You will see "1875x3484+1350+567"
3. convert "iCopy 2015-07-23 11-16 000_1.mpc" "iCopy 2015-07-23 11-16 000_1.png"
4. convert "iCopy 2015-07-23 11-16 000_1.png" -virtual-pixel edge -blur 0x15 -fuzz 10% -trim -format "%wx%h%O" info:
5. You will see "1875x3484+1350+567" again
6. Run the following commands to crop the images and get rid of the gray
convert "iCopy 2015-07-23 11-16 000_1.mpc" -monitor -crop "1875x3484+1350+567" +repage "bad.png"
convert "iCopy 2015-07-23 11-16 000_1.png" -monitor -crop "1875x3484+1350+567" +repage "good.png"
7. Notice that bad.png shows a tiny sliver of the receipt whereas good.png shows the entire receipt.