Hi,

I have been messing around to enable rawspeed decoding for old Panasonic raw files. Why was it disabled in the first place?

I found some potential problems and don't know yet what would be the correct way.

This is what I did so far:

Index: Rw2Decoder.cpp
===================================================================
--- Rw2Decoder.cpp      (revision 612)
+++ Rw2Decoder.cpp      (working copy)
@@ -55,7 +55,7 @@
   uint32 width = raw->getEntry((TiffTag)2)->getShort();

   if (isOldPanasonic) {
-    ThrowRDE("Cannot decode old-style Panasonic RAW files");
+    //ThrowRDE("Cannot decode old-style Panasonic RAW files");
     TiffEntry *offsets = raw->getEntry(STRIPOFFSETS);
     TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS);


and

Index: plugins/load-rawspeed/rawstudio-plugin.c
===================================================================
--- plugins/load-rawspeed/rawstudio-plugin.c    (revision 4428)
+++ plugins/load-rawspeed/rawstudio-plugin.c    (working copy)
@@ -30,6 +30,7 @@
rs_filetype_register_loader(".nrw", "Nikon NRW", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".orf", "Olympus", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".pef", "Pentax raw", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); + rs_filetype_register_loader(".raw", "Panasonic raw", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".rw2", "Panasonic raw v2", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".rwl", "Leica RAW", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".srw", "Samsung SRW", load_rawspeed, 5, RS_LOADER_FLAGS_RAW);


I added this to cameras.xml:

  <Camera make="Panasonic" model = "DMC-LX2" > <!--mode="16:9">-->
    <CFA width="2" height="2">
      <Color x="0" y="0">BLUE</Color><Color x="1" y="0">GREEN</Color>
      <Color x="0" y="1">GREEN</Color><Color x="1" y="1">RED</Color>
    </CFA>
    <Crop x="0" y="0" width="4258" height="2390"/><!-- ISO 100-->
    <Sensor black="0" white="65535"/>
  </Camera>

The crop parameters are not really correct, I have to experiment further, esp look what dcraw does. I also have to check the sensor parameters more thoroughly. Intrestingly ISO 100 pics are bigger than other ISO settings (I tested ISO 800). The latter have some sort of black border around. (Maybe to do some statics on noise?) I had to comment out the mode attribute as the code flow is not correct. It tries to call guessMode but returns an empty string as mRaw->isAllocated() return false.

So what should be changed, so that guessMode return the correct mode? Can't height and width be taken from the "TiffIFD"? (Note: I don't have much knowlege about the classes and what info from the file they represent.)

Would it be sensible and feasible to enhance the configuration (and parsing of it) to encode different crop settings for different ISO settings?

Regards,

Prakash



_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to