Author Topic: .thumbnails smaller size  (Read 651 times)

Offline marian

  • Hero Member
  • *****
  • Posts: 608
  • Hi
.thumbnails smaller size
« on: February 01, 2010, 07:56:49 PM »
I was wondering if there is a way of reducing the big thumbnails in ~/.thumbnails folder.
Looking for some settings to produce smaller thumbnails for pictures and movies because I think 100KB and more is too much for a approx 1MB picture.
Freedom is the only way!

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11588
  • ----IOFLU----
Re: .thumbnails smaller size
« Reply #1 on: February 01, 2010, 09:45:36 PM »
I was wondering if there is a way of reducing the big thumbnails in ~/.thumbnails folder.
Looking for some settings to produce smaller thumbnails for pictures and movies because I think 100KB and more is too much for a approx 1MB picture.

I don't know about reducing the size of individual thumbnails, but I wrote a simple script a few years ago to empty the thumbnail files from a users ~ directory, and I set a cron job to run it every hour. As root I copy it to the /user/local/bin directory, then use kcron as root to set a cron job for each user. You could use it, with your own time schedule, or just run it at random, whenever you choose.

=================== start ==================
#!/bin/sh
# Name: tnails
# Author: old-polack
# Purpose: script to clean thumbnails directory
#
cd ~/.thumbnails/normal
rm -f *.png
cd ../large
rm -f *.png


==================== end ==================

Be sure to leave a blank new line at the end, as shown. Enjoy. :D
« Last Edit: February 01, 2010, 09:47:15 PM by old-polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline marian

  • Hero Member
  • *****
  • Posts: 608
  • Hi
Re: .thumbnails smaller size
« Reply #2 on: February 02, 2010, 06:09:11 AM »
Thanx it works great when one wants to empty the .thumbnails directory regularly.  If you want to see thumbnails the system needs to create them and afterwards you delete them. Unfortunately it's like fighting windmills. Much better would be to create smaller ones in jpeg when the occupied space is negligible. Or even better would be one file for a directory. Of course I am not a programmer or something so just looking for some settings to reduce the size.  :-\

I've just made a test by saving one of those thumbnails as jpeg and png. There's no big difference in quality but in size it is huge.

JPEG 7.5KB
PNG 75.5KB  ???

Maybe there is some copyright issue not to use JPEG but PNG.

Thanx anyway. This will do it till I found something better.  ;)
Freedom is the only way!

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11588
  • ----IOFLU----
Re: .thumbnails smaller size
« Reply #3 on: February 02, 2010, 10:35:29 AM »
Thanx it works great when one wants to empty the .thumbnails directory regularly.  If you want to see thumbnails the system needs to create them and afterwards you delete them. Unfortunately it's like fighting windmills. Much better would be to create smaller ones in jpeg when the occupied space is negligible. Or even better would be one file for a directory. Of course I am not a programmer or something so just looking for some settings to reduce the size.  :-\

I've just made a test by saving one of those thumbnails as jpeg and png. There's no big difference in quality but in size it is huge.

JPEG 7.5KB
PNG 75.5KB  ???

Maybe there is some copyright issue not to use JPEG but PNG.

Thanx anyway. This will do it till I found something better.  ;)

I wrote that script when I found over 9,000 thumbnail files in each of the .thumbnail sub directories, and had to remove them in blocks, because the number exceeded what could be removed with a single command. The limit was something like 4,000. They were using considerable space, in that quantity, and there were many many repeats of each, with nothing being removed at all, once created.

Having the tnails script allowed me to clean out the whole mess, before reaching the 4,000 item limit. While working with a lot of graphic files, the number of thumbnails generated, in short periods of time, led me to running tnails as a cron job. Opening a single directory with 500 - 1000 pictures would add that many thumbnails each time. Opening a series of directories in relatively quick succession led to the cron job running the script hourly.

Having the thumbnails is necessary when checking batches of pictures, but they breed like rabbits, and need population control. ;D ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...