https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292019-01-25T01:31:23ZRedmineRedmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=896172019-01-25T01:31:23ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/22995">Feature #22995</a>: Replace ImageMagick thumbnail creating with GD Graphics Library aka libgd</i> added</li></ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=898602019-02-07T04:42:48ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/22368">30492-replace-with-minimagick.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22368/30492-replace-with-minimagick.patch">30492-replace-with-minimagick.patch</a> added</li><li><strong>File</strong> <a href="/attachments/22369">gantt_rmagick@2x.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22369/gantt_rmagick@2x.png">gantt_rmagick@2x.png</a> added</li><li><strong>File</strong> <a href="/attachments/22370">gantt_minimagick@2x.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22370/gantt_minimagick@2x.png">gantt_minimagick@2x.png</a> added</li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Redmine uses ImageMagick via rmagick to generate thumbnails and gantt png export.</p>
</blockquote>
<p>Redmine does not use rmagick to generate thumbnails, but it directly executes the ImageMagick convert command.</p>
<p>rmagick is using only <code>Redmine::Helpers::Gantt#to_image</code> . This method is called when gantt png export.<br />I replaced rmagick with minimagick. I attached a patch.</p>
<ul>
<li>gantt png export with rmagick.<br /><img src="https://www.redmine.org/attachments/download/22369/gantt_rmagick@2x.png" srcset="https://www.redmine.org/attachments/download/22369/gantt_rmagick@2x.png 2x" style="width:50%;border:1px solid #ccc;" alt="" /></li>
</ul>
<ul>
<li>gantt png export with minimagick. (Today's red line is different as we export it with rmagick and export it with minimagick the next day.)<br /><img src="https://www.redmine.org/attachments/download/22370/gantt_minimagick@2x.png" srcset="https://www.redmine.org/attachments/download/22370/gantt_minimagick@2x.png 2x" style="width:50%;border:1px solid #ccc;" alt="" /></li>
</ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=898692019-02-07T10:53:37ZAnonymous
<ul></ul><p>Definitely +1 if it takes less memory :)</p>
<p>But I also wanted to take a look into doing all the image processing and saving stuff on the front end instead. Now that you can create canvas objects with <strong>2d</strong> and <strong>webgl</strong> contexts as variables of javascript, it makes all these image generation and manipulations super easy even on the front end and thus there is little to no reason to bother a server with image processing. These tools already integrated in browsers (even IE11), require no libraries at all and definitely should be used. Imho server should just supply the required links to resources, JS should pick it up to process and store the processed into cache to request next time from the cache instead of resizing all the time (for best optimization).</p>
<p>And that would also be -1 back-end dependency.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=898822019-02-08T03:30:33ZGo MAEDA
<ul></ul><p>Max Johansson wrote:</p>
<blockquote>
<p>But I also wanted to take a look into doing all the image processing and saving stuff on the front end instead. Now that you can create canvas objects with <strong>2d</strong> and <strong>webgl</strong> contexts as variables of javascript, it makes all these image generation and manipulations super easy even on the front end and thus there is little to no reason to bother a server with image processing. These tools already integrated in browsers (even IE11), require no libraries at all and definitely should be used. Imho server should just supply the required links to resources, JS should pick it up to process and store the processed into cache to request next time from the cache instead of resizing all the time (for best optimization).</p>
</blockquote>
<p>Do you mean that the patch should not be committed and we should wait for someone to submit a JavaScript-based patch?</p>
<p>Generating gantt PNG images with JavaScript is a nice option but I think it is better to go with mini_magic for now because no one is currently working on JavaScirpt-based gantt export. This mini-magick-based patch can be delivered in 4.1.0, but no one knows when a JavaScript-based patch will be submitted. Of course, it is really nice if someone submits a JavaScript-based patch in the future.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=898842019-02-08T05:35:43ZBernhard Rohloff
<ul></ul><p>I also agree to commit this patch as we don't have a working JS alternative by now and it will definitely take it's time to develop and test it. In the meantime it's a nice improvement.<br />+1</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=898872019-02-08T08:34:15ZMarius BÄ‚LTEANU
<ul></ul><p>Go, Bernhard, should we run some tests with both libraries (with new version of rmagick)? Also, I'm observing that rmagick is going to release a new version soon with a lot of refactoring and has new maintainers.</p>
<p>According to Travis, minimagick doesn't run the tests on ruby 2.6, should we create a PR before changing to it?</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=898892019-02-08T09:03:36ZAnonymous
<ul></ul><p>Go, sorry, I meant, I totally agree with committing the change to mini magic for now as current solution, I just wanted to also inform that this could definitely be improved even more in the future by trying out JS. I have other things at the moment, but surely, I'll take a look at it in the future. :)</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=902142019-02-18T00:54:59ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-3 status-5 priority-4 priority-default closed" href="/issues/30821">Patch #30821</a>: Stay in RMagick 2.16.0 and don't update to 3.0.0</i> added</li></ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=902162019-02-18T01:34:58ZGo MAEDA
<ul></ul><p>RMagick 3.0.0 has released on 2019-02-16 but it does not support ImageMagick 7.0 yet. In addition, it narrowed the supported version. The minimum supported version of ImageMagick has raised from 6.4.9 to 6.8.9.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=902182019-02-18T03:48:01ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=902282019-02-18T07:49:29ZGo MAEDA
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/90228/diff?detail_id=72442">diff</a>)</li></ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=903972019-02-24T11:55:16ZGo MAEDA
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>According to Travis, minimagick doesn't run the tests on ruby 2.6, should we create a PR before changing to it?</p>
</blockquote>
<p>I have just sent a pull request.<br /><a class="external" href="https://github.com/minimagick/minimagick/pull/475">https://github.com/minimagick/minimagick/pull/475</a></p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=908892019-03-22T16:48:07ZGoh Matsumoto
<ul></ul><blockquote>
<p>RMagick 3.0.0 has released on 2019-02-16 but it does not support ImageMagick 7.0 yet. In addition, it narrowed the supported version. The minimum supported version of ImageMagick has raised from 6.4.9 to 6.8.9.</p>
</blockquote>
<p>I don't oppose replacing rmagick with minimagick.<br />But It seems that this isn't quite persuasive enough.</p>
<p>As described in the comment, ImageMagick 6.8.9 was released at nearly 4 years ago.<br /><a class="external" href="https://github.com/rmagick/rmagick/issues/392#issuecomment-466100509">https://github.com/rmagick/rmagick/issues/392#issuecomment-466100509</a></p>
<p>And Redmine 3.4.0 released 2 years ago.<br />Do you think Redmine has to work with ImageMagick 6.8.8 or former?</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=908912019-03-23T05:25:54ZGo MAEDA
<ul></ul><p>Goh Matsumoto wrote:</p>
<blockquote>
<p>Do you think Redmine has to work with ImageMagick 6.8.8 or former?</p>
</blockquote>
<p>Yes, I think so because some major Linux distributions still bundle older ImageMagick. For example, CentOS 7.6 and Amazon Linux AMI 2018.03 bundles ImageMagick 6.7.8.9.</p>
<p>You cannot install Redmine on such distributions without a trick like "bundle install --without rmagick". But I think it is difficult for admins who are not familiar with Ruby to find the solution. The installation process should be as simple as possible.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=910422019-03-31T22:29:34ZMarius BÄ‚LTEANU
<ul></ul><p>Rails 6 is deprecating the MiniMagick backend and replacing the library with <a href="https://github.com/janko/image_processing" class="external">ImageProcessing</a> gem. More details can be found in the <a href="https://github.com/rails/rails/blob/v6.0.0.beta3/activestorage/CHANGELOG.md" class="external">Changelog</a>.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=910512019-04-01T06:51:22ZGo MAEDA
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>Rails 6 is deprecating the MiniMagick backend and replacing the library with <a href="https://github.com/janko/image_processing" class="external">ImageProcessing</a> gem. More details can be found in the <a href="https://github.com/rails/rails/blob/v6.0.0.beta3/activestorage/CHANGELOG.md" class="external">Changelog</a>.</p>
</blockquote>
<p>I didn't know that. Thanks.</p>
<p>Although Rails 6 does not directly depend on mini_magick, image_processing gem seems to require mini_magick. Please see: <a class="external" href="https://rubygems.org/gems/image_processing/versions/1.8.0">https://rubygems.org/gems/image_processing/versions/1.8.0</a></p>
<p>Maybe the <a href="https://github.com/rails/rails/commit/ca1296858788780dcb5497e86f66b56170cca279" class="external">change</a> in Rails adds image_processing as a wrapper for libvips or mini_magick.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=911822019-04-10T01:00:54ZRonan Chagas
<ul></ul><p>Goh Matsumoto wrote:</p>
<blockquote>
<p>I don't oppose replacing rmagick with minimagick.<br />But It seems that this isn't quite persuasive enough.</p>
</blockquote>
<p>Some distributions, like openSUSE Leap 15.0, does not ship ImageMagick 6 anymore. Currently, there is no official way to install ImageMagick 6 on Leap 15.0, 15.1, and Tumbleweed. Hence, it is not possible to install Redmine with `rmagick` since it won't build against ImageMagick 7.</p>
<p><strong>EDIT</strong>: By the way, this patch is working perfectly and, even installing ImageMagick6 in openSUSE (latest version), I am getting and error when exporting Gantt to PNG.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=912712019-04-20T08:42:10ZJun NAITOH
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Goh Matsumoto wrote:</p>
<blockquote>
<p>Do you think Redmine has to work with ImageMagick 6.8.8 or former?</p>
</blockquote>
<p>Yes, I think so because some major Linux distributions still bundle older ImageMagick. For example, CentOS 7.6 and Amazon Linux AMI 2018.03 bundles ImageMagick 6.7.8.9.</p>
<p>You cannot install Redmine on such distributions without a trick like "bundle install --without rmagick". But I think it is difficult for admins who are not familiar with Ruby to find the solution. The installation process should be as simple as possible.</p>
</blockquote>
<p><a href="https://rubygems.org/gems/rmagick/versions/3.1.0" class="external">rmagick 3.1.0</a> seems to extend the range of support for ImageMagick.</p>
<blockquote>
<p>ImageMagick 6.7.7 or later</p>
</blockquote> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=912722019-04-20T09:33:23ZJun NAITOH
<ul></ul><p>Redmine's PDF output feature uses the rbpdf library, now.<br />The image processing of the rbpdf library has parts depending on RMagick.<br />If Redmine migrates to minimagick, (and in environments where RMagick is not installed), PDF will not display images other than 8bit PNG (GIF, JPEG, non 8bit PNG).</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=912742019-04-20T09:43:57ZGo MAEDA
<ul></ul><p>Jun NAITOH wrote:</p>
<blockquote>
<p>Redmine's PDF output feature uses the rbpdf library, now.<br />The image processing of the rbpdf library has parts depending on RMagick.<br />If Redmine migrates to minimagick, (and in environments where RMagick is not installed), PDF will not display images other than 8bit PNG (GIF, JPEG, non 8bit PNG).</p>
</blockquote>
<p>Thank you for pointing it out. I didn't know that the PDF export feature depends on RMagick.</p>
<p>I have changed my mind by knowing that. We had better not to commit the patch for now because replacing RMagick with MiniMagick because may break the PDF export feature.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=915182019-05-04T10:31:19ZGo MAEDA
<ul><li><strong>Category</strong> changed from <i>Attachments</i> to <i>Gems support</i></li></ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=922312019-06-05T11:01:46ZRichard Hafenscher
<ul></ul><p>Ronan Chagas wrote:</p>
<blockquote>
<p>Goh Matsumoto wrote:<br /><strong>EDIT</strong>: By the way, this patch is working perfectly and, even installing ImageMagick6 in openSUSE (latest version), I am getting and error when exporting Gantt to PNG.</p>
</blockquote>
<p>I just got rmagick 2.16.0 with ImageMagic 6.8.8.1 running on OpenSUSE Leap 15.1 by installing these packets (most of theme from the Leap 42.3 repository):<br />ImageMagick-6.8.8.1-82.1.x86_64.rpm<br />ImageMagick-config-6-SUSE-6.8.8.1-82.1.x86_64.rpm<br />ImageMagick-devel-6.8.8.1-82.1.x86_64.rpm<br />libIlmImf-Imf_2_1-21-2.1.0-10.3.1.x86_64.rpm<br />libMagick++-6_Q16-3-6.8.8.1-82.1.x86_64.rpm<br />libMagickCore-6_Q16-1-6.8.8.1-82.1.x86_64.rpm<br />libMagick++-devel-6.8.8.1-82.1.x86_64.rpm<br />libMagickWand-6_Q16-1-6.8.8.1-82.1.x86_64.rpm<br />libwebp5-0.4.3-9.3.x86_64.rpm</p>
<p>The Gantt PNG export works now.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=930452019-08-11T12:01:37ZJun NAITOH
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Thank you for pointing it out. I didn't know that the PDF export feature depends on RMagick.</p>
<p>I have changed my mind by knowing that. We had better not to commit the patch for now because replacing RMagick with MiniMagick because may break the PDF export feature.</p>
</blockquote>
rbpdf 1.20.0 has been released.<br />The following support was added.
<ul>
<li>Compatible with RMagick 4.0.</li>
<li>Added MiniMagick support. (MiniMagick can be used as an alternative to RMagick.)</li>
</ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=930462019-08-11T12:16:26ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>4.1.0</i></li></ul><p>Jun NAITOH wrote:</p>
<blockquote>
rbpdf 1.20.0 has been released.<br />The following support was added.
<ul>
<li>Compatible with RMagick 4.0.</li>
<li>Added MiniMagick support. (MiniMagick can be used as an alternative to RMagick.)</li>
</ul>
</blockquote>
<p>Great!</p>
<p>I would like to propose to switch to MiniMagick again. I am sure that moving to MiniMagick will make Redmine installation easier.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=930492019-08-11T12:23:30ZGo MAEDA
<ul><li><strong>Blocked by</strong> <i><a class="issue tracker-3 status-5 priority-4 priority-default closed" href="/issues/31877">Patch #31877</a>: Update rbpdf (~> 1.20.0)</i> added</li></ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=930892019-08-13T08:53:18ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/23620">30492-v2.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23620/30492-v2.diff">30492-v2.diff</a> added</li></ul><p>Updated the patch for the current trunk (<a class="changeset" title="Update redcarpet to 3.5.0 (#31847). Patch by Marius BALTEANU." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/18353">r18353</a>).</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=931052019-08-14T02:41:21ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Replace rmagick with minimagick</i> to <i>Replace RMagick with MiniMagick</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed the patch. Thank you for your contribution.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=955502020-01-07T12:28:32ZRobert Schneider
<ul></ul><p>If one could update the wiki regarding installation and upgrade, please. Are the devel packages of Image/GraphicsMagick required? Is there anything special to keep in mind on upgrade? I do not know enough about Ruby stuff.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=957822020-01-19T19:07:42ZDeoren Moor
<ul></ul><p>Robert Schneider wrote:</p>
<blockquote>
<p>If one could update the wiki regarding installation and upgrade, please. Are the devel packages of Image/GraphicsMagick required? Is there anything special to keep in mind on upgrade? I do not know enough about Ruby stuff.</p>
</blockquote>
<p>This was confusing to me as well. Reading the official install/upgrade docs, it appears those packages are required, but looking at the discussion here I get the impression that they're not.</p> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=994592020-10-19T16:12:29ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-10 priority-4 priority-default" href="/issues/34046">Defect #34046</a>: Escaping symbols in task subject can broke export to Gantt (PNG)</i> added</li></ul> Redmine - Feature #30492: Replace RMagick with MiniMagickhttps://www.redmine.org/issues/30492?journal_id=1108082023-09-21T00:05:34ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/38728">Defect #38728</a>: Correctly escape issue text in Gantt PNG export for ImageMagick convert</i> added</li></ul>