Unable to read newer Panasonic RW2 Files #7896
Replies: 17 comments 10 replies
-
It might be possible that Libraw has not yet added support for those image. We will probably need to wait for them to do this. The trick to upload a large file is to create a "multi-part ZIP archive" and upload the separate files |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Note that: https://www.libraw.org/supported-cameras "LibRaw 0.21 supported cameras" doesn't include "DC-G9 Mark II". https://www.libraw.org/supported-cameras-202403 "LibRaw 202403 snapshot supported camera list" says "DC-G9 Mark II" is supported. I suppose IM doesn't use the snapshot. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I do need a way to find out if an image is properly supported or not. It probably doesn't help that Panasonic have retained the same .RW2 extension for the newer cameras, although there have been some internal changes (e.g. from 12- to 14-bit depth for raw colour data). What might help is if I could get the verbose output from the IM read operation, but I can't find any examples of how to do that. My current VB.Net code looks like this: Private WithEvents oMagick As MagickImage This executes in a try/catch block, but no exception is triggered. I have an event handler for oMagic.Warning, but that's not triggered either. My last option is that if I can get the verbose output from the read operation I might be able to see a difference between the output for a valid file (older model) and unsupported file (newer model). Does anyone know how to do this? Is there a working example in any .Net language? Thanks |
Beta Was this translation helpful? Give feedback.
-
Newer Panasonic files apparently read OK (no error or warning from IM.Net), but the bitmap created is just garbage - see attached screenshots. Older Panasonic files are fine. I am definitely using the latest version, 14.4.0 |
Beta Was this translation helpful? Give feedback.
-
Hi, The Libraw snapshot page definitely states that the G9ii and a couple of other problematic new models are supported, but that doesn't mean they may not have a bug. |
Beta Was this translation helpful? Give feedback.
-
On Windows 11, with pre-built binaries of IM, I can't reproduce the problem at the command line. IM v7.1.1-20 has a problem with the file:
But with IM 71.1.1-38, the same command succeeds, and makes an image that seems to be as desired.
x.jpg is: The versions of libraw seem a little weird, with the older version of IM (IM v7.1.1-20) using a newer version of libraw.
|
Beta Was this translation helpful? Give feedback.
-
Thanks. That seems to confirm what's implied by the LibRaw support pages, that the latest version of IM should handle the newer files, but older ones won't. However, that doesn't explain why I'm getting the error using the latest version of Magick.Net. How can I check what component versions (of LibRaw and IM) are being used? Also I'd ideally like to be able to see the output and detect for myself when there's a problem reading the file. Is there any way with Magick.Net to get the verbose output? Thanks |
Beta Was this translation helpful? Give feedback.
-
Possibly the libraw developers implemented the new RW2 format, but then discovered bugs and withdrew support. But that would be a question for https://www.libraw.org/forum . |
Beta Was this translation helpful? Give feedback.
-
Hi. I managed to sort out getting the output from Magick in my app, and then detecting whether or not the raw file was read correctly. It would really have helped if someone could have directed me to https://github.com/dlemstra/Magick.NET/blob/main/docs/DetailedDebugInformation.md, which I eventually found after a lot of Googling! (@dlemstra - it might have been useful to keep the second thread going under the Magick.Net discussion...) For completeness, and to help the next person looking for this, here's how it works. The VB.Net code looks a lot like the C# example. The first thing is to create an event handler for each output item. Mine writes any item with "error" or "warning" to the debug log. I then used that to establish that a failure of the raw read would result in a line including the keyword "LibRawDataError" :
When Magick.Net is first initialised, you need to hook up the event handler, e.g.:
Finally you can optionally set Verbose mode before the read operation:
|
Beta Was this translation helpful? Give feedback.
-
This leaves the problem of why the Panasonic G9ii images are not being read correctly, despite the fact they should be supported. The first thing to remember is that I am using Magick.Net, not command-line ImageMagick. Please could someone who knows about Magick.Net please therefore answer the following questions: "For the nuget release packages of Magick.Net, is the version of LibRaw used downloaded and compiled directly into Magick.Net, or does Magick.Net just use the version already linked into ImageMagick? How can we confirm which version of LibRaw is being used in a given application calling Magick.Net?" Thanks |
Beta Was this translation helpful? Give feedback.
-
Thanks Dirk. Is there any way to get the information at runtime, just in case for some reason the physical build has got out of step with the documentation? |
Beta Was this translation helpful? Give feedback.
-
Also I confess to being completely confused by LibRaw versioning. According to https://www.libraw.org/ "Minor updates (0.20.1, 0.20.2…) do not change the API/ABI and new cameras are not added; generally they are just bugfixes." Therefore I would expect 21.3 to just be a bugfix on 21.0. To get support for the newer cameras we need the "202403 Snapshot" https://www.libraw.org/supported-cameras-202403, but that number has no relation to the version numbers quoted above, and neither that page nor the main page states clearly what version number it should display. Does anyone know definitely what version number we should be seeing for the "202403 Sanpshot" version? Thanks |
Beta Was this translation helpful? Give feedback.
-
I have tried to post a query to the LibRaw forum, but it looks like new posts have to be vetted first, so it's not yet public. I'll let you know when it's published and about any response. However, I think we may be able to work out what's going on. The key is the text I posted above about the LibRaw "minor release" policy. That clearly states that minor updates (e.g. 21.3) do NOT contain the latest camera support - for that you have to specifically target the latest camera support snapshots. If IM / Magick.Net have been compiled with the "latest" version then they may have picked up a "bug fix" release with old camera support. (Personally I think that's a very odd approach and if it was down to me I'd slipstream the latest camera support into each release, but their policy is as stated.) Do we know if we have a version of Magick.Net which definitely used the 202403 snapshot? If so I could test that to see if my theory is correct? |
Beta Was this translation helpful? Give feedback.
-
The information I got from the LibRaw forum is as follows: "Version defines for 202403 snapshot are: This suggests that version is marked as 0.22.0. IM currently seems to be using 0.21.X (various values reported above), so I suspect we're not yet picking up the full camera support. Is there any way to check this? Thanks |
Beta Was this translation helpful? Give feedback.
-
Thanks for all your research and I finally understand all the confusion. When we switched to the snapshot on Windows we used the version number that was then provided. This was changed in a follow up commit that we missed. And that is why I thought the snapshot was some kind of pre-release. But it turns out it wasn't. I have revert to the snapshot version again and the next release of Magick.NET and ImageMagick will be able to read this image again. |
Beta Was this translation helpful? Give feedback.
-
Brilliant, thanks. Please post a quick comment here when it's available. |
Beta Was this translation helpful? Give feedback.
-
ImageMagick version
8.0.4?
Operating system, version and so on
Windows 10-64, using ImageMagick.Net wrapper
Description
Hi,
I'm not sure if this is the right location for this query, if not please could someone provide an accurate redirect?
I'm trying to read camera raw images using ImageMagic.Net (version 14.4.0). This works well for most camera types, including older Panasonic models such as the G9 (which has a default bit depth of 12). However it doesn't work for newer Pansonic models such as the G9ii or S5ii which have a 14-bit depth. I have tried specifying a settings object and setting different "Depth" values, but that doesn't seem to help.
I would like to provide a sample file, but the typical size is 36MB zipped, which exceeds the site limit. Please advise how to address this.
Please could someone provide me with guidance on how to check that these files are supported, and if so what settings may be required to read them correctly?
Thanks
Andrew
Beta Was this translation helpful? Give feedback.
All reactions