Instalacja Z użyciem git ( CLI method) Metoda ręczna, wymaga kompilacji po instalacji. Zapewnia kod źródłowy i najnowszą wersję. How to Install ImageMagick on Ubuntu 22.04 LTS Published on: April 29, 2022 by Joshua James linuxopsys : install-latest-imagemagick-on-ubuntu
sudo apt install git -y sudo apt install make build-essential automake libltdl-dev -y # install dependencies git clone [email protected]:ImageMagick/ImageMagick.git /usr/local/src/ImageMagick cd /usr/local/src/ImageMagick sudo ./configure sudo make sudo make install sudo ldconfig /usr/local/lib
lub inny sposób użycia git
git clone https://github.com/ImageMagick/ImageMagick.git /usr/local/src/ImageMagick
Najnowsza wersja (ang. update) z użyciem git:
sudo git pull
Odinstalowanie po ręcznej instalacji
cd /usr/local/src/ImageMagick sudo make uninstall
Z użyciem apt ( CLI method), wykrywa zależności, umożliwia łatwe usunięcie. Zwykle nie zapewnia najnowszej wersji. Install ImageMagick on Ubuntu By Sagar Sharma Updated on September 13, 2022
sudo apt update && sudo apt upgrade -y sudo apt install make build-essential automake libltdl-dev -y # install dependencies sudo apt install imagemagick -y
Usinięcie z użyciem apt :
sudo apt remove imagemagick* -y
Z użyciem Ubuntu Software center (GUI method), umożliwia łatwe usunięcie
Pomoc formaty: plików, pseudoformaty struktura obrazu nazwy kolorów architekture korzystanie z linii poleceń (command-line-processing = CLI) narzędzia linii poleceń ( ang. command-line-tools = CLI tools) Color w IM z użyciem CLI (ang. color-management ) wersja
ver. 7
magick --version # from version 7
ImageMagic ver. 6 identify -version # for version 6 and earlier
lub:
convert --version
przykładowy wynik
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org Copyright: © 1999-2017 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC Modules OpenMP Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
W części Features brak HDRI, która jest dostępna od wersji 7imagemagick high-dynamic-range
Zamiast convert
użyj:
magick
Linki strona domowa: http://www.imagemagick.org/ git: http://git.imagemagick.org/repos/ImageMagick grupy dyskusyjne: http://www.imagemagick.org/discourse-server/ stackoverflow: stackoverflow questions tagged imagemagick http://im.snibgo.com/
Opcje Sprawdzamy dostepne opcje :
identify -list list
Przykładowy wynik : Align Alpha Boolean Cache Channel Class ClipPath Coder Color Colorspace Command Compliance Complex Compose Compress Configure DataType Debug Decoration Delegate Direction Dispose Distort Dither Endian Evaluate FillRule Filter Font Format Function Gradient Gravity Intensity Intent Interlace Interpolate Kernel Layers LineCap LineJoin List Locale LogEvent Log Magic Method Metric Mime Mode Morphology Module Noise Orientation PixelIntensity Policy PolicyDomain PolicyRights Preview Primitive QuantumFormat Resource SparseColor Statistic Storage Stretch Style Threshold Type Units Validate VirtualPixel Weight
colorspace Sprawdzamy dostępne opcje:
identify -list colorspace
Przykładowy wynik:
Adobe98 CIELab CMY CMYK DisplayP3 Gray HCL HCLp HSB HSI HSL HSV HWB Jzazbz Lab LCH LCHab LCHuv LinearGray LMS Log Luv OHTA Oklab Oklch ProPhoto Rec601YCbCr Rec709YCbCr RGB scRGB sRGB Transparent xyY XYZ YCbCr YDbDr YCC YIQ YPbPr YUV
Porównaj snibgo's ImageMagick pages: Colorspace cookbook snibgo's ImageMagick pages: Greyscale gamma: RGB/sRGB
density
-density widthxheight
depth
depth = głębokość koloru ( w bitach) na kanał ( ang. channel)
Przykład PNG8 PNG24 ma głębokość koloru 8 x 3 kanały ( RGB) co daje 24 bitów na kolor pixela PNG32 ma głębokość koloru 8 x 4 kanały ( RGBA) co daje 32 bitów na kolor pixela = PNG48 ma głębokość koloru 12 x 4 kanały ( RGBA) co daje 48 bitów na kolor pixela = Truecolor and alpha PNG64 ma głębokość koloru 16 x 4 kanały ( RGBA) co daje 64 bitów na kolor pixela = Truecolor and alpha
convert -list type
Wynik : Bilevel ColorSeparation ColorSeparationAlpha ColorSeparationMatte Grayscale GrayscaleAlpha GrayscaleMatte Optimize Palette PaletteBilevelAlpha PaletteBilevelMatte PaletteAlpha PaletteMatte TrueColorAlpha TrueColorMatte TrueColor
Wewnętrzną reprezentacją piksela w ImageMagick: Quantum QuantumDepth Quantum Typedef QuantumRange:
"Internally, IM scales pixel values from the quantumrange of the 16-bit per channel images (range 0 to 65535 integers) or 8-bit per channel images (range 0 to 255 integers) to the range 0 to 1 (floats). But when processing is done, it converts back to integers of the quantumrange before writing out the image."imagemagick.org: dyskusja
distort Sprawdzamy opcje:imagemagick command-line-options: distort
identify -list distort
Wynik:
Affine AffineProjection ScaleRotateTranslate SRT Perspective PerspectiveProjection BilinearForward BilinearReverse Polynomial Arc Polar DePolar Barrel BarrelInverse Shepards Resize
endianess Sprawdzamy dostępne opcje :imagemagick : endian
identify -list endian
Wynik :
LSB MSB
evaluate Sprawdzamy listę opcji ( operatorów -evaluate-sequence )
identify -list evaluate
Przykłądowy wynik: Abs Add AddModulus And Cos Cosine Divide Exp Exponential GaussianNoise ImpulseNoise InverseLog LaplacianNoise LeftShift Log Max Mean Median Min MultiplicativeNoise Multiply Or PoissonNoise Pow RightShift RMS RootMeanSquare Set Sin Sine Subtract Sum Threshold ThresholdBlack ThresholdWhite UniformNoise Xor
filter
Filtry ( ang. Filter)imagemagick command-line-options filter resize: Point, Hermite, Cubic, Box, Gaussian, Catrom, Triangle, Quadratic, Mitchell, CubicSpline windowed: Lanczos, Hamming Parzen Blackman Kaiser Welsh Hanning Bartlett Bohman
Lista:
convert -list filter Bartlett Blackman Bohman Box Catrom Cosine Cubic Gaussian Hamming Hann Hermite Jinc Kaiser Lagrange Lanczos Lanczos2 Lanczos2Sharp LanczosRadius LanczosSharp Mitchell Parzen Point Quadratic Robidoux RobidouxSharp Sinc SincFast Spline Triangle Welch
Możesz modyfikować zachowanie filtra podczas skalowania obrazu, korzystając z tych ustawień specjalistycznych (zobacz -define i -set)
formaty plików
convert -list format
Przykładowy wynik
Format Module Mode Description
3FR DNG r-- Hasselblad CFV/H3D39II 3G2 VIDEO r-- Media Container 3GP VIDEO r-- Media Container AAI* AAI rw+ AAI Dune image AI PDF rw- Adobe Illustrator CS2 APNG VIDEO rw+ Animated Portable Network Graphics ART* ART rw- PFS: 1st Publisher Clip Art ARW DNG r-- Sony Alpha Raw Image Format AVI VIDEO r-- Microsoft Audio/Visual Interleaved AVIF* HEIC rw+ AV1 Image File Format (1.11.0) AVS* AVS rw+ AVS X image BGR* BGR rw+ Raw blue, green, and red samples BGRA* BGR rw+ Raw blue, green, red, and alpha samples BGRO* BGR rw+ Raw blue, green, red, and opacity samples BIE* JBIG rw- Joint Bi-level Image experts Group interchange format (2.1) BMP* BMP rw- Microsoft Windows bitmap image BMP2* BMP rw- Microsoft Windows bitmap image (V2) BMP3* BMP rw- Microsoft Windows bitmap image (V3) BRF* BRAILLE -w- BRF ASCII Braille format CAL* CALS rw- Continuous Acquisition and Life-cycle Support Type 1 Specified in MIL-R-28002 and MIL-PRF-28002 CALS* CALS rw- Continuous Acquisition and Life-cycle Support Type 1 Specified in MIL-R-28002 and MIL-PRF-28002 CANVAS* XC r-- Constant image uniform color CAPTION* CAPTION r-- Caption CIN* CIN rw- Cineon Image File CIP* CIP -w- Cisco IP phone image format CLIP* CLIP rw+ Image Clip Mask CMYK* CMYK rw+ Raw cyan, magenta, yellow, and black samples CMYKA* CMYK rw+ Raw cyan, magenta, yellow, black, and alpha samples CR2 DNG r-- Canon Digital Camera Raw Image Format CR3 DNG r-- Canon Digital Camera Raw Image Format CRW DNG r-- Canon Digital Camera Raw Image Format CUR* ICON rw- Microsoft icon CUT* CUT r-- DR Halo DATA* INLINE rw+ Base64-encoded inline images DCM* 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 DNG r-- Kodak Digital Camera Raw Image File DCX* PCX rw+ ZSoft IBM PC multi-page Paintbrush DDS* DDS rw+ Microsoft DirectDraw Surface DFONT* TTF r-- Multi-face font package (Freetype 2.10.4) DJVU* DJVU r-- Deja vu See http://www.djvuzone.org/ for details about the DJVU format. The DJVU 1.2 specification is available there and at ftp://swrinde.nde.swri.edu/pub/djvu/documents/. DNG DNG r-- Digital Negative DOT DOT --- Graphviz DPX* 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
DXT1* DDS rw+ Microsoft DirectDraw Surface DXT5* DDS rw+ Microsoft DirectDraw Surface EPDF PDF rw- Encapsulated Portable Document Format EPI PS rw- Encapsulated PostScript Interchange format EPS PS rw- Encapsulated PostScript EPS2 PS2 -w- Level II Encapsulated PostScript EPS3 PS3 -w+ Level III Encapsulated PostScript EPSF PS rw- Encapsulated PostScript EPSI PS rw- Encapsulated PostScript Interchange format EPT EPT rw- Encapsulated PostScript with TIFF preview EPT2 EPT rw- Encapsulated PostScript Level II with TIFF preview EPT3 EPT rw+ Encapsulated PostScript Level III with TIFF preview ERF DNG r-- Epson Raw Format EXR EXR rw- High Dynamic-range (HDR) (OpenEXR 2.5.4) FAX* 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%".
FILE* URL r-- Uniform Resource Locator (file://) FITS* FITS rw- Flexible Image Transport System FRACTAL* PLASMA r-- Plasma fractal image FTP* URL r-- Uniform Resource Locator (ftp://) FTS* FITS rw- Flexible Image Transport System G3* FAX rw- Group 3 FAX G4* FAX rw- Group 4 FAX GIF* GIF rw+ CompuServe graphics interchange format GIF87* GIF rw- CompuServe graphics interchange format (version 87a) GRADIENT* GRADIENT r-- Gradual linear passing from one shade to another GRAY* GRAY rw+ Raw gray samples GRAYA* GRAY rw+ Raw gray and alpha samples GROUP4* TIFF rw- Raw CCITT Group4 GV DOT --- Graphviz H* MAGICK -w- Image expressed as a 'C/C++' char array HALD* HALD r-- Identity Hald color lookup table image HDR* HDR rw+ Radiance RGBE image format HEIC* HEIC rw+ Apple High efficiency Image Format (1.11.0) HISTOGRAM* HISTOGRAM -w- Histogram of the image HRZ* HRZ rw- Slow Scan TeleVision HTM* HTML -w- Hypertext Markup Language and a client-side image map HTML* HTML -w- Hypertext Markup Language and a client-side image map HTTP* URL r-- Uniform Resource Locator (http://) HTTPS* URL r-- Uniform Resource Locator (https://) ICB* TGA rw- Truevision Targa image ICO* ICON rw+ Microsoft icon ICON* ICON rw- Microsoft icon IIQ DNG r-- Phase One Raw Image Format INFO INFO -w+ The image format and characteristics INLINE* INLINE rw+ Base64-encoded inline images IPL* IPL rw+ IPL Image Sequence ISOBRL* BRAILLE -w- ISO/TR 11548-1 format ISOBRL6* BRAILLE -w- ISO/TR 11548-1 format 6dot J2C* JP2 rw- JPEG-2000 Code Stream Syntax (2.3.1) J2K* JP2 rw- JPEG-2000 Code Stream Syntax (2.3.1) JBG* JBIG rw+ Joint Bi-level Image experts Group interchange format (2.1) JBIG* JBIG rw+ Joint Bi-level Image experts Group interchange format (2.1) JNG* PNG rw- JPEG Network Graphics See http://www.libpng.org/pub/mng/ for details about the JNG format. JNX* JNX r-- Garmin tile format JP2* JP2 rw- JPEG-2000 File Format Syntax (2.3.1) JPC* JP2 rw- JPEG-2000 Code Stream Syntax (2.3.1)