Skip to content

Instantly share code, notes, and snippets.

@indirect
Created October 5, 2009 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indirect/202586 to your computer and use it in GitHub Desktop.
Save indirect/202586 to your computer and use it in GitHub Desktop.
Format Mode Description
-------------------------------------------------------------------------------
A* rw+ Raw alpha samples
AI rw- Adobe Illustrator CS2
ART* rw- PFS: 1st Publisher Clip Art
ARW r-- Sony Alpha Raw Image Format
AVI* r-- Microsoft Audio/Visual Interleaved
AVS* rw+ AVS X image
B* rw+ Raw blue samples
BGR* rw+ Raw blue, green, and red samples
BMP* rw- Microsoft Windows bitmap image
BMP2* -w- Microsoft Windows bitmap image v2
BMP3* -w- Microsoft Windows bitmap image v3
BRG* rw+ Raw blue, red, and green samples
C* rw+ Raw cyan samples
CAPTION* r-- Image caption
CIN* rw+ Cineon Image File
CIP* -w- Cisco IP phone image format
CLIP* -w+ Image Clip Mask
CMYK* rw+ Raw cyan, magenta, yellow, and black samples
CMYKA* rw+ Raw cyan, magenta, yellow, black, and alpha samples
CR2 r-- Canon Digital Camera Raw Image Format
CRW r-- Canon Digital Camera Raw Image Format
CUR* rw- Microsoft icon
CUT* r-- DR Halo
DCM* r-- Digital Imaging and Communications in Medicine image
DICOM is used by the medical community for images like X-rays. The
specification, "Digital Imaging and Communications in Medicine
(DICOM)", is available at http://medical.nema.org/. In particular,
see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),
and supplement 61 which adds JPEG-2000 encoding.
DCR r-- Kodak Digital Camera Raw Image File
DCX* rw+ ZSoft IBM PC multi-page Paintbrush
DDS* r-- Microsoft DirectDraw Surface
DFONT* r-- Multi-face font package (Freetype 2.3.9)
DNG r-- Digital Negative
DPX* rw- SMPTE 268M-2003 (DPX 2.0)
Digital Moving Picture Exchange Bitmap, Version 2.0.
See SMPTE 268M-2003 specification at http://www.smtpe.org
EPDF rw- Encapsulated Portable Document Format
EPI rw- Encapsulated PostScript Interchange format
EPS rw- Encapsulated PostScript
EPS2* -w- Level II Encapsulated PostScript
EPS3* -w+ Level III Encapsulated PostScript
EPSF rw- Encapsulated PostScript
EPSI rw- Encapsulated PostScript Interchange format
EPT rw- Encapsulated PostScript with TIFF preview
EPT2 rw- Encapsulated PostScript Level II with TIFF preview
EPT3 rw+ Encapsulated PostScript Level III with TIFF preview
ERF r-- Epson RAW Format
FAX* rw+ Group 3 FAX
FAX machines use non-square pixels which are 1.5 times wider than they
are tall but computer displays use square pixels, therefore FAX images
may appear to be narrow unless they are explicitly resized using a
geometry of "150x100%".
FITS* rw- Flexible Image Transport System
FRACTAL* r-- Plasma fractal image
FTS* rw- Flexible Image Transport System
G* rw+ Raw green samples
G3* rw- Group 3 FAX
GBR* rw+ Raw green, blue, and red samples
GIF* rw+ CompuServe graphics interchange format
GIF87* rw- CompuServe graphics interchange format (version 87a)
GRADIENT* r-- Gradual linear passing from one shade to another
GRAY* rw+ Raw gray samples
GRB* rw+ Raw green, red, and blue samples
HISTOGRAM* -w- Histogram of the image
HRZ* rw- Slow Scan TeleVision
HTM* -w- Hypertext Markup Language and a client-side image map
HTML* -w- Hypertext Markup Language and a client-side image map
ICB* rw+ Truevision Targa image
ICO* rw+ Microsoft icon
ICON* rw- Microsoft icon
INFO -w+ The image format and characteristics
INLINE* r-- Base64-encoded inline images
IPL* rw+ IPL Image Sequence
JNG* rw- JPEG Network Graphics
See http://www.libpng.org/pub/mng/ for details about the JNG
format.
JPEG* rw- Joint Photographic Experts Group JFIF format (70)
JPG* rw- Joint Photographic Experts Group JFIF format (70)
K* rw+ Raw black samples
K25 r-- Kodak Digital Camera Raw Image Format
KDC r-- Kodak Digital Camera Raw Image Format
LABEL* r-- Image label
M* rw+ Raw magenta samples
M2V rw+ MPEG Video Stream
M4V rw+ Raw MPEG-4 Video
MAP* rw- Colormap intensities and indices
MAT rw+ MATLAB image format
MATTE* -w+ MATTE format
MIFF* rw+ Magick Image File Format
MNG* rw+ Multiple-image Network Graphics (libpng 1.2.35)
See http://www.libpng.org/pub/mng/ for details about the MNG
format.
MONO* rw- Raw bi-level bitmap
MOV rw+ MPEG Video Stream
MP4 rw+ MPEG-4 Video Stream
MPC* rw+ Magick Persistent Cache image format
MPEG rw+ MPEG Video Stream
MPG rw+ MPEG Video Stream
MRW r-- Sony (Minolta) Raw Image File
MSL* rw+ Magick Scripting Language
MSVG rw+ ImageMagick's own SVG internal renderer
MTV* rw+ MTV Raytracing image format
MVG* rw- Magick Vector Graphics
NEF r-- Nikon Digital SLR Camera Raw Image File
NULL* rw- Constant image of uniform color
O* rw+ Raw opacity samples
ORF r-- Olympus Digital Camera Raw Image File
OTB* rw- On-the-air bitmap
OTF* r-- Open Type font (Freetype 2.3.9)
PAL* rw- 16bit/pixel interleaved YUV
PALM* rw+ Palm pixmap
PAM* rw+ Common 2-dimensional bitmap format
PATTERN* r-- Predefined pattern
PBM* rw+ Portable bitmap format (black and white)
PCD* rw- Photo CD
PCDS* rw- Photo CD
PCL rw+ Printer Control Language
PCT* rw- Apple Macintosh QuickDraw/PICT
PCX* rw- ZSoft IBM PC Paintbrush
PDB* rw+ Palm Database ImageViewer Format
PDF rw+ Portable Document Format
PDFA rw+ Portable Document Archive Format
PEF r-- Pentax Electronic File
PFA* r-- Postscript Type 1 font (ASCII) (Freetype 2.3.9)
PFB* r-- Postscript Type 1 font (binary) (Freetype 2.3.9)
PFM* rw+ Portable float format
PGM* rw+ Portable graymap format (gray scale)
PICON* rw- Personal Icon
PICT* rw- Apple Macintosh QuickDraw/PICT
PIX* r-- Alias/Wavefront RLE image format
PJPEG* rw- Joint Photographic Experts Group JFIF format (70)
PLASMA* r-- Plasma fractal image
PNG* rw- Portable Network Graphics (libpng 1.2.35)
See http://www.libpng.org/ for details about the PNG format.
PNG24* rw- opaque 24-bit RGB (zlib 1.2.3)
PNG32* rw- opaque or transparent 32-bit RGBA
PNG8* rw- 8-bit indexed with optional binary transparency
PNM* rw+ Portable anymap
PPM* rw+ Portable pixmap format (color)
PREVIEW* -w- Show a preview an image enhancement, effect, or f/x
PS rw+ PostScript
PS2* -w+ Level II PostScript
PS3* -w+ Level III PostScript
PSD* rw+ Adobe Photoshop bitmap
PTIF* rw+ Pyramid encoded TIFF
PWP* r-- Seattle Film Works
R* rw+ Raw red samples
RADIAL-GRADIENT* r-- Gradual radial passing from one shade to another
RAF r-- Fuji CCD-RAW Graphic File
RAS* rw+ SUN Rasterfile
RBG* rw+ Raw red, blue, and green samples
RGB* rw+ Raw red, green, and blue samples
RGBA* rw+ Raw red, green, blue, and alpha samples
RGBO* rw+ Raw red, green, blue, and opacity samples
RLA* r-- Alias/Wavefront image
RLE* r-- Utah Run length encoded image
SCR* r-- ZX-Spectrum SCREEN$
SCT* r-- Scitex HandShake
SFW* r-- Seattle Film Works
SGI* rw+ Irix RGB image
SHTML* -w- Hypertext Markup Language and a client-side image map
SR2 r-- Sony Raw Format 2
SRF r-- Sony Raw Format
STEGANO* r-- Steganographic image
SUN* rw+ SUN Rasterfile
SVG rw+ Scalable Vector Graphics (XML 2.7.3)
SVGZ rw+ Compressed Scalable Vector Graphics (XML 2.7.3)
TEXT* rw- Text
TGA* rw+ Truevision Targa image
THUMBNAIL* -w+ EXIF Profile Thumbnail
TIFF* rw+ Tagged Image File Format (LIBTIFF, Version 3.8.2)
TIFF64* --- Tagged Image File Format (64-bit) (LIBTIFF, Version 3.8.2)
TILE* r-- Tile image with a texture
TIM* r-- PSX TIM
TTC* r-- TrueType font collection (Freetype 2.3.9)
TTF* r-- TrueType font (Freetype 2.3.9)
TXT* rw- Text
UIL* -w- X-Motif UIL table
UYVY* rw- 16bit/pixel interleaved YUV
VDA* rw+ Truevision Targa image
VICAR* rw- VICAR rasterfile format
VID* rw+ Visual Image Directory
VIFF* rw+ Khoros Visualization image
VST* rw+ Truevision Targa image
WBMP* rw- Wireless Bitmap (level 0) image
WMV rw+ Windows Media Video
WPG* r-- Word Perfect Graphics
X* rw+ X Image
X3F r-- Sigma Camera RAW Picture File
XBM* rw- X Windows system bitmap (black and white)
XC* r-- Constant image uniform color
XCF* r-- GIMP image
XPM* rw- X Windows system pixmap (color)
XPS r-- Microsoft XML Paper Specification
XV* rw+ Khoros Visualization image
XWD* rw- X Windows system window dump (color)
Y* rw+ Raw yellow samples
YCbCr* rw+ Raw Y, Cb, and Cr samples
YCbCrA* rw+ Raw Y, Cb, Cr, and alpha samples
YUV* rw- CCIR 601 4:1:1 or 4:2:2
* native blob support
r read support
w write support
+ support for multiple images
require 'brewkit'
# some credit to http://github.com/maddox/magick-installer
class Imagemagick <Formula
@url='ftp://ftp.imagemagick.org:21//pub/ImageMagick/ImageMagick-6.5.6-1.tar.bz2'
@md5='e74cc971e0e6dbf14e498fceba86a33a'
@homepage='http://www.imagemagick.org'
depends_on 'jpeg'
depends_on 'libwmf' => :optional
depends_on 'libtiff' => :optional
depends_on 'little-cms' => :optional
depends_on 'ghostscript' => :recommended
def install
ENV.libpng
ENV.deparallelize
# TODO eventually these will be external optional dependencies
# but for now I am lazy
Libtiff.new.brew do
system "./configure", "--prefix=#{prefix}", "--disable-debug"
system "make install"
end
Libwmf.new.brew do
system "./configure", "--prefix=#{prefix}", "--disable-debug"
system "make install"
end
LittleCMS.new.brew do
system "./configure", "--prefix=#{prefix}", "--disable-debug"
system "make install"
end
Ghostscript.new.brew do
# ghostscript configure ignores LDFLAGs apparently
ENV['LIBS']="-L/usr/X11/lib"
system "./configure", "--prefix=#{prefix}", "--disable-debug",
# the cups component adamantly installs to /usr so fuck it
"--disable-cups"
# versioned stuff in main tree is pointless for us
inreplace 'Makefile', '/$(GS_DOT_VERSION)', ''
system "make install"
(prefix+'share'+'ghostscript'+'doc').rmtree
end
GhostscriptFonts.new.brew do
Dir.chdir '..'
(prefix+'share'+'ghostscript').install 'fonts'
end
# versioned stuff in main tree is pointless for us
inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}'
# we need imagemagick to know about the libraries we just installed
system "brew ln imagemagick"
system "./configure", "--disable-static",
"--with-modules",
"--without-magick-plus-plus",
"--disable-dependency-tracking",
"--disable-shared",
"--without-maximum-compile-warnings",
"--prefix=#{prefix}",
"--disable-osx-universal-binary",
"--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts",
"--without-perl" # I couldn't make this compile
system "make install"
end
def caveats
"I'm not a heavy user of ImageMagick, so please check everything is installed with" +
" identify -list format"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment