Version: 0.9 (using KDE KDE 3.5.0) Installed from: SuSE RPMs Compiler: gcc 4 OS: Linux In digikam 0.9 Revision 505718 after some image modifications its not possible to save the image. I get an error dialog "Faild to save image <name> to folder <foldername>". I saw this after applying Fix->Colors->Autocorrection->Normalize. Other modifications like fliping the photo will not lead to this problem. The same photo can be saved then.
Give me more informations to start digiKam from a console. Note : I cannot accept any bug report about 0.9.0 alpha because the code is under development !!! Gilles Caulier
Give me a copy of your original image to test on my computer (put it on the web to download) Witch kde/qt release you use ? Gilles
Am Samstag, 4. Februar 2006 21:17 schrieb Gilles Caulier: [bugs.kde.org quoted mail] KDE 3.5.0-29 (SuSE-RPMS on suse10.0) qt 3.3.5-22 ( " ) Rainer
Am Samstag, 4. Februar 2006 21:17 schrieb Gilles Caulier: [bugs.kde.org quoted mail] Sorry forgot the link to the photo.... http://www.uni-koblenz.de/~krienke/tmp/dsc_0877.jpg Have a nice day Rainer
In between I did an upgrade from KDE 3.5.0 to 3.5.1. The bug is still there so it does not seem to depend on the KDE version. Rainer
El S
Have the same problem in trunk. After core mods (not digikamimageplugins) images are saved, after others - not. ---------------------------------------------------- Harry Potter i Ksi
Yes "save as" does work whereas a simple "save" does not. But for me it happens every time I apply the Autocorrection->Normalize filter but it happened never when I tried to flip the photo. So there seems to be some kind of dependency on the tool beeing used. It does not look like random behaviour. Rainer
SVN commit 507673 by mwiesweg: First part of the fix for 121370, only curing symptoms - try harder finding a mimetype in DImgInterface - remove const char usage, use QString (not part of the fix) CCBUG: 121370 M +7 -5 libs/dimg/dimg.cpp M +1 -1 libs/dimg/dimg.h M +1 -1 libs/threadimageio/loadsavetask.cpp M +16 -6 utilities/imageeditor/canvas/dimginterface.cpp --- trunk/extragear/graphics/digikam/libs/dimg/dimg.cpp #507672:507673 @@ -238,14 +238,16 @@ return false; } -bool DImg::save(const QString& filePath, const char* format, DImgLoaderObserver *observer) +bool DImg::save(const QString& filePath, const QString& format, DImgLoaderObserver *observer) { if (isNull()) return false; - - QString frm = QString::fromLatin1(format); - frm = frm.upper(); - + + if (format.isEmpty()) + return false; + + QString frm = format.upper(); + if (frm == "JPEG" || frm == "JPG") { JPEGLoader loader(this); --- trunk/extragear/graphics/digikam/libs/dimg/dimg.h #507672:507673 @@ -109,7 +109,7 @@ bool load(const QString& filePath, DImgLoaderObserver *observer = 0, RawDecodingSettings rawDecodingSettings=RawDecodingSettings()); - bool save(const QString& filePath, const char* format, DImgLoaderObserver *observer = 0); + bool save(const QString& filePath, const QString& format, DImgLoaderObserver *observer = 0); bool isNull() const; uint width() const; --- trunk/extragear/graphics/digikam/libs/threadimageio/loadsavetask.cpp #507672:507673 @@ -325,7 +325,7 @@ void SavingTask::execute() { - bool success = m_img.save(m_filePath, m_format.ascii(), this); + bool success = m_img.save(m_filePath, m_format, this); m_thread->taskHasFinished(); QApplication::postEvent(m_thread, new SavedEvent(m_filePath, success)); }; --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #507672:507673 @@ -433,7 +433,7 @@ } void DImgInterface::saveAs(const QString& file, IOFileSettingsContainer *iofileSettings, - const QString& mimeType) + const QString& givenMimeType) { d->cmod.reset(); d->cmod.setGamma(d->gamma); @@ -443,17 +443,27 @@ d->needClearUndoManager = false; + // Try hard to find a mimetype. + QString mimeType = givenMimeType; + // This is possibly empty if (mimeType.isEmpty()) - saveAction(file, iofileSettings, d->image.attribute("format").toString()); - else - saveAction(file, iofileSettings, mimeType); + { + mimeType = d->image.attribute("format").toString(); + // It is a bug if format attribute is not given + if (mimeType.isEmpty()) + { + kdWarning() << "DImg object does not contain attribute \"format\"" << endl; + mimeType = QImageIO::imageFormat(d->filename); + } + } + saveAction(file, iofileSettings, mimeType); } void DImgInterface::saveAction(const QString& fileName, IOFileSettingsContainer *iofileSettings, const QString& mimeType) { kdDebug() << "Saving to :" << QFile::encodeName(fileName).data() << " (" - << mimeType.ascii() << ")" << endl; + << mimeType << ")" << endl; if ( mimeType.upper() == QString("JPG") || mimeType.upper() == QString("JPEG") ) d->image.setAttribute("quality", iofileSettings->JPEGCompression); @@ -465,7 +475,7 @@ d->image.setAttribute("compress", iofileSettings->TIFFCompression); d->savingFilename = fileName; - d->thread->save(d->image, fileName, mimeType.ascii()); + d->thread->save(d->image, fileName, mimeType); } void DImgInterface::slotImageSaved(const QString& filePath, bool success)
Now saving the image works again, but after it has been saved all the EXIF infos are lost. Rainer
Commits 508640 and 508653 should have fixed this. Now metadata is always preserved in DImg.