Re: [PATCH] Frame large images with a small file size.





Say I have an image on my desktop. The file is 500k, so its thumbnailed.
I didn't do anything to the icon, so its showed at 96 pixels size, from
the thumbnail.

Now I select "Stretch Icon" from the menu and make the icon 200x200
pixels. If we continue to use the thumbnail for this it'll look pretty
fuzzy. What I would like is for it to switch to using the actual file as
the thumbnail for sizes > 128 pixels. This would make the icon look
crisp and nice.

OK I got it, but if I zoom in the thumbnail size also gets larger then 128. Nautilus would become very slow for people using a high zoom level. :-(


On another note. The thumbnail size in pixels is not specified in gnome-thumbnail.h. Therefore Nautilus hardcodes 128 in it's code. (IMO A bit ugly)

Wouldn't it be better to do in gnome-thumbnail.h

typedef enum {
  GNOME_THUMBNAIL_SIZE_NORMAL = 128,
  GNOME_THUMBNAIL_SIZE_LARGE  = 256
} GnomeThumbnailSize;

instead of

typedef enum {
  GNOME_THUMBNAIL_SIZE_NORMAL,
  GNOME_THUMBNAIL_SIZE_LARGE
} GnomeThumbnailSize;

Then nautilus can just use the enum to do the calculations for thumbnail sizes.


That would be an ABI change at this point, and would seem to mean you
can pass any size into a GnomeThumbnailSize argument. It might have been
a good idea, but its a bit late to change now. Maybe we can add
something to get the pixel size of a GnomeThumbnailSize.

Oops, didn't think of the ABI adding a function to get it does not seem like a bad idea. :-). What about filing a bug on it?



I also just thought of the fact that my argument having a smaller gnome thumbnail size of 96 i.s.o. 128 will result in a speed up of the thumbnailing with a factor of 1.77 is complete bogus. The downscaling of the image will be 1.77 faster, but I didn't think of reading the file and for example jpeg decoding it. Those two things will take more then 90% of the total time I think.

Jaap



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]