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

Fix Info#parse_warnings regex #540

Merged
merged 3 commits into from
Sep 13, 2022

Conversation

lab-kw
Copy link
Contributor

@lab-kw lab-kw commented Apr 27, 2022

Fixed a case where the log could not be parsed correctly when there were multiple lines.
ImageMagick's identify log shows that the file size includes a decimal point and a unit prefix.

example:

PAM 800 800 2.23232MB

cf. prefixes
https://github.com/ImageMagick/ImageMagick/blob/6bcfc4813644ce1450b7ebc9b7cedbd0ff172d71/MagickCore/string.c#L1088

@midnight-wonderer
Copy link

What was d* for?

@lab-kw
Copy link
Contributor Author

lab-kw commented Jun 7, 2022

@midnight-wonderer It's my mistake. Thank you for pointing out.

@thiagofm
Copy link
Member

Hey @lab-kw thanks for your contribution!

Could you add a test case for that?

Cheers.

@lab-kw
Copy link
Contributor Author

lab-kw commented Aug 10, 2022

@thiagofm
I added a test case.
I have confirmed that this test now passes by fixing parse_warnings.

My environment (ImageMagick is installed by yum)

Version: ImageMagick 6.9.10-68 Q16 x86_64 2021-10-14 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(3.1)
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff wmf x xml zlib

Cheers.

@thiagofm
Copy link
Member

Thanks for your contribution @lab-kw !

@thiagofm thiagofm merged commit 2ed9959 into minimagick:master Sep 13, 2022
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