Bug 241851 - graphics/vips: add OPTIONS support
Summary: graphics/vips: add OPTIONS support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Danilo Egea Gondolfo
Depends on:
Reported: 2019-11-10 08:08 UTC by Alex Dupre
Modified: 2019-11-11 17:10 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (danilo)

vips.patch (4.30 KB, patch)
2019-11-10 08:08 UTC, Alex Dupre
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Dupre freebsd_committer 2019-11-10 08:08:04 UTC
Created attachment 209027 [details]

- Add OPTIONS for all supported formats.
- Add HEIF format support
- Support newer ImageMagick port and allow to switch to GraphicsMagick
- Remove un-needed dependencies
Comment 1 Daniel Engberg freebsd_committer 2019-11-10 11:56:41 UTC
Unless I'm reading yor patch incorrectly can you elaborate on the switch from GraphicsMagick to ImageMagick as default configuration?
Comment 2 Danilo Egea Gondolfo freebsd_committer 2019-11-10 13:46:37 UTC
Hello, thank you for your patch. I like it.

I just have the same question, why moving the Magick dependency to ImageMagick? Is it better than GraphicsMagick in any way?
Comment 3 Alex Dupre freebsd_committer 2019-11-10 18:00:40 UTC
I can report a personal experience and a general opinion:

- personal experience: with GraphicsMagick I cannot open any BMP file with vips, with ImageMagick I have no problems

- general opinion: GraphicsMagick has been superior to ImageMagick for a while, but it looks like IM improved a lot and GM now lacks many features present in IM7

I cannot bring evidence for the latter, but the first point seems serious enough for the switch, and the fact that vips has a default on IM7 should mean something.
Comment 4 commit-hook freebsd_committer 2019-11-10 22:02:38 UTC
A commit references this bug:

Author: danilo
Date: Sun Nov 10 22:01:53 UTC 2019
New revision: 517234
URL: https://svnweb.freebsd.org/changeset/ports/517234

  - Convert hardcoded dependencies to options
  - Defaults magick to ImageMagick (vips uses it by default)

  PR:		241851
  Submitted by:	ale

Comment 5 Danilo Egea Gondolfo freebsd_committer 2019-11-10 22:03:38 UTC
Committed. Thank you!
Comment 6 Daniel Engberg freebsd_committer 2019-11-10 23:34:29 UTC
This seems to be some weird build issue, at least in the past:

fwiw, GraphicsMagick is still quite a bit faster than Image so it would be nice if this could be fixed rather than switching libraries.

I can confirm the issue in my box.
Comment 7 Alex Dupre freebsd_committer 2019-11-11 17:10:07 UTC
That issue was related to the fact that vips wasn't actually built with GraphicsMagick support. BMP format is probably the most common format that is handled by magick library in vips. But in our case:

Magick package:                         GraphicsMagick
Magick API version:                     magick6
load with libMagick:                    yes
save with libMagick:                    yes

# ldd /usr/local/bin/vipsheader | grep Magick
        libGraphicsMagick.so.3 => /usr/local/lib/libGraphicsMagick.so.3 (0x800800000)
# vipsheader /usr/local/share/xsl/docbook/slides/slidy/graphics/nofold-dim.bmp
vipsheader: VipsForeignLoad: "/usr/local/share/xsl/docbook/slides/slidy/graphics/nofold-dim.bmp" is not a known file format

So it's actually built with GM support, but it doesn't work as intended. As stated in such bug report the author doesn't use GM, so it's not really tested.

Magick package:                         MagickCore
Magick API version:                     magick7
load with libMagick:                    yes
save with libMagick:                    yes

# ldd /usr/local/bin/vipsheader | grep Magick
        libMagickCore-7.so.6 => /usr/local/lib/libMagickCore-7.so.6 (0x8007c0000)
# vipsheader /usr/local/share/xsl/docbook/slides/slidy/graphics/nofold-dim.bmp
/usr/local/share/xsl/docbook/slides/slidy/graphics/nofold-dim.bmp: 9x9 uchar, 3 bands, srgb, magickload