Script: repic
Download Links: |
|
||||||
Description: | Resizes and rotates JPEGs; creates Claws and Kmail email with pics attached | ||||||
Recommended For: | Linux | ||||||
Requires: | imagemagick jhead zenity | ||||||
License: | GNU GPL v3 * SEE DISCLAIMER * | ||||||
Related: | pcmanfm-mod scanpic webpics | ||||||
Feedback: | comments – issues |
Overview
repic resizes one or more JPEG files on the command line, and can also create an email message in Claws or KMail with the resized images attached. By default, the original file will be retained and a new file will be created.
repic --help Resizes JPEG file(s) if larger than size; rotates original if needed Optional: Creates email message with pics attached (Claws and KMail) Requires: imagemagick jhead zenity Usage: repic [OPTIONS] JPEGFILE ... OPTIONS: --size ###x### maximum HxV dims [default 1280x1024] --quality ## jpeg quality [default 85] --replace overwrite original files --remove remove original files --norotate do not auto-rotate originals --rotateonly auto-rotate originals only, no resize --tmp Move resized file(s) to /tmp --email Create an email message [default 1024x768] --intersize toggle interactive size dialog --interquality toggle interactive quality dialog --interopt toggle interactive options dialog --verbose detailed feedback |
Examples:
# To resize an entire folder of pics to 800x600: repic --size 800x600 /mypicsfolder/*.jpg # To resize a pic to 1024x768 and attach it to an email: repic --email example.jpg |
Note that by default this script may alter the original file by rotating it if needed. If you don’t want it to do so, use the ––norotate option.)
The inter… options will cause a dialog to appear, allowing you to specify image size, quality, and options. This is handy when integrated with a file manager, allowing you open selected files with repic and then choose what you want done. (This functionality requires Zenity to be installed.)
Installation Instructions
Follow the standard Script Installation Instructions. Alternatively, for Debian and Ubuntu a deb package and a PPA repository are available. On Arch Linux, repic can be installed automatically using the AUR.
Before running repic, install required packages using your package manager. For example, on Debian/Ubuntu:
apt-get install imagemagick jhead zenity |
The top of the script contains a User Defaults section where you can set various options to the defaults you want – edit the script to adjust these.
Zenity is so last year! How do I use this with Yad?
Comment by Moi | September 26, 2012 |
I don’t use yad so you’ll have to convert that yourself. I also recommend checking out the new SpaceFM Dialog, which is similar to yad, zenity, etc.
Comment by IgnorantGuru | September 26, 2012 |