Talk:Sxiv

From ArchWiki
Jump to: navigation, search

Broken image-info?

The line geometry=$(identify -format '%wx%h' "$1[0]") seems to be broken as of imagemagick 6.9.6.8-1 (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 6.9.6.8 and got fixed on 6.9.7.5. -- 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)