Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37823152
en ru br
ALT Linux repositórios
S:0.02-alt1
4.1: 0.01-alt0.M41.4

Group :: Gráficos
RPM: multover

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

multover-0.01/000075500000000000000000000000001157352145600133165ustar00rootroot00000000000000multover-0.01/Makefile000064400000000000000000000001141157352145600147520ustar00rootroot00000000000000WORK=example* file.avi
JUNK=*~ *.bak o o.*


clean:
rm -rf $(JUNK) $(WORK)
multover-0.01/create_example000075500000000000000000000032611157352145600162240ustar00rootroot00000000000000#!/bin/sh

L="`ls /usr/share/doc/*/images/logo.jpg|tail -1`"
P="`ls /usr/share/doc/*/images/granite.png|tail -1`"
W=`identify "$L" | sed 's/.* JPEG \([0-9]*\)x.*/\1/'`
H=`identify "$L" | sed 's/.* JPEG [0-9]*x\([0-9]*\).*/\1/'`

CW="${1:-640}"
CH="${2:-480}"
CN="${3:-12}"
CD="${4:-example}"

_Random() { # [Max]
echo $((`dd if=/dev/urandom count=2 bs=1 2>/dev/null | od -An -t u4`%${1:-32768}))
}

rm -rf "$CD"
mkdir "$CD"
cd "$CD"

convert "$L" -fuzz 25% -draw "fill white color 0,0 reset fill black stroke black rectangle 75,0 $W,$H rectangle 62,28 $W,$H rectangle 36,36 $W,$H rectangle 36,27 40,$H image screen 0,0 $W,$H '$L'" -matte -depth 24 -fill none -draw "matte 0,0 floodfill" -trim -write spriteR.png -flop spriteL.png

x10=0;y10=`_Random $(($CH-$H))`;x11=$(($CW-$W));y11=`_Random $(($CH-$H))`
x21=0;y21=`_Random $(($CH-$H))`;x20=$(($CW-$W));y20=`_Random $(($CH-$H))`
x30=`_Random $(($CW-$W))`;y30=0;x31=`_Random $(($CW-$W))`;y31=$(($CH-$H))
x41=`_Random $(($CW-$W))`;y41=0;x40=`_Random $(($CW-$W))`;y40=$(($CH-$H))

n=0; while test $n -lt $CN; do
x1=$((($n*$x11+($CN-1-$n)*$x10)/$CN)); y1=$((($n*$y11+($CN-1-$n)*$y10)/$CN))
x2=$((($n*$x21+($CN-1-$n)*$x20)/$CN)); y2=$((($n*$y21+($CN-1-$n)*$y20)/$CN))
x3=$((($n*$x31+($CN-1-$n)*$x30)/$CN)); y3=$((($n*$y31+($CN-1-$n)*$y30)/$CN))
x4=$((($n*$x41+($CN-1-$n)*$x40)/$CN)); y4=$((($n*$y41+($CN-1-$n)*$y40)/$CN))
n=$(($n+1))
convert -depth 24 -size "$CW"x"$CH" tile:"$P" -draw "
image src-over $x1,$y1 $W,$H spriteL.png
image src-over $x2,$y2 $W,$H spriteR.png
image src-over $x3,$y3 $W,$H spriteL.png
image src-over $x4,$y4 $W,$H spriteR.png
" -interlace Plane frame_`printf "%02d" $n`.png
echo -n "$n "
done
echo
rm -f sprite*
multover-0.01/multover000075500000000000000000000127411157352145600151260ustar00rootroot00000000000000#!/bin/sh
. "`functions.locate`" || exit -1
_Version=0.01

test -r "$_RC" && . "$_RC" || :
export LC_ALL="${LANG%%.*}.UTF-8"
export LANG="${LANG%%.*}.UTF-8"
export PATH="$PATH:/usr/lib/kde4/bin"

# This is for dependency elimination
if dcop > /dev/null 2> /dev/null; then
Dialog="kdialog"; isK() { true; }
else
Dialog="Xdialog"; isK() { false; }
fi

if isK; then
__Message() { # message [title]
$Dialog --title "${2:-INFO}" --msgbox "$1"
}
else
__Message() { # message [title]
$Dialog --left --cr-wrap --wrap --title "${2:-INFO}" --infobox "$1" "" "512" "30000"
}
fi

# Exit with optional message printing and return value
Exit() { # [message] [return]
_Error "${1:-Работа прервана}" $2
exit $2
}

# Read at least Number lines displaying a progress bar from 0 to Number
if isK; then
Progress() { # Message Number
local i=0
local dProgr="$($Dialog --progressbar "$1" "$2")"
while read; do i=$((i+1)); dcop "$dProgr" setProgress "$i"; done
dcop "$dProgr" close
}
else
Progress() { # Message Number
( trap '' PIPE; while read; do echo "." 2>/dev/null; done ) |
$Dialog --progress "$1" "" "" "$2"
}
fi

