[SOLVED] How to edit Black level of .RAW File?

Started by fatpig, June 17, 2013, 10:40:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fatpig

Hello,

One of my .RAW clips from the 5DII has Black Level of 2293 instead of 1024, as reported by RAW2CDNG-
How can I edit this?

All conversion apps make it ugly green looking as a result.
Thanks! :)

a1ex

The easy way:

    exiftool -BlackLevel=1000 1234.dng

The hard way:

    raw_info.black_level = 1234; // in raw2dng.c




fatpig

exiftool reports a problem when trying on cinemaDNG, aswell as normal DNG.
"error reading image data"
source .RAW file also cant be edited... unsupported file type.


so there is no way to correct it inside the .RAW?
I dont understand the second method. I assume I need a compiler for that?

a1ex

On raw2dng output it works.

With the hex editor, figure out the offset of black_level, or just append a video file that has the correct level, and a little more frames.

chmee

the lovely hard way is, to change the value in the datafield in the raw-file. if you're firm in using a hexfile editor (hxd) you're looking in the end of the file, there are the metadata to the raws.

convert your actual blacklevel to hex, revert the byteorder and search them.. (lol. thats the easy way instead of counting offsets :) )
(int2hex calculator http://www.sql-und-xml.de/unicode-database/online-tools/)

in my example (int)2046 is (hex) 7fe (07FE) -> FE 07.
calculate your desired blacklevel and hack it in :) (two times..)



regards chmee
[size=2]phreekz * blog * twitter[/size]

fatpig

hey thanks, that is really helpful! will do :)

EDIT: It worked! Thanks so much!
curiously, there was only one instance of my blacklevel. changing that helped. :)