Use magick command from ImageMagick #1101
No reviewers
Labels
No labels
approved, awaiting change
broken setup
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma!1101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "norm/akkoma:magick"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Based on !854, but with the following changes:
mogrifycommand as it's not deprecated in IM 7convertfor older IM versionscheck_filtertakes a list instead of a single commandmagickcommand checks 1515eedd0cGiven we already repeatedly research
PATHfor the command anyway instead of caching it implies the overhead is (assumed to be) neglible and thus potentially doubling it for IMv6 setups shouldn’t be an issue and avoids the need for a config options for our own code; neat.In !854 i mentioned the external
Mogrifymodule still uses plainconvertexcept on Windows by default (but can be configured to use any path) meaning we could still see deprecation warnings from there. However, looking closer, Mogrify only uses convert in functions we don’t use, orsave/2withoutin_place: truebut we always use the latter option.convertandmagickare actually not drop-in compatible, the latter is stricter about argument ordering, but given we only saw deprecation warning but no errors with IMv7 so far it seems the args we construct are fine.I guess this means this should successfully banish all deprecation warnings without breaking compat and (presumed) negligible overhead (and only on IMv6 setups). Seems good; thank you!
Just a minor nit
@ -227,2 +227,2 @@"#{filter} is specified in list of Pleroma.Upload filters, but the " <>"#{command_required} command is not found""#{filter} is specified in list of Pleroma.Upload filters, but none of the commands in " <>"#{commands_required} are found"directly interpolating a list of binaries here, will just concat the command names without any seperation. Instead this should use
[#{Enum.join(commands_required, ", ")}]to specify sane separators and visibly group the list content7b662d793ea14a369a3f