From ArchWiki
Jump to navigation Jump to search

Broken image-info?

The line geometry=$(identify -format '%wx%h' "$1[0]") seems to be broken as of imagemagick (or maybe before). Removing [0] fixes it.

So why was [0] 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 [1]. I'm guessing the editor didn't understand how bash works? -- Alad (talk) 16:37, 23 December 2016 (UTC)
Got it: the [0] 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 and got fixed on -- 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)