Added Image scaling and width feature. #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I really like this extension as Dealing with images is a major pain.
I have added the ability to use non-square images, by scaling the SVG on the parameter given (width, height, and/or scaling). If the height or width is provided the other is scaled to fit. You can also preset a scaling.
Ex:
{ type: 'TabIconiOS', width: 52, scaling: 2, color: '#f80c12', path: 'iOS/Resources/{0}@2x' }
Will scale the image to two times (width = 102).
Ex:
{ type: 'TabIconiOS', scaling: 2, color: '#f80c12', path: 'iOS/Resources/{0}@2x' }
Will also scale the image to two times, but width and height are determined by the SVG. The height and width tend to be funky. I use Affinity Designer for SVG, and the size I save it as isn't always the size that it reads in. The ration of width/height are correct. I recommend setting a width and or height when scaling.