[KimDaBa] Patch for handling extreme shaped images
Jesper K. Pedersen
blackie at blackie.dk
Sun Jan 16 18:02:26 GMT 2005
You must have the most weird set of images :-)
Thanks, applied.
Cheers
Jesper.
On Sunday 16 January 2005 18:29, Robert L Krawitz wrote:
| I found that reloading the thumbnail view was consuming all of my
| virtual memory. It turned out that this was a problem in
| ThumbNail::calcRect() in some cases with extreme image shapes. In my
| case, I was using a thumbnail size of 256, with an image shaped 1x511
| (1 pixel wide, 511 pixels high). The result was that the width was
| being rounded down to zero. This fix ensures that that particular
| corner case won't happen.
|
| *** thumbnail.cpp.~1.45.~ 2005-01-12 16:37:36.000000000 -0500
| --- thumbnail.cpp 2005-01-16 12:25:37.433608331 -0500
| ***************
| *** 186,191 ****
| --- 186,195 ----
| w = (int) (size * ( w*1.0 / h ));
| h = size;
| }
| + if ( w < 1 )
| + w = 1;
| + if ( h < 1 )
| + h = 1;
|
| QRect textRect(0,0,0,0);
| if ( Options::instance()->displayLabels() ) {
|
| _______________________________________________
| KimDaBa mailing list
| KimDaBa at klaralvdalens-datakonsult.se
| http://sulaco.hrhansen.dk/mailman/listinfo/kimdaba
--
Having trouble finding a given image in your collection containing
thousands of images?
http://ktown.kde.org/kimdaba might be the answer.
More information about the Kphotoalbum
mailing list