New fx numerical only file size in Bytes without the B
Posted: 2018-07-13T18:18:35-07:00
As of IM 6.9.10-6 and 7.0.8-6, there is an fx term for the numerical file size in Bytes without the B. It is called "extent". So now one can do
9673
28576
1
1
If using two images, you will get 0 or 1 two times. So at least in Unix, you can do
1
Code: Select all
convert rose: -format "%[fx:extent]\n" info:
Code: Select all
convert logo: -format "%[fx:extent]\n" info:
Code: Select all
convert logo: rose: -format "%[fx:u.extent>v.extent?1:0]\n" info:
1
If using two images, you will get 0 or 1 two times. So at least in Unix, you can do
Code: Select all
convert logo: rose: -format "%[fx:u.extent>v.extent?1:0]\n" info: | head -n 1