Scale2pics - batch image scaler
Posted: Fri 16 May 2008, 08:09
http://dotpups.de/dotpups/Graphics/Scale2pics.pet (13 kb)
Mirror: http://puppyfiles.ca/dotpupsde/dotpups/ ... e2pics.pet
Requires Gtk2, was compiled in Puppy 3.
If the binaries do not work in your Puppy, you can compile them like this:
cd /usr/local/Scale2pics
./install
usage: (scale2pics)
This converts a whole folder.
scale2pics /usr/share/backgrounds /root/testpics/ 30 20 85 jpg
(the targetfolder may not exist yet)
This will do:
- create a folder /root/testpics/
- create in this folder scaled jpg-files with a maximum size of 30x20 pixel, with 85% quality from all pictures in /usr/share/backgrounds.
usage: (scale2pic)
This converts a single file.
scale2pic /usr/share/backgrounds/default.jpg /root/testpics/output.png 30 20 60
(the targetfolder here must exist already)
Supported input formats: did not try, at least these work: xpm, png, bmp, jpg
Supported output-formats: png, bmp, jpg, ico (NOT xpm!)
----------------------------------------
Both are scripts.
They use 4 binaries. To see how those work, you can look at the script:
/usr/local/Scale2pics/example
Note: the scripts keep the aspect-ratio.
if you have a source of 320x200, and give as targetsize 32x1000, then you will get 32x20, as the sizes define the maximum values, if the aspectratio allows them.
This is very fine, if you want to batch-convert pictures for websites, where pictures should never be higher or wider than 50px for thumbnails.
Mark
Mirror: http://puppyfiles.ca/dotpupsde/dotpups/ ... e2pics.pet
Requires Gtk2, was compiled in Puppy 3.
If the binaries do not work in your Puppy, you can compile them like this:
cd /usr/local/Scale2pics
./install
usage: (scale2pics)
This converts a whole folder.
scale2pics /usr/share/backgrounds /root/testpics/ 30 20 85 jpg
(the targetfolder may not exist yet)
This will do:
- create a folder /root/testpics/
- create in this folder scaled jpg-files with a maximum size of 30x20 pixel, with 85% quality from all pictures in /usr/share/backgrounds.
usage: (scale2pic)
This converts a single file.
scale2pic /usr/share/backgrounds/default.jpg /root/testpics/output.png 30 20 60
(the targetfolder here must exist already)
Supported input formats: did not try, at least these work: xpm, png, bmp, jpg
Supported output-formats: png, bmp, jpg, ico (NOT xpm!)
----------------------------------------
Both are scripts.
They use 4 binaries. To see how those work, you can look at the script:
/usr/local/Scale2pics/example
Note: the scripts keep the aspect-ratio.
if you have a source of 320x200, and give as targetsize 32x1000, then you will get 32x20, as the sizes define the maximum values, if the aspectratio allows them.
This is very fine, if you want to batch-convert pictures for websites, where pictures should never be higher or wider than 50px for thumbnails.
Mark