Category talk:Animated PNG

Return to "Animated PNG" page.

Category SQLEdit

-- 2> /dev/null; date; echo '
/* Animated PNGs
 * Runtime: 20 min <SLOW_OK>
 */
SELECT
  CONCAT("* [[:File:", REPLACE(img_name, "_", " "), "]]") AS "File"
FROM image
LEFT JOIN page ON page_namespace=6 AND page_title=img_name
LEFT JOIN categorylinks ON cl_from=page_id AND cl_to IN ("Animated_PNG")
WHERE img_media_type="BITMAP"
AND img_major_mime="image" AND img_minor_mime="png"
AND cl_from IS NULL
AND img_metadata LIKE "%frameCount\";i:%"
AND img_metadata NOT LIKE "%frameCount\";i:0;%"
;-- ' | mysql -ch dewiki-p.userdb commonswiki_p; date;

Since MediaWiki now includes frame counts for PNGs, the above query will find images missing from this category. —Dispenser (talk) 21:28, 24 September 2013 (UTC)

Last modified on 30 September 2013, at 19:30