There are two problems (for me as a beginner):
- I found no -format option to get "always integer" filesize in bytes (%[size] give KB or MB values) to do math externally
- "obvios" calculations via fx:
gives uncorrect result because %b file size of image read in is not the file size but usage of %[size] impossible in fx:identify -format "%[width] %[height] %[size] %[fx:b/(w*h)]" filename.jpg