Package: kvirc Version: 2:3.2.0-sarge3 Followup-For: Bug #305191
Please apply also this patch. It will fix the resize algorithm of the Kvi_Avatar class. This isn't related to heigth size bug, but also affect size of the image in the user list. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (650, 'testing'), (600, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.11 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages kvirc depends on: ii kdelibs4 4:3.3.2-4.0.2 KDE core libraries ii kvirc-data 2:3.2.0-sarge3 Data files for KVIrc ii libart-2.0-2 2.3.17-1 Library of functions for 2D graphi ii libarts1 1.3.2-3 aRts Sound system ii libasound2 1.0.8-3 ALSA library ii libaudio2 1.7-2 The Network Audio System (NAS). (s ii libaudiofile0 0.2.6-6 Open-source version of SGI's audio ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an ii libesd0 0.2.35-2 Enlightened Sound Daemon - Shared ii libfam0c102 2.7.0-6 client library to control the FAM ii libfontconfig1 2.3.1-2 generic font configuration library ii libfreetype6 2.1.7-2.3 FreeType 2 font engine, shared lib ii libgcc1 1:3.4.3-12 GCC support library ii libglib2.0-0 2.6.4-1 The GLib library of C routines ii libice6 4.3.0.dfsg.1-12.0.1 Inter-Client Exchange library ii libidn11 0.5.13-1.0 GNU libidn library, implementation ii libjack0.80.0-0 0.99.0-6 JACK Audio Connection Kit (librari ii libmad0 0.15.1b-1.1 MPEG audio decoder library ii libogg0 1.1.2-1 Ogg Bitstream Library ii libperl5.8 5.8.4-8 Shared Perl library ii libpng12-0 1.2.8rel-1 PNG library - runtime ii libqt3c102-mt 3:3.3.4-2 Qt GUI Library (Threaded runtime v ii libsm6 4.3.0.dfsg.1-12.0.1 X Window System Session Management ii libssl0.9.7 0.9.7e-3 SSL shared libraries ii libstdc++5 1:3.3.5-8 The GNU Standard C++ Library v3 ii libvorbis0a 1.1.0-1 The Vorbis General Audio Compressi ii libvorbisenc2 1.1.0-1 The Vorbis General Audio Compressi ii libvorbisfile3 1.1.0-1 The Vorbis General Audio Compressi ii libx11-6 4.3.0.dfsg.1-12.0.1 X Window System protocol client li ii libxcursor1 1.1.3-1 X cursor management library ii libxext6 4.3.0.dfsg.1-12.0.1 X Window System miscellaneous exte ii libxft2 2.1.7-1 FreeType-based font drawing librar ii libxrandr2 4.3.0.dfsg.1-12.0.1 X Window System Resize, Rotate and ii libxrender1 0.8.3-7 X Rendering Extension client libra ii libxt6 4.3.0.dfsg.1-12.0.1 X Toolkit Intrinsics ii xlibs 4.3.0.dfsg.1-12 X Keyboard Extension (XKB) configu ii zlib1g 1:1.2.2-3 compression library - runtime -- no debconf information -- | / | \Byte - Andrea Briganti - [EMAIL PROTECTED] http://kbytesys.altervista.org - ICQ: 40872731 CSLug member: http://cslug.linux.it - JID: [EMAIL PROTECTED] *** Lo zero tende talmente a zero che sembra quasi zero (Prof. univ.)
--- kvirc-3.2.0.new/src/kvilib/irc/kvi_avatar.cpp.old 2005-04-19 00:28:17.000000000 +0200 +++ kvirc-3.2.0.new/src/kvilib/irc/kvi_avatar.cpp 2005-04-19 00:47:21.000000000 +0200 @@ -138,10 +138,20 @@ m_uLastScaleHeight = h; int scaleW = w; - int scaleH = h; + int scaleH; - if(curW > curH)scaleH = (curH * scaleW) / curW; - else scaleW = (scaleH * curW) / curH; + /* We want to maintain the aspect of the image instead simply set + height and width. The first step is trying to adapt the image size + by "w" vaule */ + + scaleH = (curH * scaleW) / curW; + + /* Now check the resized image size. If it is too wide or too tall, + resize it again by "h" value */ + if(scaleH > h) { + scaleH = h; + scaleW = (scaleH * curW) / curH; + } QImage img = m_pPixmap->convertToImage();