Help converting dcp to icc using dcamprof

I’m trying to use dcamprof to convert a dcp file (from Adobe Raw). I’ve tried the following steps:

dcamprof dcp2json input.dcp output.json
dcamprof make-icc output.json output.icc

However the resulting icc seems to be invalid (file size is about ~500 bytes). What am I doing wrong?

Hey

That’s too little info to go by. File size is not a good indicator of whether it’s valid or not. How is it invalid?

You could also try make-icc:
https://www.ludd.ltu.se/~torger/dcamprof.html#make-icc

Darktable says it’s unsupported. A similar icc I created using the dcp2icc in the past is about ~216kB, so the size difference is quite large.

I tried using the make-icc (as I put in the example above). I also tried using the json2icc which didn’t generate a vaiid icc as well.

A while back, I made some ICC profiles from Adobe DCPs, my Neutral file made a 524-byte ICC, Vivid made a 224-byte file. My guess is that there are LUT TRCs in them. Open the .json intermediate file with a text editor, and the contents are easily discernable.

I’m not at my regular computer to check, but IIRC the roadblock I ran into was the DCPs did not contain a ForwardMatrix, which is what dcamprof expected to see to populate the color primaries. At that, I gave up and went back to my Argyll-produced profiles, but I plan to restart that investigation now that I’m retired (sort of…)

Edit: My Argyll-produced camera profile is only 3.5kb, so a usable profile doesn’t have to be big…

1 Like

I’m still trying to get it to work. Now darktable loads the icc (I’m not sure what changed), but still something seems off. I’ve tried converting both a Standard dcp and a Vivid one. Both resulted in the same icc. Kind of weird.

The json indeed has a lookup table, but it seems much bigger than something that can be represented in 500bytes.

@ggbutcher Glen did you ever make any progress with this…DCP-ICC

"A while back, I made some ICC profiles from Adobe DCPs, my Neutral file made a 524-byte ICC, Vivid made a 224-byte file. My guess is that there are LUT TRCs in them. Open the .json intermediate file with a text editor, and the contents are easily discernable.

I’m not at my regular computer to check, but IIRC the roadblock I ran into was the DCPs did not contain a ForwardMatrix, which is what dcamprof expected to see to populate the color primaries. At that, I gave up and went back to my Argyll-produced profiles, but I plan to restart that investigation now that I’m retired (sort of…)

Edit: My Argyll-produced camera profile is only 3.5kb, so a usable profile doesn’t have to be big…"

I’ve kinda sidetracked myself, working right now on making profiles from spectral sensitivity data…

However, for this endeavor, since that post I’ve learnt from @Morgan_Hardwood that it’s the D65 ColorMatrix1 that he uses to make the primary sets for camconst.json. With that, I’m not sure why dcamprof wouldn’t make a matrix ICC from a DCP without the ForwardMatrix…

I’m sorta-retired now too, so I have time to pursue all of this. Let me mess with it today/tomorrow (still configuring a new computer, need to find dcamprof and compile it), and report back.

Okay, I just made a matrix ICC profile from an Adobe Standard DCP for my Nikon D7000, and it works fine. Here are the steps:

$ dcamprof dcp2json <filename.dcp> <filename.json>
$ dcamprof make-icc -p matrix <filename.json> <filename.icc>

In the .json file you can see both the ColorMatrix1 and the LUT; -p xyzlut would make an A0toB0 LUT ICC. For this camera, I made the LUT profile to use with extreme colors, works quite well. I made a similar one for my Z6, but for some reason it doesn’t work so well, need to pick at it. The Z6 is what I’m noodling with measuring spectral sensitivity for, as this to me would be the gold standard for camera profiling.

NP thanks so much …just curious……as I have an old Lumia phone that shoots raw and I found a few dcp files for it and thought about trying to make icc files for DT……Enjoy you new computer……

I got back to this and have made progress with my Pixel phone but the old Lumia DNG files have no forward matrix so they just don’t seem to want to convert…I guess I will just stick to what I have and try to get a TC that corrects things …

Can you run a ‘exiftool -G’ against the file? If there’s a ColorMatrix1 or 2 with a D65 white point, I can make a ICC from that, and maybe even a .json file that you could mess with.

Lumia640xl_json.txt (523.7 KB) Lumia640xl.dng (18.0 MB) 640xldngsrc_xml.txt (488.3 KB) Glen that is very generous, I will attach the xml from dcptool , the dng file from the phone and the json file from dcamprof…Its the next step to get to an icc profiie I can’t get to and then of course I might like to tweak it either with the dcamprof tools or in adobe dcp profile editor before conversion to icc…any help would be appreciated…don’t lose any sleep over it but I am very grateful for the chance to learn something from you…best ToddLumia640xl.dng (18.0 MB)

Cool; I’ll probably get to it tomorrow.

Hey NP again thanks for your offer to help…haven’t had time to check out rawproc yet…sadly have to plan the back to work strategy for the lab…not looking forward to this one…makes me want to retire…

Here’s the ICC:
todds-profile.icc (596 Bytes)

The DNG had a D65 ColorMatrix2, so I copied the primaries from it, multiplied each number by 10000, then put them in a colorspace tool in rawproc, which made the profile and embedded it in a JPEG when I saved it. I then used exiftool to extract it.

It’s a linear, gamma 1.0 profile. It’s also a V4 profile, which dcamprof won’t read to produce a JSON of it. I’ll have to look at my code…

@ggbutcher Glen I just noticed this thanks so much I will give it a try…

1 Like