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

Getting nil results with MacBook Pro M1 #134

Closed lehresman closed 2 years ago

lehresman commented 2 years ago

I recently got my new MacBook Pro with the M1 Pro chip. Our Rails app works fine except for FastImage, which is returning nil for some reason.

On my MacBook Pro M1:

$ irb
 :001 > require 'fastimage'
 => true 
 :002 > FastImage.size 'spec/support/data/piano.jpg'
 => nil 
 :003 > FastImage.type 'spec/support/data/piano.jpg'
 => nil 
 :004 > 

On my MacBook Pro Intel:

$ irb
2.7.4 :001 > require 'fastimage'
 => true 
2.7.4 :002 > FastImage.size "spec/support/data/piano.jpg"
 => [100, 67] 
2.7.4 :003 > FastImage.type "spec/support/data/piano.jpg"
 => :jpeg 
2.7.4 :004 > 

Any thoughts on what might be causing this?

I have verified that we are on the latest version (2.2.5).

lehresman commented 2 years ago

Nevermind. It was a problem on my end. The piano image was corrupted on my local checkout.