Portál AbcLinuxu, 10. května 2025 09:00
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
Navíc Inkscape má určitou malou "chybku" v tomhle - pokud nastavím vlastní střed otáčení jednomu objektu a přepnu na jiný, střed otáčení u toho prvního se resetuje - nastavovat to pokaždé znovu je _velice_ nepohodlné. Na rotaci a následné exporty se právě proto Inkscape použít (téměř) nedá ... (PS: Nebo Inkscape snad používám špatně? Věděl byste, jak zadat danému objektu střed otáčení?)Ano. Upgraduj na verzi 0.44.
# apt-cache search GIF|grep 'GIF' gif2png - GIF -> PNG conversions giflib-bin - programs to convert GIF images giflib3g - shared library for GIF images (runtime lib) giflib3g-dev - shared library for GIF images (development files) gifsicle - Tool for manipulating GIF images giftrans - Convert any GIF file into a GIF89a libimage-size-ruby1.6 - ruby extension to measure image (GIF, PNG, JPEG , etc) size libimage-size-ruby1.8 - ruby extension to measure image (GIF, PNG, JPEG , etc) size libungif-bin - programs to convert GIF images libungif4-dev - shared library for GIF images (development files) libungif4g - shared library for GIF images (runtime lib) mimetex - LaTeX math expressions to anti-aliased GIF images converter
# sudo apt-get install gifsicle
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
--rotate-90 --rotate-180 --rotate-270 Rotate the following frames by 90, 180, or 270 degrees. --no-rotate turns off any rotation.Použití libovolného kroku mi z tohoto popisu nevyplývá. Máte s tím osobní zkušenost?
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
gifsicle --rotate-81 kubuntu-base2.gif gifsicle: unrecognized option '--rotate-81'
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
#!/usr/bin/env python import Image from math import cos, sin, pi im = Image.open('napis.png') rot_center = (150, 62) new_size = (50, 24) h = rot_center[0] k = rot_center[1] for angle_deg in xrange(0, 360, 30): a = angle_deg*pi/180 dx = -h * cos(a) + k * sin(a) + h dy = -h * sin(a) - k * cos(a) + k t = (cos(a), -sin(a), dx, sin(a), cos(a), dy) out = im.transform(im.size, Image.AFFINE, t) out = out.resize(new_size, Image.ANTIALIAS) out.save('new%03d.png' %angle_deg)Prográmek vezme obrázek 'napis.png' (na kterém jsem to testoval). Pak prochází cyklem 0 až 360 stupňů s krokem 5 stupňů a pokaždé obrázek otočí kolem zadaného středu, naškáluje na žádanou velikost a uloží jako new[číslo].png.
x
, 2x
, 3x
,… stupňů.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.