fastlane-community / fastlane-plugin-appicon

Generate required icon sizes and iconset from a master application icon.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphicsMagick still required?

ssilverr opened this issue · comments

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.

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.

@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! ❤️

@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)

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

Closing for #67