fastimage
fastimage copied to clipboard
FastImage finds the size or type of an image given its uri by fetching as little as needed
The single file approach to FastImage has got rather unwieldy. Time to split it up, this is a first pass at that. No functionality changes.
I maintain the `image_size` gem and noticed that the benchmark in the readme of `fastimage` uses OpenURI to fetch the complete file to showcase `image_size`. However, few years ago, I...
FastImage doesn't support the JPEG XL format. ``` FastImage.new('https://jpegxl.info/logo.jxl').size nil FastImage.new('https://jpegxl.info/logo.jxl').type nil ``` Thanks very much for writing the gem!
Currently an instance can only pass one property, so in this case the latter assertion will fail. ``` fi = FastImage.new(File.join(FixturePath, "animated.gif")) assert_equal [400, 400], fi.size assert_equal true, fi.animated ```...
When calling the following: ```ruby FastImage.size 'http://world-of-nlp.net/favicon.ico' ``` This will yields a `NoMethodError` exception on https://github.com/sdsykes/fastimage/blob/master/lib/fastimage.rb#L301. The problem is that the original URL leads to a number of redirects, eventually...