Page 1 of 1

New %B to show file size in bytes without the B

Posted: 2018-07-05T15:57:22-07:00
by fmw42
Starting with IM 6.9.10.4 and IM 7.0.8.4, you can get the file size in bytes without the trailing B.

Code: Select all

convert lena.png -format "%B\n" info:
118327

Code: Select all

magick lena.png -format "%B\n" info:
118327

Re: New %B to show file size in bytes without the B

Posted: 2018-07-05T16:04:16-07:00
by snibgo
Hooray! Can it be used in arithmetic expressions, eg:

Code: Select all

magick lena.png -format "%[fx:B>1000?1:0]" info:

Re: New %B to show file size in bytes without the B

Posted: 2018-07-05T16:09:08-07:00
by fmw42
Result seems to be 0. So it appears not, at least at this time.

Allowing this would be a nice addition. I will suggest it.