Version: 3.5.3 (using KDE 3.5.3, Debian Package 4:3.5.3-1 (testing/unstable)) [ Imported from http://bugs.debian.org/382937 ] When you generate a gallery with two images that differ only in the extension the two thumbnails are the same: there is only a thumbnail of one of the images. If the proportions of the two original images are different one of the thumbnails is shown distorted. For example: take two images photo.gif and photo.jpg (the images have to be really different) and generate a gallery. ------ Self explanatory screenshot at : http://bugs.debian.org/cgi-bin/bugreport.cgi/gallery1.jpg?bug=382937;msg=10;att=2 and http://bugs.debian.org/cgi-bin/bugreport.cgi/gallery.jpg?bug=382937;msg=10;att=1
Created attachment 17373 [details] avoid thumbnails name clash With this patch, the original file extension is no longer trimed. So that, for example, photo.jpg and photo.gif can have their thumbnail (respectively photo.jpg.jpg and photo.gif.jpg), instead of sharing photo.jpg and thumbnail's name.
SVN commit 620556 by mkoller: BUG: 132407 Don't trim filename extensions to avoid filename clash with two files having the same name but different filetypes (extension) Patch provided by Olivier Trichet M +3 -4 imgalleryplugin.cpp --- branches/KDE/3.5/kdeaddons/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp #620555:620556 @@ -202,8 +202,7 @@ if (createThumb(imgName, sourceDirName, imgGalleryDir, imageFormat)) { - const QString imgNameFormat = imgName.left(imgName.findRev('.',-1)); - const QString imgPath("thumbs/" + imgNameFormat + extension(imageFormat)); + const QString imgPath("thumbs/" + imgName + extension(imageFormat)); stream << "<img src=\"" << imgPath << "\" width=\"" << m_imgWidth << "\" "; stream << "height=\"" << m_imgHeight << "\" alt=\"" << imgPath << "\"/>"; m_progressDlg->setLabelText( i18n("Created thumbnail for: \n%1").arg(imgName) ); @@ -356,7 +355,7 @@ // ..all the thumbnails .. for (uint i=0; i < imageDir.count(); i++) { const QString imgName = imageDir[i]; - const QString imgNameFormat = imgName.left(imgName.findRev('.',-1)) + extension(imageFormat); + const QString imgNameFormat = imgName + extension(imageFormat); bool isRemoved = thumb_dir.remove(imgNameFormat); kdDebug(90170) << "removing: " << thumb_dir.path() << "/" << imgNameFormat << "; "<< isRemoved << endl; } @@ -435,7 +434,7 @@ KIO::NetAccess::copy(srcURL, destURL, static_cast<KParts::Part *>(parent())->widget()); } - const QString imgNameFormat = imgName.left( imgName.findRev('.',-1) ) + extension(imageFormat); + const QString imgNameFormat = imgName + extension(imageFormat); const QString thumbDir = imgGalleryDir + QString::fromLatin1("/thumbs/"); int extent = m_configDlg->getThumbnailSize();