-
Notifications
You must be signed in to change notification settings - Fork 51
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
Modify Wand builder and replace Imagemagick and Pillow with it #274
Conversation
This modified Wand builder can pass the following tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution. Nice work, it does work for most content, but there is still missing case .
There's still some behaviour that doesn't work as expected:
-
You need to reintroduce white background to not have weird and poor quality result for file with transparency. You can try with https://fr.wikipedia.org/wiki/Portable_Network_Graphics#/media/Fichier:PNG_transparency_demonstration_1.png , https://commons.wikimedia.org/wiki/File:Psychedelic_Peacesign_Gif.gif , and other (svg and 3d file are concerned too by the issue) . Unfortunately our test are not really effective to check theses case.
-
You should probably deprecate both Pillow and ImageMagick (command line) builder like the Wand one. If you don't do so, it will fallback to them, and i don't think it make much sense if we want to simplify the process by having just one builder.
-
xcf and all raw image file are not supported by wand builder on my own test (disabling the 2 other builders).
-
There is no more quality/progressive/resample_algorithm options like in Pillow. I'm not sure there is a one to one conversion possible but i do think it's possible to have similar config for imagemagick.
Edit: another file to check for transparency: #261
fixed with commit 24463a1 and 1af97cc
fixed with 7572911
fixed with 7572911
Yeah, quality/progressive/resample_algorithm there are all in ImageMagick. I have created progressive JPEG image with |
@inkhey we lost several times the white background without to detect it before releasing. Do we have a dedicated test case? It would be interesting to have one in order to ensure quality based on automatic tests instead of developers watchfulness |
@lebouquetin |
* misc: add concourse ci * fix: update drawio with functional install link PR ref: algoo#279 Co-authored-by: raphj <[email protected]>
- Add all office mimetypes mapping supported by LibreOffice to mimetypes_storage to avoid issue of lacking mimetype in system. - add known issue info about mimetypes issues. - better logs when mimetype is not found. Issue ref: algoo#283 PR ref: algoo#284 Co-authored-by: raphj <[email protected]>
…it/safe about such issue
#271
#253
PR Goal
Now the image__wand builder can work as the previous pillow builder, them passed the same test cases. And replace pillow and Imagemagick(command line) builder with wand builder.
Implemented solution
Now the image__wand builder is the default builder for image files,
and also the image__wand builder instead of pillow builder when other builder call
How to modify wand ?
The following information is referenced:
https://legacy.imagemagick.org/Usage/thumbnails/
https://stackoverflow.com/questions/25438402/python-wand-how-to-resize-keeping-aspect-ratio-and-filling-in-the-remaining-spac/25452063#25452063
Checkpoints
(give the reason), or an issue has been created to implement the test (give the link)
Only the
test_drawio_to_jpeg
test case failed, I think it was the case itself because the pillow builder also failed, if I can confirm, I will raise another PR to fix this test case.