[Digikam-devel] extragear/graphics/digikam
F.J.Cruz
fj.cruz at supercable.es
Tue Jan 3 12:27:41 GMT 2006
El Martes, 3 de Enero de 2006 12:41, Gilles Caulier escribió:
> SVN commit 493814 by cgilles:
>
> Digikam from trunk : and finally RAW file decoding settings are now used by
> IE and Showfoto...
>
> Actually, the RAW file decoding settings implementation provide these
> parameters :
>
> - Enable Quality Decoding (bool) : If disable, we using old dcraw command
> line syntax with '-q' parameter alone. If Enable we using addition quality
> factor require by last dcraw release. - Quality Decoding Factor (int 0-4) :
> The famous factor using to optimize RAW decoding image (0 for slow
> computer, 3 for speed computer)
>
> TO DIGIKAM TEAM :
>
> - I have tested using this implementation using dcraw v7.49, not the last
> one released by Dave Coffin. - We can add any other advanced RAW decoding
> parameter on settings dialog tab : * -f : Interpolate RGB as four colors.
> This blurs the image a little, but it eliminates false 2x2 mesh patterns. *
> -a : Automatic color balance. The default is to use a fixed color balance
> based on a white card photographed in sunlight. * -w : Use the color
> balance specified by the camera. If this can't be found, dcraw prints a
> warning and reverts to the default. * -n : By default, dcraw clips all
> colors to prevent pink hues in the highlights. Combine this option with -b
> 0.25 to leave the image data completely unclipped. * -j : For Fuji Super
> CCD cameras, show the image tilted 45 degrees so that each output pixel
> corresponds to one raw pixel. * -s : For Fuji Super CCD SR cameras, use the
> secondary sensors, in effect underexposing the image by four stops to
> reveal detail in the highlights. For all other cameras, -j and -s are
> silently ignored.
>
In my opinnion, we must add all color balance options and colors clipe/unclip
feature.
Paco Cruz.
> Notes :
>
> - "-a" and "-w" are always actually enable on the current implementation
> and work fine. I'm not sure if ti's a good idea to disable these
> parameters. - I have never tested "-f" parameter. I think this one must be
> availabe in setup. - "-n", "-j", and "-s" are indeep settings. i'm not
> favorable to add these options, excepted if any users want these
> parameters...
>
> Please let's me hear if all is right for you ! Suggestions and wishes are
> welcome
>
> CCMAIL: digikam-devel at kde.org
>
>
> M +4 -4 libs/dimg/dimg.cpp
> M +2 -2 libs/dimg/dimg.h
> M +30 -7 libs/dimg/loaders/rawloader.cpp
> M +4 -1 libs/dimg/loaders/rawloader.h
> M +1 -1 showfoto/showfoto.cpp
> M +2 -1 utilities/imageeditor/canvas/dimginterface.cpp
> M +1 -1 utilities/imageeditor/canvas/iofilesettingscontainer.h
> M +1 -2 utilities/imageeditor/editor/imagewindow.cpp
>
>
> --- trunk/extragear/graphics/digikam/libs/dimg/dimg.cpp #493813:493814
> @@ -58,10 +58,10 @@
> {
> }
>
> -DImg::DImg(const QString& filePath)
> +DImg::DImg(const QString& filePath, bool enableRAWQuality, int RAWquality)
>
> : m_priv(new DImgPrivate)
>
> {
> - load(filePath);
> + load(filePath, enableRAWQuality, RAWquality);
> }
>
> DImg::DImg(const DImg& image)
> @@ -128,7 +128,7 @@
> m_priv = new DImgPrivate;
> }
>
> -bool DImg::load(const QString& filePath)
> +bool DImg::load(const QString& filePath, bool enableRAWQuality, int
> RAWquality) {
> FORMAT format = fileFormat(filePath);
>
> @@ -199,7 +199,7 @@
> case(RAW):
> {
> kdDebug() << filePath << " : RAW file identified" << endl;
> - RAWLoader loader(this);
> + RAWLoader loader(this, enableRAWQuality, RAWquality);
> if (loader.load(filePath))
> {
> m_priv->null = false;
> --- trunk/extragear/graphics/digikam/libs/dimg/dimg.h #493813:493814
> @@ -88,7 +88,7 @@
> };
>
> DImg();
> - DImg(const QString& filePath);
> + DImg(const QString& filePath, bool enableRAWQuality=false, int
> RAWquality=0); DImg(const DImg& image);
> DImg(uint width, uint height, bool sixteenBit, bool alpha=false,
> uchar* data = 0); ~DImg();
> @@ -97,7 +97,7 @@
>
> void reset(void);
>
> - bool load(const QString& filePath);
> + bool load(const QString& filePath, bool enableRAWQuality, int
> RAWquality); bool save(const QString& filePath, const char* format);
>
> bool isNull() const;
> --- trunk/extragear/graphics/digikam/libs/dimg/loaders/rawloader.cpp
> #493813:493814 @@ -22,7 +22,7 @@
> // This line must be commented to prevent any latency time
> // when we use threaded image loader interface for each image
> // files io. Uncomment this line only for debugging.
> -//#define ENABLE_DEBUG_MESSAGES
> +#define ENABLE_DEBUG_MESSAGES
>
> extern "C"
> {
> @@ -53,10 +53,12 @@
> namespace Digikam
> {
>
> -RAWLoader::RAWLoader(DImg* image)
> +RAWLoader::RAWLoader(DImg* image, bool enableRAWQuality, int RAWquality)
>
> : DImgLoader(image)
>
> {
> - m_hasAlpha = false;
> + m_hasAlpha = false;
> + m_enableRAWQuality = enableRAWQuality;
> + m_RAWquality = RAWquality;
> }
>
> bool RAWLoader::load(const QString& filePath)
> @@ -73,11 +75,21 @@
>
> // run dcraw with options:
> // -c : write to stdout
> - // -q : Use simple bilinear interpolation for quick results
> // -2 : 8bit ppm output
> // -w : Use camera white balance, if possible
> // -a : Use automatic white balance
> - command = "dcraw -c -q -2 -w -a ";
> + // -q : Use simple bilinear interpolation for quick results
> +
> + if (!m_enableRAWQuality)
> + command = "dcraw -c -2 -w -a -q ";
> + else
> + {
> + QCString rawQuality;
> + command = "dcraw -c -2 -w -a -q ";
> + command += rawQuality.setNum(m_RAWquality);
> + command += " ";
> + }
> +
> command += QFile::encodeName( KProcess::quote( filePath ) );
>
> #ifdef ENABLE_DEBUG_MESSAGES
> @@ -156,11 +168,22 @@
>
> // run dcraw with options:
> // -c : write to stdout
> - // -q : Use simple bilinear interpolation for quick results
> // -4 : 16bit ppm output
> // -a : Use automatic white balance
> // -w : Use camera white balance, if possible
> - command = "dcraw -c -q -4 -w -a ";
> + // -q : Use simple bilinear interpolation for quick results
> +
> + if (!m_enableRAWQuality)
> + command = "dcraw -c -4 -w -a -q ";
> + else
> + {
> + QCString rawQuality;
> + command = "dcraw -c -4 -w -a -q ";
> + command += rawQuality.setNum(m_RAWquality);
> + command += " ";
> + }
> +
> +
> command += "'";
> command += QFile::encodeName( filePath );
> command += "'";
> --- trunk/extragear/graphics/digikam/libs/dimg/loaders/rawloader.h
> #493813:493814 @@ -42,7 +42,7 @@
> {
> public:
>
> - RAWLoader(DImg* image);
> + RAWLoader(DImg* image, bool enableRAWQuality=false, int RAWquality=0);
>
> bool load(const QString& filePath);
> bool save(const QString& filePath);
> @@ -55,6 +55,9 @@
>
> bool m_sixteenBit;
> bool m_hasAlpha;
> +
> + bool m_enableRAWQuality;
> + int m_RAWquality;
>
> private:
>
> --- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #493813:493814
> @@ -536,7 +536,7 @@
> m_IOFileSettings->TIFFCompression =
> m_config->readBoolEntry("TIFFCompression", false);
>
> m_IOFileSettings->enableRAWQuality =
> m_config->readBoolEntry("EnableRAWQuality", false); -
> m_IOFileSettings->RAWquality = m_config->readNumEntry("RAWquality",
> 0); + m_IOFileSettings->RAWQuality =
> m_config->readNumEntry("RAWquality", 0);
>
> // Slideshow Settings.
> m_slideShowInFullScreen =
> m_config->readBoolEntry("SlideShowFullScreen", true); ---
> trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface
>.cpp #493813:493814 @@ -203,7 +203,8 @@
>
> d->undoMan->clear();
>
> - d->image = DImg(filename);
> + d->image = DImg(filename, iofileSettings->enableRAWQuality,
> + iofileSettings->RAWQuality);
>
> if (!d->image.isNull())
> {
> ---
> trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/iofilesetting
>scontainer.h #493813:493814 @@ -47,7 +47,7 @@
> bool enableRAWQuality;
>
> // RAW quality decoding factor value.
> - int RAWquality;
> + int RAWQuality;
>
> };
>
> ---
> trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.c
>pp #493813:493814 @@ -487,7 +487,7 @@
> m_IOFileSettings->TIFFCompression =
> config->readBoolEntry("TIFFCompression", false);
>
> m_IOFileSettings->enableRAWQuality =
> config->readBoolEntry("EnableRAWQuality", false); -
> m_IOFileSettings->RAWquality = config->readNumEntry("RAWquality", 0);
> + m_IOFileSettings->RAWQuality =
> config->readNumEntry("RAWquality", 0);
>
> AlbumSettings *settings = AlbumSettings::instance();
> if (settings->getUseTrash())
> @@ -597,7 +597,6 @@
> {
> QApplication::setOverrideCursor(Qt::WaitCursor);
>
> - // FIXME implement color management here
> if (m_ICCSettings->enableCMSetting)
> {
> kdDebug() << "enableCMSetting=true" << endl;
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
More information about the Digikam-devel
mailing list