Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphicsMagick still required? #61

Closed
ssilverr opened this issue Aug 18, 2020 · 5 comments
Closed

GraphicsMagick still required? #61

ssilverr opened this issue Aug 18, 2020 · 5 comments

Comments

@ssilverr
Copy link

This plugin uses mini_magic,

A ruby wrapper for ImageMagick or GraphicsMagick command line

Can I use ImageMagick only? If not, what are the limiting factors?

Using ImageMagick only would allow me to skip an install step on a CI machine, and cut down on build time, as ImageMagick is included in the VM's image, GraphicsMagick is not.

@ssilverr
Copy link
Author

ssilverr commented Mar 8, 2021

So I cloned this lib, removed GraphicsMagick from my machine (with brew uninstall), and after some updating that rubocop suggested, I ran the actions and it did not crash, it created all images (I did have ImageMagick installed). Though I haven't compared the image output to the unaltered version (couldn't run it, as rubocop found some lines needed updating). @joshdholtz sorry to bother you, but I couldn't find why GraphicsMagick is a dependency and not ImageMagick, though the two are somewhat interchangeable.

@joshdholtz
Copy link
Member

@ssilverr No worries about the ping! So...

GraphicsMagick and ImageMagick are not direct dependencies of this plugin. The direct dependency is the mini_magic gem. mini_magick is a wrapper around either GraphicsMagick or ImageMagick (which are standalone executables).

GraphicsMagick is derived from ImageMagick (possible a direct fork) but also slightly different in the features that it provides these days. It seems that mini_magick offer a small enough feature set that it is interchangeable with either of the tools.

So... GraphicsMagick isn’t a requirement but having either GraphicsMagick or ImageMagick is a requirement 😊

I hope this helps! ❤️

@ssilverr
Copy link
Author

ssilverr commented Mar 8, 2021

@joshdholtz Wow, thanks for the quick reply!

Thank you, that's what I gathered as well. So I tested it again, and this time the action fails, if I don't have GraphicsMagick installed (don't know why i didn't fail before, maybe my machine needed a restart). It tries to call gm identify ... but fails, as it can't find the gm executable. Now, if I configure MiniMagick in the action like:

        MiniMagick.configure do |config|
          config.cli = :imagemagick
          config.timeout = 5
        end

the actions run wihtout a hich. Two questions:

  1. If the deafult cli is ImageMagick, why is it trying to call gm?
  2. Can I submit a PR, where you could set your default cli? Altough, I'm not sure if it would break existing setups, if the we define GraphicsMagick to be the deafult (then again, it shouldn't because this plugin explicitly requires it)

@KBSchmidt
Copy link

@joshdholtz Well either way, here it is #67 (sorry the diffrerent user)

@ssilverr
Copy link
Author

Closing for #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants