1 /* ============================================================ 2 * 3 * This file is a part of digiKam project 4 * https://www.digikam.org 5 * 6 * Date : 2008-09-25 7 * Description : a tool to convert RAW file to DNG 8 * 9 * Copyright (C) 2008-2021 by Gilles Caulier <caulier dot gilles at gmail dot com> 10 * Copyright (C) 2010-2011 by Jens Mueller <tschenser at gmx dot de> 11 * 12 * This program is free software; you can redistribute it 13 * and/or modify it under the terms of the GNU General 14 * Public License as published by the Free Software Foundation; 15 * either version 2, or (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * ============================================================ */ 23 24 /** 25 * References about DNG: 26 * DNG SDK tutorial: www.adobeforums.com/webx/.3bc2944e 27 * www.adobeforums.com/webx/.3c054bde 28 * DNG review: www.barrypearson.co.uk/articles/dng/index.htm 29 * DNG intro: www.adobe.com/digitalimag/pdfs/dng_primer.pdf 30 * www.adobe.com/products/dng/pdfs/DNG_primer_manufacturers.pdf 31 * DNG Specification: wwwimages.adobe.com/content/dam/Adobe/en/products/photoshop/pdfs/dng_spec_1.5.0.0.pdf 32 * TIFF/EP Spec.: www.map.tu.chiba-u.ac.jp/IEC/100/TA2/recdoc/N4378.pdf 33 * DNG SDK reference: www.thomasdideriksen.dk/misc/File%20Formats/dng_sdk_refman.pdf 34 * DNG SDK tarball: helpx.adobe.com/photoshop/digital-negative.html#dng_sdk_download 35 * DNG users forum: www.adobeforums.com/webx/.3bb5f0ec 36 * 37 * Applications using DNG SDK: 38 * DNG4PS2: dng4ps2.chat.ru/index_en.html 39 * CORNERFIX: sourceforge.net/projects/cornerfix 40 * ADOBE DNG CONVERTER: helpx.adobe.com/photoshop/using/adobe-dng-converter.html 41 * DNGCONVERT: github.com/jmue/dngconvert 42 * MOVIE2DNG: elphel.svn.sourceforge.net/svnroot/elphel/tools/Movie2DNG 43 * RAW2DNG : github.com/Fimagena/raw2dng 44 */ 45 46 #include "dngwriter_p.h" 47 48 namespace Digikam 49 { 50 DNGWriter()51DNGWriter::DNGWriter() 52 : d(new Private(this)) 53 { 54 //dng_xmp_sdk::InitializeSDK(); 55 } 56 ~DNGWriter()57DNGWriter::~DNGWriter() 58 { 59 //dng_xmp_sdk::TerminateSDK(); 60 61 delete d; 62 } 63 cancel()64void DNGWriter::cancel() 65 { 66 d->cancel = true; 67 } 68 reset()69void DNGWriter::reset() 70 { 71 d->reset(); 72 } 73 setCompressLossLess(bool b)74void DNGWriter::setCompressLossLess(bool b) 75 { 76 d->jpegLossLessCompression = b; 77 } 78 compressLossLess() const79bool DNGWriter::compressLossLess() const 80 { 81 return d->jpegLossLessCompression; 82 } 83 setUpdateFileDate(bool b)84void DNGWriter::setUpdateFileDate(bool b) 85 { 86 d->updateFileDate = b; 87 } 88 updateFileDate() const89bool DNGWriter::updateFileDate() const 90 { 91 return d->updateFileDate; 92 } 93 setBackupOriginalRawFile(bool b)94void DNGWriter::setBackupOriginalRawFile(bool b) 95 { 96 d->backupOriginalRawFile = b; 97 } 98 backupOriginalRawFile() const99bool DNGWriter::backupOriginalRawFile() const 100 { 101 return d->backupOriginalRawFile; 102 } 103 setPreviewMode(int mode)104void DNGWriter::setPreviewMode(int mode) 105 { 106 d->previewMode = mode; 107 } 108 previewMode() const109int DNGWriter::previewMode() const 110 { 111 return d->previewMode; 112 } 113 setInputFile(const QString & filePath)114void DNGWriter::setInputFile(const QString& filePath) 115 { 116 d->inputFile = filePath; 117 } 118 setOutputFile(const QString & filePath)119void DNGWriter::setOutputFile(const QString& filePath) 120 { 121 d->outputFile = filePath; 122 } 123 inputFile() const124QString DNGWriter::inputFile() const 125 { 126 return d->inputFile; 127 } 128 outputFile() const129QString DNGWriter::outputFile() const 130 { 131 return d->outputFile; 132 } 133 xmpSdkVersion()134QString DNGWriter::xmpSdkVersion() 135 { 136 return QString::fromLatin1(XMPCORE_API_VERSION_STRING); 137 } 138 dngSdkVersion()139QString DNGWriter::dngSdkVersion() 140 { 141 // NOTE: DNG SDK do not seem to have a version ID shared in header. 142 143 return QString::fromLatin1("1.5.1"); 144 } 145 146 } // namespace Digikam 147