sdsykes / fastimage

FastImage finds the size or type of an image given its uri by fetching as little as needed
http://github.com/sdsykes/fastimage/tree/master
MIT License
1.37k stars 115 forks source link

Not Recognised pictture #113

Closed colindcli closed 4 years ago

colindcli commented 4 years ago

Not Recognised pictture error

sdsykes commented 4 years ago

Seems to work ok for me

% irb
irb(main):001:0> require 'fastimage'
=> true
irb(main):002:0> FastImage.type("https://user-images.githubusercontent.com/3311217/82139791-fe5ad400-985c-11ea-9984-31ccd94fda13.jpg")
=> :webp
irb(main):003:0> FastImage.size("https://user-images.githubusercontent.com/3311217/82139791-fe5ad400-985c-11ea-9984-31ccd94fda13.jpg")
=> [1500, 1500]
irb(main):004:0> 
% file ~/Downloads/82139791-fe5ad400-985c-11ea-9984-31ccd94fda13.jpg
~/Downloads/82139791-fe5ad400-985c-11ea-9984-31ccd94fda13.jpg: RIFF (little-endian) data, Web/P image, VP8 encoding, 1500x1500, Scaling: [none]x[none], YUV color, decoders should clamp
%