Magick.net: LiquidRescale doesn't work

Created on 12 Mar 2019  路  9Comments  路  Source: dlemstra/Magick.NET

Prerequisites

  • [x] I have written a descriptive issue title
  • [x] I have verified that I am using the latest version of Magick.NET
  • [x] I have searched open and closed issues to ensure it has not already been reported

Description

LiquidRescale does not work, throwing the error:
DelegateLibrarySupportNotBuiltIn 'gfx/bench.jpg' (LQR) @ error/resize.c/LiquidRescaleImage/2032

Steps to Reproduce

using (MagickImage image = new MagickImage("gfx/bench.jpg"))
{
    image.LiquidRescale(new Percentage(50));

    await SendImage(response, image);
}

System Configuration

  • Magick.NET version: Magic.NET-Q8-AnyCPU 7.11.0
  • Environment (Operating system, version and so on): Ubuntu 18.10 x64
  • Additional information: 1 GB memory, DigitalOcean VPS
enhancement

All 9 comments

At this moment there is no support yet for using LiquidRescale on non Windows platforms. This requires glib support and I have not made time for that.

Hi, I'm getting this error on my CentOS server. I assume this also applies to the whole ImageMagick suite? I'm using the version 7.0.8-53

This is not related to the whole ImageMagick suite. For this to work on ImageMagick you will need to recompile it with glib and liblqr support.

I was able to make this work on MacOS (10.15 beta + XCode 11) with a clone of the Magick.Native repo by doing the following:

I used the process that the Magick.Native/build/dotnet/macos/build.yml defined in order to run each of these scripts.

1) Run the first two scripts which install the dependencies and clone the ImageMagick libraries
2) Either compile lqr manually in Magick.Native/src/ImageMagick/libraries/lqr or install from brew using the command brew install liblqr.
3) Edit Magick.Native/build/dotnet/macos/build.ImageMagick.sh file. Add --with-lqr on the configure line within the buildImageMagick() function
3) Edit Magick.Native/src/Magick.Native/CMakeLists.txt. Within the target_link_libraries portion:
- Add ${LIB_DIR}/liblqr-1.0.dylib
- Change ${LIB_DIR}/libxml2.a to /usr/lib/libxml2.dylib
4) Run the rest of the scripts listed within the YAML.
5) You should have a dylib ready to use.

After running through those steps, I was able to run a liquid rescale and produce a proper image output via a .NET Core 2.2 console application.

@dlemstra ^^

@snickler I cannot use this solution because you are dynamically linking the liblqr library. This library depends on the glib library and that should also then be compiled. This is all possible but I have not yet made time to focus on this.

@dlemstra - Thanks for that clarification. I can try to take a stab at this to get it all compiled properly.

Help is always welcome. We use our own source code repositories that can be found here: https://github.com/ImageMagick. For example: https://github.com/ImageMagick/glib. Feel free to reach out if you need more assistence.

The new release has just been published and it includes support for LiquidRescale on Linux and macOS.

Was this page helpful?
0 / 5 - 0 ratings