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

cr2-file handles exceptions #6963

Open
guxiangming opened this issue Dec 21, 2023 · 7 comments
Open

cr2-file handles exceptions #6963

guxiangming opened this issue Dec 21, 2023 · 7 comments

Comments

@guxiangming
Copy link

ImageMagick version

ImageMagick-7.1.1-23

Operating system

Linux

Operating system, version and so on

centos 7.4

Description

RUN command :
magick /Users/Desktop/a/YnHJkPnaaYSYS2ds.CR2 aa.jpg
magick: Input/output error ` /Users/Desktop/a/YnHJkPnaaYSYS2ds.CR2' @ error/dng.c/ReadDNGImage/574.

file_link :
Uploading YnHJkPnaaYSYS2ds.CR2.zip…

Steps to Reproduce

magick /Users/Desktop/a/YnHJkPnaaYSYS2ds.CR2 aa.jpg

Images

No response

@snibgo
Copy link

snibgo commented Dec 21, 2023

Your link doesn't point to your file.

I suggest zipping the file, and uploading that.

@guxiangming
Copy link
Author

YnHJkPnaaYSYS2ds.CR2.zip

@guxiangming
Copy link
Author

Your link doesn't point to your file.

I suggest zipping the file, and uploading that.

sorry

@snibgo
Copy link

snibgo commented Dec 22, 2023

I can't reproduce the problem. On IM v7.1.1-20 in Windows 11, this command...

magick YnHJkPnaaYSYS2ds.CR2 x.jpg

... completes with no problem.

To narrow down the problem, I suggest you try:

  • Write to NULL: instead of a file. Does that work? If it does, the problem is in writing the file.

  • Write to info: instead of a file. Does that work?

  • Try writing a large image: magick -size 3000x2000 out.jpg. If that doesn't work, the problem is in writing the file.

@guxiangming
Copy link
Author

10018844$ magick -size 200x300 /Users//YnHJkPnaaYSYS2ds.CR2 -debug "All" /Users//YnHJkPnaaYSYS2ds.jpg
2023-12-23T07:55:50+00:00 0:00.001 0.000u 7.1.1 Wand magick[92651]: wandcli.c/AcquireMagickCLI/115/Wand
MagickWandCLI-0
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Command magick[92651]: magick-cli.c/MagickImageCommand/938/Command
Initializing "magick"
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Configure magick[92651]: client.c/SetClientName/123/Configure
magick
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Command magick[92651]: magick-cli.c/ProcessCommandOptions/617/Command
at CLI arg 1 - Starting ("-size")
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Command magick[92651]: operation.c/CLISettingOptionInfo/453/Command
at CLI arg 1 - Setting Option: -size "200x300" "(null)"
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Pixel magick[92651]: pixel.c/SetPixelChannelMask/6340/Pixel
[0x07ffffff]
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6224/Pixel
[0x07ffffff]
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6321/Pixel
0: red (update)
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6321/Pixel
1: green (update)
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6321/Pixel
2: blue (update)
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Resource magick[92651]: resource.c/AcquireMagickResource/385/Resource
Area: 1B/0B/64GiB
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Resource magick[92651]: resource.c/AcquireMagickResource/385/Resource
Memory: 12B/12B/16GiB
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Cache magick[92651]: cache.c/OpenPixelCache/3813/Cache
open [0] (Heap Memory, 1x1x3 12B)
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Cache magick[92651]: cache.c/DestroyPixelCache/1062/Cache
destroy [0]
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Resource magick[92651]: resource.c/RelinquishMagickResource/1127/Resource
Memory: 12B/0B/16GiB
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Wand magick[92651]: wandcli.c/CLICatchException/226/Wand
magick-CLI
2023-12-23T07:55:50+00:00 0:00.002 0.000u 7.1.1 Command magick[92651]: operation.c/CLINoImageOperator/4868/Command
at CLI arg 3 - NoImage Operator: -read "/Users//YnHJkPnaaYSYS2ds.CR2" ""
2023-12-23T07:55:50+00:00 0:00.003 0.000u 7.1.1 Configure magick[92651]: utility.c/ExpandFilenames/975/Configure
Command line: /Users//YnHJkPnaaYSYS2ds.CR2
2023-12-23T07:55:50+00:00 0:00.003 0.000u 7.1.1 Policy magick[92651]: policy.c/IsRightsAuthorized/656/Policy
Domain: Module; rights=Unrecognized; pattern="DNG" ...
2023-12-23T07:55:50+00:00 0:00.003 0.000u 7.1.1 Module magick[92651]: module.c/OpenModule/1279/Module
Searching for module "DNG" using filename "dng.la"
2023-12-23T07:55:50+00:00 0:00.003 0.000u 7.1.1 Module magick[92651]: module.c/GetMagickModulePath/549/Module
Searching for coder module file "dng.la" ...
2023-12-23T07:55:50+00:00 0:00.003 0.000u 7.1.1 Module magick[92651]: module.c/OpenModule/1288/Module
Opening module at path "/opt/homebrew/Cellar/imagemagick/7.1.1-21/lib/ImageMagick/modules-Q16HDRI/coders/dng.la"
2023-12-23T07:55:50+00:00 0:00.008 0.000u 7.1.1 Module magick[92651]: module.c/OpenModule/1315/Module
Method "RegisterDNGImage" in module "DNG" at address 0x1040edbb8
2023-12-23T07:55:50+00:00 0:00.008 0.000u 7.1.1 Module magick[92651]: module.c/OpenModule/1329/Module
Method "UnregisterDNGImage" in module "DNG" at address 0x1040ef3b4
2023-12-23T07:55:50+00:00 0:00.009 0.000u 7.1.1 Policy magick[92651]: policy.c/IsRightsAuthorized/656/Policy
Domain: Path; rights=Read; pattern="/Users//YnHJkPnaaYSYS2ds.CR2" ...
2023-12-23T07:55:50+00:00 0:00.009 0.000u 7.1.1 Blob magick[92651]: blob.c/OpenBlob/3457/Blob
read 3 magic header bytes
2023-12-23T07:55:50+00:00 0:00.009 0.000u 7.1.1 Cache magick[92651]: cache.c/DestroyPixelCache/1062/Cache
destroy
2023-12-23T07:55:50+00:00 0:00.009 0.000u 7.1.1 Policy magick[92651]: policy.c/IsRightsAuthorized/656/Policy
Domain: Coder; rights=Read; pattern="CR2" ...
2023-12-23T07:55:50+00:00 0:00.009 0.000u 7.1.1 Policy magick[92651]: policy.c/IsRightsAuthorized/656/Policy
Domain: Path; rights=Read; pattern="/Users//YnHJkPnaaYSYS2ds.CR2" ...
2023-12-23T07:55:50+00:00 0:00.009 0.000u 7.1.1 Blob magick[92651]: blob.c/OpenBlob/3457/Blob
read 3 magic header bytes
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Pixel magick[92651]: pixel.c/SetPixelChannelMask/6340/Pixel
/Users//YnHJkPnaaYSYS2ds.CR2[0x07ffffff]
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6224/Pixel
/Users//YnHJkPnaaYSYS2ds.CR2[0x07ffffff]
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6321/Pixel
0: red (update)
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6321/Pixel
1: green (update)
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Pixel magick[92651]: pixel.c/LogPixelChannels/6321/Pixel
2: blue (update)
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Resource magick[92651]: resource.c/AcquireMagickResource/385/Resource
Area: 5.27344MiB/0B/64GiB
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Resource magick[92651]: resource.c/AcquireMagickResource/385/Resource
Memory: 63.2812MiB/63.2812MiB/16GiB
2023-12-23T07:55:50+00:00 0:00.012 0.010u 7.1.1 Cache magick[92651]: cache.c/OpenPixelCache/3813/Cache
open /Users//YnHJkPnaaYSYS2ds.CR2[0] (Heap Memory, 2880x1920x3 63.2812MiB)
2023-12-23T07:55:50+00:00 0:00.158 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/share/ImageMagick-7/locale.xml"
2023-12-23T07:55:50+00:00 0:00.158 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/lib/ImageMagick//config-Q16HDRI/locale.xml"
2023-12-23T07:55:50+00:00 0:00.158 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/etc/ImageMagick-7/locale.xml"
2023-12-23T07:55:50+00:00 0:00.158 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/share/doc/ImageMagick-7/locale.xml"
2023-12-23T07:55:50+00:00 0:00.158 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/Users/10018844/.config/ImageMagick/locale.xml"
2023-12-23T07:55:50+00:00 0:00.158 0.140u 7.1.1 Configure magick[92651]: locale.c/LoadLocaleCache/1181/Configure
Loading locale configure file "/opt/homebrew/Cellar/imagemagick/7.1.1-21/share/ImageMagick-7/locale.xml" ...
2023-12-23T07:55:50+00:00 0:00.158 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/share/ImageMagick-7/english.xml"
2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/lib/ImageMagick//config-Q16HDRI/english.xml"
2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/etc/ImageMagick-7/english.xml"
2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/opt/homebrew/Cellar/imagemagick/7.1.1-21/share/doc/ImageMagick-7/english.xml"
2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Locale magick[92651]: locale.c/GetLocaleOptions/824/Locale
Searching for locale file: "/Users/10018844/.config/ImageMagick/english.xml"
2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Configure magick[92651]: locale.c/LoadLocaleCache/1181/Configure
Loading locale configure file "/opt/homebrew/Cellar/imagemagick/7.1.1-21/share/ImageMagick-7/english.xml" ...
2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Exception magick[92651]: dng.c/ReadDNGImage/574/Exception
Input/output error /Users//YnHJkPnaaYSYS2ds.CR2' 2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Cache magick[92651]: cache.c/DestroyPixelCache/1062/Cache destroy /Users//YnHJkPnaaYSYS2ds.CR2[0] 2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Resource magick[92651]: resource.c/RelinquishMagickResource/1127/Resource Memory: 63.2812MiB/0B/16GiB 2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Wand magick[92651]: wandcli.c/CLICatchException/226/Wand magick-CLI 2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Command magick[92651]: magick-cli.c/MagickImageCommand/1033/Command Cleanup "magick" 2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Command magick[92651]: magick-cli.c/MagickImageCommand/1076/Command Exiting "magick" 2023-12-23T07:55:50+00:00 0:00.159 0.140u 7.1.1 Wand magick[92651]: wandcli.c/DestroyMagickCLI/148/Wand magick-CLI magick: Input/output error /Users//YnHJkPnaaYSYS2ds.CR2' @ error/dng.c/ReadDNGImage/574.

@guxiangming
Copy link
Author

Runs on a macbook

Version: ImageMagick 7.1.1-21 Q16-HDRI aarch64 21667 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(5.0)
Delegates (built-in): bzlib fontconfig freetype gslib heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png ps raw tiff webp xml zlib
Compiler: gcc (4.2)

@snibgo
Copy link

snibgo commented Dec 23, 2023

-size 200x300 in your command has no effect.

Input/output error is an error message from libraw. It seems to be having problems reading your file.

Did you build IM yourself? What is the text output from magick -list format |grep -i cr2? Expect something like:

      CR2  r--   Canon Digital Camera Raw Image Format (0.21.1-Release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants