geometry=$(identify -format '%wx%h' "$1") seems to be broken as of imagemagick 220.127.116.11-1 (or maybe before). Removing
 fixes it.
So why was
 there in the first place?
—This unsigned comment is by Ambrevar (talk) 14:51, 23 December 2016. Please sign your posts with ~~~~!
- It was added with the rest of the section with . I'm guessing the editor didn't understand how bash works? -- Alad (talk) 16:37, 23 December 2016 (UTC)
- Got it: the  stands for the index of the frame, which is useful for multi-frame pictures (e.g. gif). The code was correct and it is still working now, so I suppose that it broke and imagemagick 18.104.22.168 and got fixed on 22.214.171.124. -- Ambrevar (talk) 08:48, 9 February 2017 (UTC)
- Actually, it wasn't a bug on imagemagick's side, it is simply that indexing will fail on some formats like PNG. Any clue on how to make this universal? -- Ambrevar (talk) 15:13, 18 February 2017 (UTC)