Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 25 Jul 2014, 11:28
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Scale2pics - batch image scaler
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 16 May 2008, 04:09    Post subject:  Scale2pics - batch image scaler
Subject description: only some kb, no big ImageMagick needed
 

http://dotpups.de/dotpups/Graphics/Scale2pics.pet (13 kb)
Mirror: http://puppyfiles.ca/dotpupsde/dotpups/Graphics/Scale2pics.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

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
kevin-isca


Joined: 20 Apr 2008
Posts: 13
Location: Exeter, Devon

PostPosted: Sun 25 May 2008, 09:01    Post subject:  

Many thanks MU
This is simple (for me to use Very Happy ) and works!!
Back to top
View user's profile Send private message Visit poster's website 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Mon 24 May 2010, 22:42    Post subject:  

Sorry for bumping old thread but this is a great little .pet

wasted so much time resizing 1 file at a time in gimp.

thanks.
Back to top
View user's profile Send private message 
emil

Joined: 10 Nov 2009
Posts: 614
Location: Austria

PostPosted: Mon 04 Apr 2011, 14:23    Post subject: works in 5.1 quickset edition  

works still in 5.1. quickset edition without hassle.
great! Very Happy
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Tue 05 Apr 2011, 06:24    Post subject: picscale  

Dear Puppians,

I did this a while back and seems to work. It is also pretty small and can be used in scripts for rescaling various file types using only gdk calls (like Mark's). Please have a look http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=34335. I included a binary.... The reason I did this was because, as I recall, Marks version did not handle the alpha channel (png transparency) properly.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
GustavoYz


Joined: 07 Jul 2010
Posts: 895
Location: .ar

PostPosted: Wed 06 Apr 2011, 00:26    Post subject:  

vovchik wrote:
...handle the alpha channel (png transparency) properly...

Thanks!
Very Happy

_________________

Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1803
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Tue 21 Aug 2012, 05:01    Post subject:  

Thank you! There are so many "forgotten" things in this Forum...
_________________

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0651s ][ Queries: 12 (0.0113s) ][ GZIP on ]