Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-11-15 20:20:51

mike555
Member
Registered: 2011-08-01
Posts: 18

[Solved] resize images in thunar

I have xfce 4.8 and need a script for thunar to resize images , I tried a few but they didn't work in xfce 4.8 ........ anyone got a working script?

Offline

#2 2011-11-15 21:05:38

mike555
Member
Registered: 2011-08-01
Posts: 18

Re: [Solved] resize images in thunar

Never mind I got it....  if your interested you open leafpad and paste this;

#!/bin/sh                                                                                                                     

mkdir -p ./Resized/$1

for file
    do
    if [ ! -e $file ]
        then
        continue
    fi
    toname="./Resized/"$1"/"$( echo $file | cut -f1 -d.)"_"$1".jpg"
    convert -geometry $1x$1 -quality 100 "${file}" "${toname}"
done

save it in your /home as " .resize " without the quotes , allow it to run as program in properties ...... then make a thunar custom action called "resize 640"  and the command "  /home/mike/.resize 640 %N " (changing mike for your user name) then set the appearance settings to "  *.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG  "  and image files............

Offline

#3 2012-10-01 18:50:43

gepponline
Member
Registered: 2012-10-01
Posts: 2

Re: [Solved] resize images in thunar

Hi!
  I'm new with XFCE ,  I used nautilus and its batch image resizing tool before.
It seem strange to me that nobody has create a similar tool for thunar.
...However...I use your script and it work fine even if i need to create as many custom action as different dimension i suppose to use.
My "problem" is that if i select many big files, it takes some time and there is no way to know when it has finished.
Is it possible to add something that show if the script is still working or it has finished?
thank you!

Offline

#4 2012-10-01 19:38:08

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: [Solved] resize images in thunar

You can just install SIR (simple image resizer) and create a custom action for it.
Command: sir %F
Appearance conditions: Directories, image files
files: *

Offline

#5 2012-10-02 06:41:15

gepponline
Member
Registered: 2012-10-01
Posts: 2

Re: [Solved] resize images in thunar

Is SIR already in ubuntu repository?
Is it possible to pass it selected files with %N parameter in custom action?

Offline

#6 2012-10-02 11:11:06

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: [Solved] resize images in thunar

The way I said, it works.
There's a PPA for it ( http://sir.projet-libre.org/?page=download ), I don't know if it's updated (I use Fedora).

But you can search for other image resizers. I remember in Debian I had another one installed, don't recall the name. Then maybe the one you install will work too.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 530.13 KiB (Peak: 530.97 KiB) ]