Re: .jpg thumbnailing
- From: Gábor Farkas <gabor z10n net>
- To: Alexander Larsson <alexl redhat com>
- Cc: Kotrla Vitezslav <kotrla ceb cz>, Nautilus <nautilus-list gnome org>
- Subject: Re: .jpg thumbnailing
- Date: Mon, 11 Oct 2004 13:29:30 +0200
Alexander Larsson wrote:
On Mon, 2004-10-11 at 11:23 +0200, Kotrla Vitezslav wrote:
Are there any problems with checking picture dimensions instead of byte size?
Yes. Its slow. You need to do file i/o to get it.
hmmmm...as i see, when displaying a picture one always have to get the
dimensions...
or, to reformulate , one always has to scale.
as i understand the displaying code goes like:
===
long imageSize = somehowGetImageFileSize();
if (imageSize > 30kb)
displayNormalPictureFromThumbnail();
else
displayIcon();
===
now, displayIcon will open the file, rescale it to icon-size, and
display it. that means he gets the dimensions. couldn't we modify the
code to work like:
===
long imageSize = somehowGetImageFileSize();
if (imageSize > 30kb)
displayNormalPictureFromThumbnail();
else
{
int x,y = somehowGetImageDimensions();
if ( isIcon(x,y) )
displayIcon();
else
displayNormalPicture();
}
===
i understand this is not the cleanest approach, but it's a relatively
small modification......
what do you think?
gabor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]