Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base64 ICO files aren't being identified and throws a Paperclip::Errors::NotIdentifiedByImageMagickError #137

Open
radiantshaw opened this issue Apr 5, 2024 · 0 comments

Comments

@radiantshaw
Copy link

Describe the bug
Finding the geometry of a Base64 encoded ICO file doesn't work and instead throws a Paperclip::Errors::NotIdentifiedByImageMagickError.

To Reproduce

require "base64"
require "kt-paperclip"

file = File.open("Path/To/ICO/File", "rb")
base64 = Base64.encode64(file.read)
data_uri = "data:image/vnd.microsoft.icon;base64," + base64

Paperclip::Geometry.from_file(Paperclip::DataUriAdapter.new(data_uri)) # => throws Paperclip::Errors::NotIdentifiedByImageMagickError

Expected behavior
Paperclip::Geometry.find_file should return an instance of Paperclip::Geometry containing the width and height of the ICO file.

Desktop (please complete the following information):

  • OS: macOS Sonoma v14.2.1
  • Browser: N/A
  • Version: 7.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant