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

Updates ImageMagick to version 7 and makes its use platform independent #144

Merged
merged 2 commits into from
Aug 18, 2023

Conversation

kalinni
Copy link
Contributor

@kalinni kalinni commented Aug 17, 2023

The code for cropping pictures was tailored to unix systems only, now it should run on all platforms.
Code is also adapted to work with the latest ImageMagick (major changes were introduced with ImageMagick 7, ImageMagick 6 is legacy now).

Details: In the past, "convert" needed to be replaced with "magick convert" to work on windows. Now only "magick" is used on both systems (porting guide: https://imagemagick.org/script/porting.php).

The code for cropping pictures was tailored to unix systems only, now it
should run on all platforms.
Code is also adapted to work with the latest ImageMagick (major changes
were introduced with ImageMagick 7).
@fkaiserbio fkaiserbio merged commit c429d14 into pharmai:development Aug 18, 2023
1 check passed
@fkaiserbio
Copy link
Contributor

Thank you for this contribution @kalinni 👍

@kalinni kalinni deleted the bug/magick branch August 18, 2023 09:58
@mestia
Copy link
Contributor

mestia commented Aug 30, 2023

What about back compatibility with older Imagemagick versions ?
So far imagemagick 7 is not available on Debian/Ubuntu systems, so unless the version bump has important improvements I'd suggest to enable some heuristic to detect the versions of imagemagick on the target system and depending on that run the compatible command.

@kalinni
Copy link
Contributor Author

kalinni commented Aug 31, 2023

The issue is, that with the old implementation the code did not run on windows. ImageMagick 6 used "convert" as its command for what we use it for, which clashes with the native windows command "convert" for file systems. ImageMagick 7 now uses "magick" which avoids the issue.
ImageMagick 6 is legacy and ImageMagick 7 has been around for at least 5 years from what I see - is there really no chance to get it installed for PLIP web? They provide a binary release for Linux here: https://imagemagick.org/script/download.php

As PLIP runs perfectly fine without ImageMagick and we only require the automatic cropping for nice pictures on PLIP web I would not make including back compatibility to ImageMagick 6 a priority unless we can't get it to run for PLIP web right now.

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

Successfully merging this pull request may close these issues.

None yet

3 participants