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

Problem opening raw files #295

Closed
jeroen opened this issue Jan 11, 2021 · 7 comments
Closed

Problem opening raw files #295

jeroen opened this issue Jan 11, 2021 · 7 comments

Comments

@jeroen
Copy link
Member

jeroen commented Jan 11, 2021

If we try to read a raw file, we get a weird error about some temporary file not being available:

library(magick)
image_read("~/downloads/sample1.cr2")
#Error in magick_image_readpath(path, density, depth, strip, defines) : 
#  rsession: UnableToOpenBlob `/var/folders/l5/gk7g18z52876d4lbk9tjhr0c0000gn/T//RtmpBuqVbC/magick-K5GW65PQfGi4oL7liHocf05zvwrrzFDm.ppm': No such file or directory @ error/blob.c/OpenBlob/2924

@dlemstra do you have any guess what is going wrong? It looks like imagemagick copies/converts the cr2 file to a ppm file but then tries to read the wrong directory?

@dlemstra
Copy link

Maybe the delegate (most likely dcraw) that was used to execute failed to read the file and did not create an output file? Can you share the input file? And is this only happening in IM6 or can you reproduce it with IM7?

@jeroen
Copy link
Member Author

jeroen commented Jan 11, 2021

This happens with both IM6 and IM7. I just used a sample cr2 file from here: https://filesamples.com/formats/cr2 but it also happens with any other cr2 file.

Do I need to enable dcraw specifically when building IM? Currently our builds do not have this delegate: https://github.com/homebrew/homebrew-core/blob/master/Formula/imagemagick.rb#L22-L75

@dlemstra
Copy link

You will either need libraw or dcraw for cr2 support.

@jeroen
Copy link
Member Author

jeroen commented Jan 11, 2021

Ah okay, that is likely the problem then (it's not very clear from the error message 😅 )

@jeroen
Copy link
Member Author

jeroen commented Jan 11, 2021

If I enable one of them, would you recommend libraw or dcraw?

@dlemstra
Copy link

The Windows build switched to libraw because it is then using a library directly instead of invoking a command through a shell.

@jeroen
Copy link
Member Author

jeroen commented Jan 12, 2021

Fixed now by rebuilding imagemagick --with-raw and adding the libraw dependencies. Thanks @dlemstra !

@jeroen jeroen closed this as completed Jan 12, 2021
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

2 participants