Difference between revisions of "ImageMagick"

From TheAlmightyGuru
Jump to: navigation, search
(Created page with "'''''Imagemagick''''' is a image editing program that uses a scripting language to create, edit, and convert many different image formats. ==Useful Scripts== ===Make Picture...")
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''''Imagemagick''''' is a image editing program that uses a scripting language to create, edit, and convert many different image formats.
+
[[Image:ImageMagick - Logo.png|thumb|256x256px|ImageMagick logo.]]
  
==Useful Scripts==
+
'''ImageMagick''' is a [[freeware|free]] [[open source]] cross-platform image editing program written in [[C]] which uses a custom scripting language to create, edit, and convert between over 200 different image formats. It can be run in various forms including a command-line program, being invoked through OLE, as a PHP module, and various others.
===Make Picture Book===
+
 
This script will take a folder full of JPEGs and make a PDF document out the them where there is one image centered on each page. The page size will have a standard letter ratio at 72 DPI.
+
==Using Imagemagick==
 +
===Command Line===
 +
This command line script will take a folder full of JPEGs and make a PDF document out the them where each page of the PDF has a single image centered on the page. The page size specified here yields a standard letter size (8.5" x 11") at 72 DPI.
  
 
  magick *.jpg -gravity center -extent 612x792 -density 72 output.pdf
 
  magick *.jpg -gravity center -extent 612x792 -density 72 output.pdf
 +
 +
===OLE Invocation===
 +
By default, ImageMagick is not installed with OLE support, but it can be turned on in the installer by checking on the '''Install ImageMagickObject OLE Control for VBscript Visual Basic, and WSH''' box. Once installed in this way, you can access it using any program with OLE support. Here is a [[JScript]] example that creates a square JPEG image using the OLE module.
 +
 +
<pre>
 +
var oIM = new ActiveXObject("ImageMagickObject.MagickImage.1");
 +
oIM.convert("-size", "512x512", "xc:white",
 +
"-fill", "white", "-stroke", "black", "-draw", "rectangle 0,0 511,511",
 +
"-fill", "blue", "-stroke", "none", "-font", "Tahoma", "-pointsize", "48", "-gravity", "center", "-draw", "text 0,0 'Square'",
 +
"-quality", "90%", "Square.jpg");
 +
</pre>
 +
 +
==Scripts==
 +
* [[Media:Imagemagick JScripts.zip|Download]] ([[:File:Imagemagick JScripts.zip|Info]]) - A collection of JScript programs that perform basic ImageMagick functions like rotation, format conversion, blurring, etc.
  
 
==Links==
 
==Links==
* [https://www.imagemagick.org/script/index.php imagemagick.org/script/index.php] - Official.
+
{{Link|Wikipedia|https://en.wikipedia.org/wiki/ImageMagick}}
 +
{{Link|Official|https://www.imagemagick.org/script/index.php}}
 +
 
 +
* [http://im.snibgo.com im.snibgo.com] - Many helpful ImageMagick scripts.
  
  
 
[[Category: Software]]
 
[[Category: Software]]
[[Category: Graphics Software]]
+
[[Category: Graphic Software]]
 
[[Category: Useful Software]]
 
[[Category: Useful Software]]
 +
[[Category: Android Software]]
 +
[[Category: iOS Software]]
 +
[[Category: Linux Software]]
 +
[[Category: Macintosh Software]]
 +
[[Category: Windows Software]]
 +
[[Category: Software Distribution Model - Freeware]]
 +
[[Category: Software Distribution Model - Open Source]]

Revision as of 22:19, 15 May 2022

ImageMagick logo.

ImageMagick is a free open source cross-platform image editing program written in C which uses a custom scripting language to create, edit, and convert between over 200 different image formats. It can be run in various forms including a command-line program, being invoked through OLE, as a PHP module, and various others.

Using Imagemagick

Command Line

This command line script will take a folder full of JPEGs and make a PDF document out the them where each page of the PDF has a single image centered on the page. The page size specified here yields a standard letter size (8.5" x 11") at 72 DPI.

magick *.jpg -gravity center -extent 612x792 -density 72 output.pdf

OLE Invocation

By default, ImageMagick is not installed with OLE support, but it can be turned on in the installer by checking on the Install ImageMagickObject OLE Control for VBscript Visual Basic, and WSH box. Once installed in this way, you can access it using any program with OLE support. Here is a JScript example that creates a square JPEG image using the OLE module.

var oIM = new ActiveXObject("ImageMagickObject.MagickImage.1");
oIM.convert("-size", "512x512", "xc:white", 
 "-fill", "white", "-stroke", "black", "-draw", "rectangle 0,0 511,511", 
 "-fill", "blue", "-stroke", "none", "-font", "Tahoma", "-pointsize", "48", "-gravity", "center", "-draw", "text 0,0 'Square'", 
 "-quality", "90%", "Square.jpg");

Scripts

  • Download (Info) - A collection of JScript programs that perform basic ImageMagick functions like rotation, format conversion, blurring, etc.

Links

Link-Wikipedia.png  Link-Official.png