Efficient Thumbnailing - Only the app icon will show

Hi all,

I’ve tried to change tavios thumbnail function to an more faster version (described in viewtopic.php?t=190 ).

But I have one problem: only the app icon appear :frowning:

With the original: [code]SetEnv fvwm_icon_size 150
DestroyFunc Thumbnail
AddToFunc Thumbnail

  • I Raise
  • I SetEnv Icon-$[w.id] $[w.IconFile]
  • I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead
    “xwd -silent -id $[w.id] | convert -scale $[fvwm_icon_size] -quality 0
    xwd:- png:/dev/shm/icon.tmp.$[w.id].png;
    echo WindowStyle IconOverride, Icon /dev/shm/icon.tmp.$[w.id].png”
  • I Iconify[/code]
    a nice thumnail of the minimized window appears.

But with [code]SetEnv fvwm_icon_size 150
DestroyFunc Thumbnail
AddToFunc Thumbnail

  • I Raise
  • I SetEnv Icon-$[w.id] $[w.IconFile]
  • I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead
    “[fvwm_script]/thumb $[w.id] $[fvwm_icon_size] /dev/shm/icon.tmp.$[w.id].png $[w.IconFile]”;
    echo WindowStyle IconOverride, Icon /dev/shm/icon.tmp.$[w.id].png"
  • I Iconify[/code]
    only the app icon will appear.

I use pems config with defined mini icons like this: Style Gecko EWMHMiniIconOverride, \ Icon $[fvwm_icon]/32x32/apps/mozilla.png, \ MiniIcon $[fvwm_icon]/16x16/apps/mozilla.png

Under /dev/shm/ I find the temporarily screenshot of the window. but it will not load onto the desktop. Why and how can I fix it?

Cheers

TF

Hi TF,

Try leaving out the line which says:

echo WindowStyle IconOverride, Icon

My personal thumbnail function (obviously paths and usage of temp dir is different, also I use miniiconfile):

[code]SetEnv fvwm_icon_size 48
DestroyFunc Thumbnail
AddToFunc Thumbnail

  • I Raise
  • I SetEnv Icon-$[w.id] $[w.IconFile]
  • I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead “$[HOME]/bin/thumb $[w.id] $[fvwm_icon_size] $[fvwm_tmp_dir]/icon.tmp.$[w.id].png ‘$[w.miniiconfile]’”
  • I Iconify[/code]

I hope this helps.

Regards,

Rob

Hi Rob,

I have made the test before without the echo WindowStyle IconOverride, Icon
but it hasn’t worked. So I tried different settings and different thumb.c files from the post thread.

After your post I made several tests again but nothing helps. Then I searched for the variable w.Iconfile to find out what it means. I haven’t found anything about it (only the entry in news on the FVWM homepage) but I found the side from pem ( pemarchandet.free.fr/fvwm.html ) and take this version of thumb.c and his functions. Now it works :smiley:

But not so fast as I have visualized - about 2 seconds - the old function with xwd and convert took 4 seconds. :confused: But it’s ok, better then 4 seconds.

Thanks for helping

Best Regards,

TF

Remember that you can make it faster by lowering the quality setting and using smaller icons.

Hi Paapaa,

to change the size of icons I reduce the value in fvwm_icon_size. But where must I change the quality settings? I think I must i do it in thumb.c . But I cannot find any part there to do that :frowning:

Best Regards,

TF