Last modified: 2014-10-29 23:07:13 UTC
For example with: https://kn.wikipedia.org/wiki/%E0%B2%9A%E0%B2%BF%E0%B2%A4%E0%B3%8D%E0%B2%B0:End-of-the-world-Stephen-Hawking-god-particle-Higgs-boson-508102.jpg Calling this URL: http://upload.wikimedia.org/wikipedia/kn/thumb/0/0e/End-of-the-world-Stephen-Hawking-god-particle-Higgs-boson-508102.jpg/230px-End-of-the-world-Stephen-Hawking-god-particle-Higgs-boson-508102.jpg Generate a HTTP 500 error with message: Error generating thumbnail ಮುನ್ನೋಟ ಚಿತ್ರವನ್ನು ಸೃಷ್ಟಿಸುವಲ್ಲಿ ದೋಷ: convert: Fractional sampling not implemented yet `/tmp/localcopy_1924ad5185f8-1.jpg' @ error/jpeg.c/EmitMessage/242. convert: missing an image filename `/tmp/transform_b82067d9cc5c-1.jpg' @ error/convert.c/ConvertImageCommand/3011. Error code: 1
Appears to be bug in image magick about how it gives size hints to libjpeg. example test case: convert -define 'jpeg:size=118x70' End-of-the-world-Stephen-Hawking-god-particle-Higgs-boson-508102.jpg out.jpg I've tested on both old image magick, and 6.8.9-3
Ah, its related to the file having an invalid YCbCr sampling specification. It specifies "2 3", and as far as I can tell, the valid choices are: '1 1' = YCbCr4:4:4 '1 2' = YCbCr4:4:0 '1 4' = YCbCr4:4:1 '2 1' = YCbCr4:2:2 '2 2' = YCbCr4:2:0 '2 4' = YCbCr4:2:1 '4 1' = YCbCr4:1:1 '4 2' = YCbCr4:1:0
(In reply to Bawolff (Brian Wolff) from comment #2) > Ah, its related to the file having an invalid YCbCr sampling specification. > It specifies "2 3", and as far as I can tell, the valid choices are: To further that, the "2 3" would denote subsampling with 1/2 resolution in the horizontal direction, and 1/3 in the vertical resolution. When we ask image magick to scale it with say the -define 'jpeg:size=295x175' option, that hands off the initial scaling to libjpeg, which shrinks it by 50%. As a result it tries to in the vertical direction scale by 3/2 (Since it tries for every 2 vertical samples (from the scaling factor) to return 3 samples (from the subsampling)). But if -define 'jpeg:size=295x175' isn't there, then the full image is decompressed, and the vertical chroma is scaled by the integer 3. I don't know if this could be considered a bug in image magick, or if libjpeg should handle this better, or if the image is just broken.
Well I filed an upstream bug: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26434 , but to be honest, I'm not really sure if this is really an image magick bug.
upstream says: "We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-10 Beta, available by sometime tomorrow. Thanks." ---- Of course Wikimedia updates its packages almost never, so it probably won't make it to WMF servers for about seven years.
What happens here is pretty incredible... the end too ;)
The beta version of imagemagick 6.8.9-10 was released here: http://www.imagemagick.org/download/beta/ImageMagick-6.8.9-10.tar.bz2
Here is my HTTP header dump for http://parsoid-lb.eqiad.wikimedia.org/euwiki/Cebus?oldid=3949332 === GET /euwiki/Cebus?oldid=3949332 HTTP/1.1 Host: parsoid-lb.eqiad.wikimedia.org User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: fr,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate DNT: 0 Cookie: GeoIP=CH:Dubendorf:47.3954:8.6184:v4 Connection: keep-alive HTTP/1.1 200 OK X-Powered-By: Express Vary: Accept-Encoding Access-Control-Allow-Origin: * Cache-Control: private,no-cache,s-maxage=0 content-revision-id: 3949332 X-Parsoid-Performance: duration=270362; start=1414501238071 Content-Type: text/html; charset=UTF-8 Content-Encoding: gzip X-Varnish: 497764938, 820175809 Via: 1.1 varnish, 1.1 varnish Content-Length: 2646 Accept-Ranges: bytes Date: Tue, 28 Oct 2014 13:05:08 GMT Age: 0 Connection: keep-alive X-Cache: cp1058 miss (0), cp1058 frontend miss (0)
Sorry for my last comment, is not for this bug report.