Vollständige Version anzeigen : Gimp automatisieren
Ich habe Fotos in einer Auflösung von 1024 * 768. Diese möchte ich auf eine Auflösung von 800 * 600 bringen. Und da es etwa 20 Fotos sind und ich (der faulheit halber) nicht jedes Foto einzel skalieren möchte, hab ich die Frage, ob man den ganzen Ablauf automatisieren kann. Wenn ja, wo kann man solche Scripts downloaden, oder wo kann man dies einstellen?
thx
header
He, es gibt hier eine Suchfunktion.
Naja, egal, hättest du sie benutzt wär dir wahrscheinlich klar geworden, dass die Standardantwort ist: "Ja geht, aber keinen Plan wie und ich benutze dafür ImageMagick".
Also nimm erstmal dafür Imagemagick, hat auch 'ne brauchbare Doku.
Und der Grund warum ich den Thread nicht zu mache ist, dass sich das bald ändern wird. Demnächst kriegt der Gimp einen neuen Scheme-Interpreter spendiert der brauchbare Dateisystemfunktionen hat und dann wird es auch die entsprechenden Scripte geben, spätestens hier.
Unter dem Thread, unter "Neues von Gimp" der den neuen Interpreter ankündigt, nennt schumaml auch das Objekt(?) mit dem man sowas ansatzweise jetzt schon machen kann.
Wulf hat recht. mogrify -resize 800x600 DeinBild.jpg ist dein Freund wenn du Linux hast. Dieses kleine Kommandozeilentool hat ne ganze Menge drauf. Deshalb hier mal die möglichen Optionen.
[hans@rosi hans]$ mogrify
Version: ImageMagick 5.5.7 03/23/04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 2003 ImageMagick Studio LLC
Usage: mogrify [options ...] file [ [options ...] file ...]
Where options include:
-affine matrix affine transform matrix
-antialias remove pixel-aliasing
-authenticate value decrypt image with this password
-background color background color
-black-threshold value
forces all pixels below the threshold into black
-blue-primary point chomaticity blue primary point
-blur radius blur the image
-border geometry surround image with a border of color
-bordercolor color border color
-channel type extract a particular color channel from image
-charcoal radius simulate a charcoal drawing
-chop geometry remove pixels from the image interior
-colorize value colorize the image with the fill color
-colors value preferred number of colors in the image
-colorspace type alternate image colorspace
-comment string annotate image with comment
-compress type image compression type
-contrast enhance or reduce the image contrast
-convolve coefficients
apply a convolution kernel to the image
-crop geometry preferred size and location of the cropped image
-cycle amount cycle the image colormap
-debug events display copious debugging information
-delay value display the next image after pausing
-density geometry horizontal and vertical density of the image
-depth value image depth
-despeckle reduce the speckles within an image
-display server get image or font from this X server
-dispose method Undefined, None, Background, Previous
-dither apply Floyd/Steinberg error diffusion to image
-draw string annotate the image with a graphic primitive
-edge radius apply a filter to detect edges in the image
-emboss radius emboss an image
-encoding type text encoding type
-endian type LSB or MSB
-enhance apply a digital filter to enhance a noisy image
-equalize perform histogram equalization to an image
-extract geometry extract area from image
-fill color color to use when filling a graphic primitive
-filter type use this filter when resizing an image
-flip flip image in the vertical direction
-flop flop image in the horizontal direction
-font name render text with this font
-format type image format type
-frame geometry surround image with an ornamental border
-fuzz distance colors within this distance are considered equal
-gamma value level of gamma correction
-gaussian geometry gaussian blur an image
-geometry geometry perferred size or location of the image
-green-primary point chomaticity green primary point
-implode amount implode image pixels about the center
-interlace type None, Line, Plane, or Partition
-help print program options
-label name assign a label to an image
-lat geometry local adaptive thresholding
-level value adjust the level of image contrast
-limit type value Disk, Map, or Memory resource limit
-list type Color, Delegate, Format, Magic, Module, Resource, or Type
-log format format of debugging information
-loop iterations add Netscape loop extension to your GIF animation
-map filename transform image colors to match this set of colors
-mask filename set the image clip mask
-matte store matte channel if the image has one
-median radius apply a median filter to the image
-modulate value vary the brightness, saturation, and hue
-monochrome transform image to black and white
-negate replace every pixel with its complementary color
-noop do not apply options to image-noise radius add or reduce noise in an image.
-normalize transform image to span the full range of colors
-opaque color change this color to the fill color
-page geometry size and location of an image canvas
-paint radius simulate an oil painting
-fill color color for annotating or changing opaque color
-ordered-dither channeltype LOWxHIGH
ordered dither the image
-pointsize value font point size
-profile filename add ICM or IPTC information profile to image
-quality value JPEG/MIFF/PNG compression level
-raise value lighten/darken image edges to create a 3-D effect
-random-threshold channeltype LOWxHIGH
random threshold the image
-red-primary point chomaticity red primary point
-region geometry apply options to a portion of the image
-resample geometry change the resolution of an image
-resize geometry perferred size or location of the image
-roll geometry roll an image vertically or horizontally
-rotate degrees apply Paeth rotation to the image
-sample geometry scale image with pixel sampling
-sampling-factor geometry
horizontal and vertical sampling factor
-scale geometry scale the image
-scene number image scene number
-seed value pseudo-random number generator seed value
-segment values segment an image
-shade degrees shade the image using a distant light source
-sharpen radius sharpen the image
-shear geometry slide one edge of the image along the X or Y axis
-size geometry width and height of image
-solarize threshold negate all pixels above the threshold level
-spread amount displace image pixels by a random amount
-stroke color graphic primitive stroke color
-strokewidth value graphic primitive stroke width
-swirl degrees swirl image pixels about the center
-texture filename name of texture to tile onto the image background
-threshold value threshold the image
-thumbnail geometry create a thumbnail of the image
-tile filename tile image when filling a graphic primitive
-transform affine transform image
-transparent color make this color transparent within the image
-treedepth value color tree depth
-trim trim image edges
-type type image type
-undercolor color annotation bounding box color
-units type PixelsPerInch, PixelsPerCentimeter, or Undefined
-unsharp geometry sharpen the image
-verbose print detailed information about the image
-version print version information
-view FlashPix viewing transforms
-virtual-pixel method
Constant, Edge, Mirror, or Tile
-wave geometry alter an image along a sine wave
-white-point point chomaticity white point
-white-threshold value
forces all pixels above the threshold into white
By default, the image format of `file' is determined by its magic
number. To specify a particular image format, precede the filename
with an image format name and a colon (i.e. ps:image) or specify the
image type as the filename suffix (i.e. image.ps). Specify 'file' as
'-' for standard input or output.
[hans@rosi hans]$Genauere Infos siehe Dokumentation zu ImageMagick
Für Windows sollte es genug andere Tools geben.
Hans
Natürlich hab ich Recht, wenn ich unsicher bin schreibe ich: "Ich glaube, dass ich mich daran erinnern kann, zu denken, gehört zu haben, dass könnte so und so gewesen sein.". :lol:
Sorry Wulf
wollte dir mit meinem Beitrag nicht auf die Füße treten. :oops:
Hans
Oh Mann, heute ändere ich meine Sig.
Ich hab mir nicht auf die Füße getreten Gefühlt, ich hab nur 'nen Scherz nachgeschoben.
Buhu, keiner versteht mich.
Auch wieder nicht ganz ernst gemeint aber irgendwie häuft sich das, nicht nur hier.
schumaml
29.07.2004, 22:37
Wulf hat recht. mogrify -resize 800x600 DeinBild.jpg ist dein Freund wenn du Linux hast.
....
Für Windows sollte es genug andere Tools geben.
Ja, z.B. ImageMagick:
http://www.imagemagick.org
Es lohnt sich, über den Linux-Tellerrand auch mal hinauszuschauen ;)
Is das denn für ne Zirkusnummer?
lox2eagle
05.08.2006, 15:30
Ich tippe aufgrund des Verhaltens auf einen Bot und habe ihn zunächst gesperrt. Bei Irrtum einfach im irc://irc.freenode.net/#gimp-de melden (Geduld mitbringen, es sitzt nicht ständig jemand erwartungsvoll vor dem Chat, bis jemand eine Frage postet. Reaktion kann ein wenig Zeit erfordern,) oder anderweitig Kontakt suchen, dann hebe ich oder wer anders die Sperre wieder auf.
Loxi
Hallo, ich möchte den Titel des Themas noch einmal aufgreifen, habe schon viel gesucht aber irgendwie ist für mich nicht das passende dabei.
Mein Problem besteht darin das ich ein paar oder besser gesagt ein paar tausend PNG Datein (Buuf Iconset) in ein kleineres Format skalieren möchte. Ich testete das erst normal über Bild < Bild skalieren und das Ergebniss war schrecklich, auf Anfrage in eurem IRC Channel habe ich dann den Tipp bekommen vorher über Bild < Modus < RGB den Modus auszuschalten und nun sahen die Bilder nach dem skalieren deutlich schärfer aus.
Da es zu viele Dateien sind um das alles einzeln zu machen wollte ich das ganze automatisieren und bin dann hier über die Suche auf "David's Batch Processor" gestoßen. Hab dort über die resize Funktion ein paar Bilder geändert und die waren dann wieder unscharf, :( so als ob die Bilder im RGB Modus geöffnet und auch bearbeitet wurden. Kann man das nicht generell ausschalten, also das der RGB Modus deaktiviert ist wenn sich ein Bild öffnet?
Ich wollte mir nicht unbedingt imagemagick installieren weil ich mir nicht sicher bin ob der mir nicht auch wieder die Bilder unscharf skaliert, vielleicht kann das ja mal jemand von euch testen der imagemagick installiert hat, ein PNG findet ihr im Anhang, wenn imagemagick die Datei ordentlich auf 16x16 Pixel skaliert dann wäre ich um ein klitze kleines howto sehr dankbar!
P.S.: Im Anhang mit dem kleinen Bild ein Beispiel wie es aussieht wenn ich es ordentlich skaliert habe, als Richtungweiser sozusagen. :)
lox2eagle
24.08.2006, 04:29
Ein einfaches mogrify -resize 16x16 * verwandelt alle Bilddateien im Ordner in feine, kleine Bildchen. Ansonsten convert -resize 16x16 infile.png outfile.png . Allerdings bin ich noch nicht dahinter gekommen, wie der Modus auf indiziert gesetzt werden kann – bei nur 265 Pixeln pro Endresultat aber wahrscheinlich ohnehin nicht so wichtig.
Loxi
http://img172.imageshack.us/img172/5866/fuxjl6.png
dat sieht doch eigentlich ganz gut aus, oder?
tutorial (linux; gibz imagemagick auch für win?):
- dafür sorgen, dass du einen ordner hast, wo alle deine originale (oder am besten kopien von denen!) dirn sind und sonst nüscht
- konsole klargemacht
- tipp "cd pfad/zum/ordner/wo/originale/drin/sind/" [ENTER]
- tipp "mogrify -resize 16x16 *png" [ENTER]
- voila
(die " " um die befehle nicht tippen)
hans, bist du jetzt stolz auf mich?
übrigens hast du da scheints was verwechselt: wenn die bilder krukelig skaliert werden, sind die im inidizierten modus, im RGB-modus werden die beim skalieren interpoliert und erleiden dadurch weniger verlust.
der modus, in dem ein in gimp geöffnetes bild sich befindet, wird im entsprechenden menü ausgegraut angezeigt.
edit:
mist, loxi war schneller^^ (aber ich dafür genauer *zungeraustreck*)
schumaml
24.08.2006, 11:05
tutorial (linux; gibz imagemagick auch für win?):
Ja, gibt es. Allerdings will man lieber GraphicsMagick verwenden. So langsam findet das auch seinen Weg in die Linux-Distributionen :)
Nach dem Beispielbild war ich überzeugt und habe mir GraphicsMagick installiert, das klappt damit wunderbar!
Danke und bis bald, Herzog.
lox2eagle
24.08.2006, 15:13
Der Bildmodus steht im übrigen auch oben in der Fensterleiste mit drin. Die hat keinen rein dekorativen Effekt ;)
Loxi
vBulletin® v3.8.2, Copyright ©2000-2013, Jelsoft Enterprises Ltd.