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

Image module does not handle SVG correctly #38

Closed
stcarrez opened this issue Mar 5, 2023 · 0 comments
Closed

Image module does not handle SVG correctly #38

stcarrez opened this issue Mar 5, 2023 · 0 comments

Comments

@stcarrez
Copy link
Owner

stcarrez commented Mar 5, 2023

If we upload an SVG image, the Image module fails to identify the dimension. We get can exception while parsing the output of convert. The thumbnail job fails and terminates with an error.

[2023-03-05 08:05:54] INFO  - AWA.Images.Module - : Dimension  --export-png= -  45.. 58
[2023-03-05 08:05:54] ERROR - AWA.Jobs.Services - : Exception when executing job AWA.IMAGES.MODULES.THUMBNAIL_JOB_DEFINITION.S_FACTORY
Exception when executing job AWA.IMAGES.MODULES.THUMBNAIL_JOB_DEFINITION.S_FACTORY
[2023-03-05 08:05:55] ERROR - AWA.Jobs.Services - : Exception:: Exception CONSTRAINT_ERROR: bad input for 'Value: "--e" at [/src/adafr/ada-france/bin/adafr-server]
0x1600e02 system__val_util__bad_value at ???
0x15fcfcc system__val_int__impl__scan_integer at ???
0x15fd055 system__val_int__impl__value_integer at ???
0x71b555 Awa.Images.Modules.Create_Thumbnail at awa-images-modules.adb:267
0x71cbbd Awa.Images.Modules.Build_Thumbnail at awa-images-modules.adb:306
0x71a331 Awa.Images.Modules.Do_Thumbnail_Job at awa-images-modules.adb:202
0x718a0e Awa.Images.Modules.Thumbnail_Worker at awa-images-modules.adb:53

stcarrez added a commit that referenced this issue Mar 5, 2023
- moved the size identification in a separate procedure Extract_Size
- fix and harden the implementation of Extract_Size
- add unit test for Extract_Size
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

No branches or pull requests

1 participant