Version: 0.9.4-beta4 (using KDE 3.5.8) OS: Linux Working with very large photographs (like 50 megapixel 16-bit 6x6 cm slide scans) can be a problem in Digikam. A 300 MB TIFF easily consumes 800 MB of resident memory and a total of 1200 MB of virtual memory. Maybe adding features like a configurable number of undo steps can improve the situation. CinePaint has this feature, and this application is a lot easier on the memory than DigiKam is.
SVN commit 851712 by cgilles: digiKam from KDE3 branch : AdjustCurves tool : memory consume optimization. No need to duplicates original image data here: we can use the instance from editor instead. Andi, this way can be applied in others image plugins if necessary. i'm sure that we will find old code to polish by thi way. CCBUGS: 163164 M +7 -13 adjustcurves.cpp M +1 -1 adjustcurves.h --- branches/extragear/kde3/graphics/digikam/imageplugins/adjustcurves/adjustcurves.cpp #851711:851712 @@ -87,18 +87,12 @@ AdjustCurveTool::AdjustCurveTool(QObject* parent) : EditorTool(parent) { - m_destinationPreviewData = 0L; + m_destinationPreviewData = 0; ImageIface iface(0, 0); - uchar *data = iface.getOriginalImage(); - int w = iface.originalWidth(); - int h = iface.originalHeight(); - bool sixteenBit = iface.originalSixteenBit(); - bool hasAlpha = iface.originalHasAlpha(); - m_originalImage = DImg(w, h, sixteenBit, hasAlpha ,data); - delete [] data; + m_originalImage = iface.getOriginalImg(); - m_histoSegments = m_originalImage.sixteenBit() ? 65535 : 255; + m_histoSegments = m_originalImage->sixteenBit() ? 65535 : 255; setName("adjustcurves"); setToolName(i18n("Adjust Curves")); @@ -191,8 +185,8 @@ QLabel *spacev = new QLabel(curveBox); spacev->setFixedWidth(1); - m_curvesWidget = new CurvesWidget(256, 256, m_originalImage.bits(), m_originalImage.width(), - m_originalImage.height(), m_originalImage.sixteenBit(), + m_curvesWidget = new CurvesWidget(256, 256, m_originalImage->bits(), m_originalImage->width(), + m_originalImage->height(), m_originalImage->sixteenBit(), curveBox); QWhatsThis::add( m_curvesWidget, i18n("<p>This is the curve drawing of the selected channel from " "original image")); @@ -576,7 +570,7 @@ QPoint disable(-1, -1); QPoint p = config->readPointEntry(QString("CurveAjustmentChannel%1Point%2").arg(i).arg(j), &disable); - if (m_originalImage.sixteenBit() && p.x() != -1) + if (m_originalImage->sixteenBit() && p.x() != -1) { p.setX(p.x()*255); p.setY(p.y()*255); @@ -607,7 +601,7 @@ { QPoint p = m_curvesWidget->curves()->getCurvePoint(i, j); - if (m_originalImage.sixteenBit() && p.x() != -1) + if (m_originalImage->sixteenBit() && p.x() != -1) { p.setX(p.x()/255); p.setY(p.y()/255); --- branches/extragear/kde3/graphics/digikam/imageplugins/adjustcurves/adjustcurves.h #851711:851712 @@ -132,7 +132,7 @@ Digikam::ImageWidget *m_previewWidget; - Digikam::DImg m_originalImage; + Digikam::DImg *m_originalImage; }; } // NameSpace DigikamAdjustCurvesImagesPlugin
Andi, Please look this patch and my comment. We need to apply the same way on all image plugins when we will port code to Editor Tool api Gilles
Ok... we can do it when actually converting the imageplugins. Right now I'm in the "converting the widgets" flow :-) Andi
Dik, This entry still valid with 2.x serie ? Gilles Caulier
Gentoo is still on 1.9. I'll test again when 2.x is stable. On 1.9, the problem is still the same.
Dik, This file still valid using digiKam 2.4 ? Gilles Caulier
Dik, No news from this entry please ? Gilles Caulier
Sorry it took so long, but 2.x is much better in this respect. Resolving as fixed.