if isK; then
Combo() {
local t="$1"
local s="$2"
shift; shift
$Dialog --title "$t" --combobox "$s" "$@"
}
else
Combo() { # title subtitle choice [choice ...]
local t="$1"
local s="$2"
shift; shift
$Dialog --stdout --title "$t" --combobox "$s" "" "" "$@"
}
fi

if isK; then
Range() { # title subtitle min max default
# TODO no range box here in kdialog :(
$Dialog --title "$1" --inputbox "$2 ($3 - $4)" "$5"
}
else
Range() {
$Dialog --stdout --title "$1" --rangebox "$2" "" "" "$3" "$4" "$5"
}
fi

if isK; then
Radio() { # title subtitle item label status
local t="$1"
local s="$2"
shift; shift
$Dialog --title "$t" --radiolist "$s" "$@"
}
else
Radio() {
local t="$1"
local s="$2"
shift; shift
$Dialog --stdout --title "$t" --radiolist "$s" "" "" "$((($#/3)+1))" "$@"
}
fi

# select catalog with frames or multigif
if isK; then
D=`$Dialog --title "Выберите каталог с кадрами" --getexistingdirectory $HOME` ||
D=`$Dialog --title "Выберите многослойное изображение" --getopenfilename $HOME "*"` || Exit
else
D=`$Dialog --stdout --title "Выбор файла или каталога" \
--backtitle "Выберите каталог с кадрами или многослойное изображение" \
--fselect "" "" 400 120` || Exit
fi

_TmpDir Source
if [ -d "$D" ]
then # Directory
N="`identify "$D"/*`" ||
_Error "Недопустимые файлы в каталоге: `identify "$D"/* 2>&1 >/dev/null`"
test `echo "$N" | sort -u -k3,3 | wc -l` -eq 1 ||
_Msg "Кадры разного размера:
$N"
FNum="$(ls "$D"/* | wc -l)"
cp -v "$D"/* "$Source"/ | Progress "Копирование файлов" "$FNum"
elif [ -f "$D" ]
then # File
FNum="$(identify "$D" 2>/dev/null | wc -l)"
test "$FNum" -gt 1 ||
_Error "Изображение '$D' содержит мало ($FNum) кадров"
convert "$D" -verbose "$Source/frame_%03d.png" |
Progress "Разбиение изображения на кадры" "$FNum"
else
_Error "Невозможно преобразовать '$D' в мультфильм"
fi

FNum="$(ls "$Source"/* | wc -l)"

# select output directory
if [ -w "$(dirname $D)" ]; then Target="$(dirname $D)"
elif [ -d "$HOME/Desktop"]; then Target="$HOME/Desktop"
else Target="$HOME"
fi

# select output filename
Outname="$(basename "$D")"; Outname="${Outname%.*}".avi

_TmpDir Dest
_TmpFile Preview
W=640; H=480; FPS=5
#TRY:
while true
do
# select output size
WH="$(Combo "Размер кадра в мультфильме" \
"Установите размер кадра в мультфильме" \
"640x480" "320x200" "720x576" )" || Exit
W="${WH%%x*}"; H="${WH##*x}"
# resize all + adjust depth
# pity that ImageMagick refuses io _increase_ depth!
convert "$Source"/* -resize "$W"x"$H"'!' \
-depth 24 -quality 100 -treedepth 2 -verbose "$Dest/frame%03d.jpg" |
Progress "Преобразование кадорв" "$FNum"
# select FPS
FPS="$(Range "Частота кадров" \
"Введите частоту смены кадров" \
"1" "25" "$FPS" )" || Exit
# create a preview and show it
# TODO hardwired aspect 4:3
# TODO Error hadnling along with progress
mencoder -o "$Preview" "mf://$Dest/frame*.jpg" -v \
-mf fps="$FPS":type=jpg -ovc lavc 2>&1 | grep "^Pos:" |
Progress "Создание мультфильма" "$FNum"
# show preview until user decide to use it or to drop it
while true
do
Res="$(Radio "Предвариетльный просмотр" \
"Предварительный просмотр мультфильма. Выберите, что делать дальше." \
"1" "посмотреть предварительную версию мультфильма" "on" \
"2" "переделать мультфильм" "" \
"3" "собрать окончательную версию мультфильма" "")" || Exit
case "$Res" in
1) sleep 1; mplayer "$Preview"; sleep 1;;
*) break;;
esac
done
test "$Res" -ne "3" || break
rm -f "$Dest"/*
done

# resample with 24 FPS , proper ratio etc.
# TODO hardwired aspect 4:3
# TODO Error hadnling along with progress
mencoder -o "$Target/$Outname" "mf://$Dest/frame*.jpg" -v \
-mf fps="$FPS":type=jpg -ovc lavc -ofps 25 2>&1 | grep "^Pos:" |
Progress "Создание мультфильма" "$FNum"

sleep 1; mplayer "$Target/$Outname"
multover-0.01/multover.desktop.in000064400000000000000000000003141157352145600171710ustar00rootroot00000000000000[Desktop Entry]
Name=MultOver
GenericName=Simple animation assembly tool
Comment=
Categories=Application;Graphics;
Exec=
Icon=
Type=Application
# Set this to false for simplifying workflow
Terminal=false
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009