Skip to content

Imagemagick CLI mode doesn't work with Lua 5.5 and image magic #358

Description

@bewa1t

to reproduce,

Open README.md of https://github.com/spring-projects/spring-petclinic

Observe an error

Lua callback:                                                                                                                                               
...nvim/lazy/image.nvim/lua/image/processors/magick_cli.lua:76: magick: unable to read font `' @ error/annotate.c/RenderFreetype/1660.                      
                                                                                                                                                            
stack traceback:                                                                                                                                            
        [C]: in function 'error'                                                                                                                            
        ...nvim/lazy/image.nvim/lua/image/processors/magick_cli.lua:76: in function <...nvim/lazy/image.nvim/lua/image/processors/magick_cli.lua:75>        
        [C]: in function 'wait'                                                                                                                             
        ...nvim/lazy/image.nvim/lua/image/processors/magick_cli.lua:85: in function 'convert_to_png'                                                        
        ...er/.local/share/nvim/lazy/image.nvim/lua/image/image.lua:326: in function <...er/.local/share/nvim/lazy/image.nvim/lua/image/image.lua:241>      
        [C]: in function 'pcall'                                                                                                                            
        ...er/.local/share/nvim/lazy/image.nvim/lua/image/image.lua:410: in function ''                                                                     
        vim/_core/editor.lua: in function <vim/_core/editor.lua:0>    

with the image.nvim config done via lazy with a following config:

local plugin = {
    "3rd/image.nvim",
    build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
    tag = "v1.5.1",
    opts = {
        processor = "magick_cli",
    }
}

return plugin

the versions:

➜  nvim-config git:(main) ✗ nvim --version
NVIM v0.12.1
Build type: Release
LuaJIT 2.1.1774896198
Run "nvim -V1 -v" for more info
➜  nvim-config git:(main) ✗ magick --version
Version: ImageMagick 7.1.2-19 Q16-HDRI aarch64 23897 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/license/
Features: Cipher DPC HDRI Modules 
Delegates (built-in): bzlib freetype heic jng jpeg lcms ltdl lzma png tiff webp xml zlib zstd
Compiler: clang (21.0.0)
➜  nvim-config git:(main) ✗ lua -v
Lua 5.5.0  Copyright (C) 1994-2025 Lua.org, PUC-Rio

I'm on a MacBook with m3 processor.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions