@@ -287,10 +287,6 @@ bool QgsRenderChecker::compareImages( const QString &testName,
287
287
maskImagePath += QLatin1String ( " _mask.png" );
288
288
const QImage maskImage ( maskImagePath );
289
289
const bool hasMask = !maskImage.isNull ();
290
- if ( hasMask )
291
- {
292
- qDebug ( " QgsRenderChecker using mask image" );
293
- }
294
290
295
291
//
296
292
// Set pixel count score and target
@@ -358,10 +354,13 @@ bool QgsRenderChecker::compareImages( const QString &testName,
358
354
// Put the same info to debug too
359
355
//
360
356
361
- qDebug ( " Expected size: %dw x %dh" , myExpectedImage.width (), myExpectedImage.height () );
362
- qDebug ( " Actual size: %dw x %dh" , myResultImage.width (), myResultImage.height () );
363
- if ( hasMask )
364
- qDebug ( " Mask size: %dw x %dh" , maskImage.width (), maskImage.height () );
357
+ if ( myExpectedImage.width () != myResultImage.width () || myExpectedImage.height () != myResultImage.height () )
358
+ {
359
+ qDebug ( " Expected size: %dw x %dh" , myExpectedImage.width (), myExpectedImage.height () );
360
+ qDebug ( " Actual size: %dw x %dh" , myResultImage.width (), myResultImage.height () );
361
+ if ( hasMask )
362
+ qDebug ( " Mask size: %dw x %dh" , maskImage.width (), maskImage.height () );
363
+ }
365
364
366
365
if ( mMatchTarget != myPixelCount )
367
366
{
@@ -464,7 +463,10 @@ bool QgsRenderChecker::compareImages( const QString &testName,
464
463
//
465
464
// Send match result to debug
466
465
//
467
- qDebug ( " %d/%d pixels mismatched (%d allowed)" , mMismatchCount , mMatchTarget , mismatchCount );
466
+ if ( mMismatchCount > mismatchCount )
467
+ {
468
+ qDebug ( " %d/%d pixels mismatched (%d allowed)" , mMismatchCount , mMatchTarget , mismatchCount );
469
+ }
468
470
469
471
//
470
472
// Send match result to report
0 commit comments