Smoothscale addressbook images which are too large so they don't look as

pixely.

svn path=/trunk/kdepim/; revision=362863
wilder-work
Till Adam 22 years ago
parent b0eac604b5
commit 0f3195aa01
  1. 3
      headerstyle.cpp

@ -418,7 +418,6 @@ namespace KMail {
QImage photo = addresses[0].photo().data();
if ( !photo.isNull() )
{
photoURL = imgToDataUrl( photo );
photoWidth = photo.width();
photoHeight = photo.height();
// scale below 60, otherwise it can get way too large
@ -426,7 +425,9 @@ namespace KMail {
double ratio = ( double )photoHeight / ( double )photoWidth;
photoHeight = 60;
photoWidth = (int)( 60 / ratio );
photo = photo.smoothScale( photoWidth, photoHeight );
}
photoURL = imgToDataUrl( photo );
}
}
else

Loading…
Cancel
Save