Page 1 of 1

New fx numerical only file size in Bytes without the B

Posted: 2018-07-13T18:18:35-07:00
by fmw42
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

Code: Select all

convert rose: -format "%[fx:extent]\n" info:
9673

Code: Select all

convert logo: -format "%[fx:extent]\n" info:
28576

Code: Select all

convert logo: rose: -format "%[fx:u.extent>v.extent?1:0]\n" info:
1
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
1