[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.2/kdegraphics/gwenview
From:       Aurélien Gâteau <aurelien.gateau () free ! fr>
Date:       2009-01-26 9:32:16
Message-ID: 1232962336.446764.22211.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 916858 by gateau:

Do not handle one-frame gif as animations. BUG:181177


 M  +3 -1      lib/document/loadingdocumentimpl.cpp  
 A             tests/1frame.gif  
 M  +2 -0      tests/documenttest.cpp  


--- branches/KDE/4.2/kdegraphics/gwenview/lib/document/loadingdocumentimpl.cpp #916857:916858
@@ -202,7 +202,9 @@
 			mImage = mImage.transformed(matrix);
 		}
 
-		if (reader.supportsAnimation() && reader.currentImageNumber() != -1) {
+		if (reader.supportsAnimation()
+			&& reader.nextImageDelay() > 0 // Assume delay == 0 <=> only one frame
+		) {
 			LOG("This is an animated image");
 			mAnimated = true;
 		}
--- branches/KDE/4.2/kdegraphics/gwenview/tests/documenttest.cpp #916857:916858
@@ -110,6 +110,8 @@
 	        "jpeg", MimeTypeUtils::KIND_RASTER_IMAGE, false);
 	NEW_ROW("4frames.gif",
 	        "gif", MimeTypeUtils::KIND_RASTER_IMAGE, true);
+	NEW_ROW("1frame.gif",
+	        "gif", MimeTypeUtils::KIND_RASTER_IMAGE, false);
 	NEW_ROW("test.xcf",
 	        "xcf", MimeTypeUtils::KIND_RASTER_IMAGE, false);
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic