ImageMagick显示错误

问题描述 投票:0回答:2

如何修复显示错误

显示:委托库支持未内置 '' (X11) @ 错误/display.c/DisplayImageCommand/1891。

   display ...jpg
Version: ImageMagick 7.0.5-4 Q16 x86_64 2017-03-25 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules 
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
Usage: display [options ...] file [ [options ...] file ...]

Image Settings:
  -alpha option        on, activate, off, deactivate, set, opaque, copy
                       transparent, extract, background, or shape
  -antialias           remove pixel-aliasing
  -authenticate password
                       decipher image with this password
  -backdrop            display image centered on a backdrop
  -channel type        apply option to select image channels
  -colormap type       Shared or Private
  -colorspace type     alternate image colorspace
  -comment string      annotate image with comment
  -compress type       type of pixel compression when writing the image
  -define format:option
                       define one or more image format options
  -delay value         display the next image after pausing
  -density geometry    horizontal and vertical density of the image
  -depth value         image depth
  -display server      display image to this X server
  -dispose method      layer disposal method
  -dither method       apply error diffusion to image
  -endian type         endianness (MSB or LSB) of the image
  -filter type         use this filter when resizing an image
  -format string     output formatted image characteristics
  -geometry geometry   preferred size and location of the Image window
  -gravity type        horizontal and vertical backdrop placement
  -identify            identify the format and characteristics of the image
  -immutable           displayed image cannot be modified
  -interlace type      type of image interlacing scheme
  -interpolate method  pixel color interpolation method
  -label string        assign a label to an image
  -limit type value    pixel cache resource limit
  -loop iterations     loop images then exit
  -map type            display image using this Standard Colormap
  -matte               store matte channel if the image has one
  -monitor             monitor progress
  -page geometry       size and location of an image canvas
  -profile filename    add, delete, or apply an image profile
  -quality value       JPEG/MIFF/PNG compression level
  -quantize colorspace reduce colors in this colorspace
  -quiet               suppress all warning messages
  -regard-warnings     pay attention to warning messages
  -remote command      execute a command in an remote display process
  -repage geometry     size and location of an image canvas (operator)
  -respect-parentheses settings remain in effect until parenthesis boundary
  -sampling-factor geometry
                       horizontal and vertical sampling factor
  -scenes range        image scene range
  -seed value          seed a new sequence of pseudo-random numbers
  -set property value  set an image property
  -size geometry       width and height of image
  -support factor      resize support: > 1.0 is blurry, < 1.0 is sharp
  -texture filename    name of texture to tile onto the image background
  -transparent-color color
                       transparent color
  -treedepth value     color tree depth
  -update seconds      detect when image file is modified and redisplay
  -verbose             print detailed information about the image
  -visual type         display image using this visual type
  -virtual-pixel method
                       virtual pixel access method
  -window id           display image to background of this window
  -window-group id     exit program when this window id is destroyed
  -write filename      write image to a file

Image Operators:
  -auto-orient         automagically orient image
  -border geometry     surround image with a border of color
  -clip                clip along the first path from the 8BIM profile
  -clip-path id        clip along a named path from the 8BIM profile
  -colors value        preferred number of colors in the image
  -contrast            enhance or reduce the image contrast
  -crop geometry       preferred size and location of the cropped image
  -decipher filename   convert cipher pixels to plain pixels
  -deskew threshold    straighten an image
  -despeckle           reduce the speckles within an image
  -edge factor         apply a filter to detect edges in the image
  -enhance             apply a digital filter to enhance a noisy image
  -equalize            perform histogram equalization to an image
  -extract geometry    extract area from image
  -flip                flip image in the vertical direction
  -flop                flop image in the horizontal direction
  -frame geometry      surround image with an ornamental border
  -fuzz distance       colors within this distance are considered equal
  -gamma value         level of gamma correction
  -monochrome          transform image to black and white
  -negate              replace every pixel with its complementary color
  -normalize           transform image to span the full range of colors
  -raise value         lighten/darken image edges to create a 3-D effect
  -resample geometry   change the resolution of an image
  -resize geometry     resize 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
  -segment value       segment an image
  -sharpen geometry    sharpen the image
  -strip               strip image of all profiles and comments
  -threshold value     threshold the image
  -thumbnail geometry  create a thumbnail of the image
  -trim                trim image edges

