Open condemil opened 5 months ago
--width
/--height
are not recommendations, they define the maximum size preserving the aspect ratio.
What output do you expect? Cropped image? Stretched image? Centered image?
Centered image, not cropped, not stretched. Just as you see it originally when open SVG file. I think it makes sense if you want to use the icon as avatar, or app icon for mobile apps. Or on your website as favicon / icon in manifest.json (android specific favicon).
Ok, will take a look.
But please leave the possibility to keep current behaviour - to use given size as maximum without adding empty space to the resulting PNG. There are also use cases for it.
@Vasilich Depends on use-case it may be that you only need to specify either --width
or --height
, but not both, then it should work as you mentioned.
Use-case: The SVG icon has size 20x30, the online service expects uploaded icon to be PNG with size 64x64px.
Current behavior: The width/height arguments is not respected and work more like a recommendation:
Expected result: The width/height arguments define exact image size. Icon is centered in the resulted image.
Example: