From: "Ilya V. Pobelov" <pobelov@mail.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Пакетная обработка фотографий?
Date: Thu, 2 Jun 2005 21:25:22 +0200
Message-ID: <20050602192522.GB8334@pur.v.ru> (raw)
In-Reply-To: <200505271454.12283.mak@cea.ru>
[-- Attachment #1.1: Type: text/plain, Size: 760 bytes --]
On Fri, May 27, 2005 at 02:54:12PM +0400, Michael A. Kangin wrote:
> Какую программку можно применить для пакетной обработки кучи фоток с камеры?
Использую нижеследующий скрипт на ImageMagick, переодически дорабатывая.
Использовать так - свалить "большие" фотки в один каталог, в подкаталог
right/left положить те, которые нужно повернуть по/против часовой стрелки
(знаю, что не совсем логично, но так уж сложилось исторически) и запустить
скрипт. В подкаталоге small буду уменьшенные фотки и превьюшки, в основном
каталоге еще и правильно повернутые большие.
--
With best regards, Ilya V. Pobelov
ALT Linux Master 2.4 (Citron)
kernel 2.6.11-wks26-up-alt2, system uptime: 8 days, 21 min
Amorphis - 2003 - Far From The Sun - 10 - Smithereens
[-- Attachment #1.2: photo --]
[-- Type: text/plain, Size: 1275 bytes --]
#!/bin/bash
# Rotate/resize/convert to jpg photos for publishing in internet
THUMBSIZE=150
QUALITY=70
mkdir small
FILEMASK=*.{jpg,JPG,tif,TIF,png,PNG,bmp,BMP}
for IMAGE in `ls *.{jpg,JPG,tif,TIF,png,PNG,bmp,BMP} 2> /dev/null`; do
NAMELENGHT=${#IMAGE}
IMAGENAME=${IMAGE:0:$NAMELENGHT-4}
convert $IMAGE -quality $QUALITY -resize 600 small/$IMAGENAME.jpg
convert $IMAGE -resize $THUMBSIZE -quality $QUALITY small/tn_$IMAGENAME.jpg
done
[ -d left ] && for IMAGE in `ls left/*.{jpg,JPG,tif,TIF,png,PNG,bmp,BMP} 2> /dev/null`; do
NAMELENGHT=${#IMAGE}
IMAGENAME=${IMAGE:5:$NAMELENGHT-9}
convert $IMAGE -rotate -90 ${IMAGENAME}.jpg
convert $IMAGE -rotate -90 -quality $QUALITY -resize x600 small/${IMAGENAME}.jpg
convert $IMAGE -rotate -90 -quality $QUALITY -resize x${THUMBSIZE} small/th_${IMAGENAME}.jpg
done
[ -d right ] && for IMAGE in `ls right/*.{jpg,JPG,tif,TIF,png,PNG,bmp,BMP} 2> /dev/null`; do
NAMELENGHT=${#IMAGE}
IMAGENAME=${IMAGE:6:$NAMELENGHT-10}
convert $IMAGE -rotate 90 ${IMAGENAME}.jpg
convert $IMAGE -rotate 90 -resize x600 -quality $QUALITY small/${IMAGENAME}.jpg
convert $IMAGE -rotate 90 -resize x${THUMBSIZE} -quality $QUALITY small/tn_${IMAGENAME}.jpg
done
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-06-02 19:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-27 10:54 Michael A. Kangin
2005-05-27 11:21 ` [Comm] " Vitaly Ostanin
2005-05-27 18:00 ` Michael A. Kangin
2005-05-30 11:18 ` [Comm] Re: [JT] " Vitaly Ostanin
2005-05-27 12:22 ` [Comm] " Kolotov Alexandr
2005-05-27 18:17 ` Michael A. Kangin
2005-05-30 4:58 ` Kolotov Alexandr
2005-05-30 7:50 ` [Comm] [JT] " Michael A. Kangin
2005-06-02 19:25 ` Ilya V. Pobelov [this message]
2005-06-03 7:32 ` [Comm] " Kolotov Alexandr
2005-06-04 0:19 ` Ilya V. Pobelov
2005-06-04 14:06 ` Ilya V. Pobelov
2005-06-03 18:14 ` Michael A. Kangin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050602192522.GB8334@pur.v.ru \
--to=pobelov@mail.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git