Image Sequence Operators:
  -coalesce            merge a sequence of images
  -flatten             flatten a sequence of images

Miscellaneous Options:
  -debug events        display copious debugging information
  -help                print program options
  -list type           print a list of supported option arguments
  -log format          format of debugging information
  -version             print version information

In addition to those listed above, you can specify these standard X
resources as command line options:  -background, -bordercolor,
 -mattecolor, -borderwidth, -font, -foreground, -iconGeometry,
-iconic, -name, -shared-memory, -usePixmap, or -title.

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.

Buttons: 
  1    press to map or unmap the Command widget
  2    press and drag to magnify a region of an image
  3    press to load an image from a visual image directory
display: delegate library support not built-in '' (X11) @ error/display.c/DisplayImageCommand/1891.

我有X11

 brew info imagemagick
imagemagick: stable 7.0.5-4 (bottled), HEAD
Tools and libraries to manipulate images in many formats
https://www.imagemagick.org/
/usr/local/Cellar/imagemagick/7.0.5-4 (1,523 files, 22.6MB) *
  Poured from bottle on 2017-03-31 at 16:54:02
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/imagemagick.rb
==> Dependencies
Build: pkg-config ✔
Required: libtool ✔, xz ✔
Recommended: jpeg ✔, libpng ✔, libtiff ✔, freetype ✔
Optional: fontconfig ✘, little-cms ✘, little-cms2 ✔, libwmf ✘, librsvg ✘, liblqr ✘, openexr ✘, ghostscript ✘, webp ✘, openjpeg ✔, fftw ✘, pango ✘
==> Requirements
Optional: x11 ✔, perl >= 5.5 ✔
==> Options
--with-fftw
    Compile with FFTW support
--with-fontconfig
    Build with fontconfig support
--with-ghostscript
    Build with ghostscript support
--with-hdri
    Compile with HDRI support
--with-liblqr
    Build with liblqr support
--with-librsvg
    Build with librsvg support
--with-libwmf
    Build with libwmf support
--with-little-cms
    Build with little-cms support
--with-little-cms2
    Build with little-cms2 support
--with-opencl
    Compile with OpenCL support
--with-openexr
    Build with openexr support
--with-openjpeg
    Build with openjpeg support
--with-openmp
    Compile with OpenMP support
--with-pango
    Build with pango support
--with-perl
    Compile with PerlMagick
--with-quantum-depth-16
    Compile with a quantum depth of 16 bit
--with-quantum-depth-32
    Compile with a quantum depth of 32 bit
--with-quantum-depth-8
    Compile with a quantum depth of 8 bit
--with-webp
    Build with webp support
--with-x11
    Build with x11 support
--with-zero-configuration
    Disables depending on XML configuration files
--without-freetype
    Build without freetype support
--without-jpeg
    Build without jpeg support
--without-libpng
    Build without libpng support
--without-libtiff
    Build without libtiff support
--without-magick-plus-plus
    disable build/install of Magick++
--without-modules
    Disable support for dynamically loadable modules
--without-threads
    Disable threads support
--HEAD
  Install HEAD version

我已经有 ImageMagick 并删除了,然后再次安装后,显示未显示。我尝试了很多方法来解决这个问题,但仍然不起作用。有什么解决方案可以解决这个问题吗?预先感谢

macos imagemagick
2个回答
5
投票

如果您想在 Mac 上运行 X11 应用程序,您需要从

此处
安装 XQuartz,因为 Apple 不再随 macOS 提供 X 服务器。

请注意,homebrew不再将ImageMagick与X11链接,因此该答案不再有效。选项是从源安装ImageMagick,或添加您自己的“委托”,将屏幕上的图像显示委托给macOS内置的Preview应用程序,请参阅此处在此处输入链接描述


2
投票

除了安装 XQuartz 之外,您还需要安装支持 X11 的 imagemagick 版本。我使用以下命令让 Homebrew 完成所有艰苦的工作:

brew install imagemagick --with-x11

如果您已经使用自制程序安装了 imagemagick,则需要先将其卸载,如下所示:

brew uninstall imagemagick
© www.soinside.com 2019 - 2024. All rights reserved.