Category talk:Animated PNG

From Wikimedia Commons, the free media repository
Jump to: navigation, search

Category SQL[edit]

-- 2> /dev/null; sql commonswiki_p <<< '
/* Animated PNGs
 * Runtime: 1 min <SLOW_OK>
  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;%"
;-- '

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)