Mamiya ZD RAw support

Issue #173 resolved
Michael Ezra created an issue

Mamiya ZD MEF files aren’t fully recognized out of the camera.

When MEF file is converted to DNG using Camera Raw, the resulting DNG files are fine.

Illustration how thumbnails look - same image MEF vs DNG:

Orientation and camera constants issue?

Both files are available for download: https://michaelezra.com/temp/Mamiya-ZD.zip

When I open MEF image and set the white balance correctly, preview pane matches to the DNG image, however, thumbnail does not, it remains dark and has a strong color shift:

I am hoping this might be an easy fix?

Comments (8)

  1. Michael Ezra reporter

    dcraw.cc line 8420:

    { "Mamiya ZD", 0, 0,
    { 7645,2579,-1363,-8689,16717,2015,-3712,5941,5961 } },

    these numbers match -10,000 * constants in ColorMatrix2 below, in bold font.

    This was years ago.. I recall using DCPtool to extract XML from DCP file. Here is the portion:

    <ProfileName>MamiyaZD_Linear_20110915-02</ProfileName>
    <CalibrationIlluminant1>17</CalibrationIlluminant1>
    <CalibrationIlluminant2>21</CalibrationIlluminant2>
    <ColorMatrix1 Rows="3" Cols="3">
    <Element Row="2" Col="2">0.654000</Element>
    <Element Row="2" Col="1">0.445200</Element>
    <Element Row="2" Col="0">-0.217300</Element>
    <Element Row="1" Col="2">0.253500</Element>
    <Element Row="1" Col="1">1.466900</Element>
    <Element Row="1" Col="0">-0.701200</Element>
    <Element Row="0" Col="2">-0.176500</Element>
    <Element Row="0" Col="1">0.305200</Element>
    <Element Row="0" Col="0">0.694300</Element>
    </ColorMatrix1>
    <ColorMatrix2 Rows="3" Cols="3">
    <Element Row="2" Col="2">0.596100</Element>
    <Element Row="2" Col="1">0.594100</Element>
    <Element Row="2" Col="0">-0.371200</Element>
    <Element Row="1" Col="2">0.201400</Element>
    <Element Row="1" Col="1">1.671700</Element>
    <Element Row="1" Col="0">-0.868900</Element>
    <Element Row="0" Col="2">-0.136300</Element>
    <Element Row="0" Col="1">0.257900</Element>
    <Element Row="0" Col="0">0.764500</Element>
    </ColorMatrix2>
    <ForwardMatrix1 Rows="3" Cols="3">
    <Element Row="2" Col="2">1.301800</Element>
    <Element Row="2" Col="1">-0.560300</Element>
    <Element Row="2" Col="0">0.083600</Element>
    <Element Row="1" Col="2">-0.060800</Element>
    <Element Row="1" Col="1">0.558200</Element>
    <Element Row="1" Col="0">0.502600</Element>
    <Element Row="0" Col="2">0.250800</Element>
    <Element Row="0" Col="1">-0.289000</Element>
    <Element Row="0" Col="0">1.002500</Element>
    </ForwardMatrix1>
    <ForwardMatrix2 Rows="3" Cols="3">
    <Element Row="2" Col="2">1.301800</Element>
    <Element Row="2" Col="1">-0.560300</Element>
    <Element Row="2" Col="0">0.083600</Element>
    <Element Row="1" Col="2">-0.060800</Element>
    <Element Row="1" Col="1">0.558200</Element>
    <Element Row="1" Col="0">0.502600</Element>
    <Element Row="0" Col="2">0.250800</Element>
    <Element Row="0" Col="1">-0.289000</Element>
    <Element Row="0" Col="0">1.002500</Element>
    </ForwardMatrix2>
    <ReductionMatrix1 Rows="0" Cols="0"/>
    <ReductionMatrix2 Rows="0" Cols="0"/>

  2. Michael Ezra reporter

    Thank you, this works - applying neutral profile causes thumbnails to be rendered correctly.

    There is a minor issue - not critical, when no profile is applied, thumbnail is as it was before - very dark & mis-colored.

    Thank you very much for the quick fix!

  3. Log in to comment