-
-
Notifications
You must be signed in to change notification settings - Fork 194
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: 6.1.2
- Cross-platform modules:
- Android Runtime: 6.1.2
- iOS Runtime: 6.1.1
Describe the bug
When an image asset is missing from https://github.com/NativeScript/nativescript-cli/blob/master/resources/assets/image-definitions.json , the asset generation will fail with an exception, because it will try to scale the image with invalid values for width/height.
To Reproduce
Create a new project that has iOS LaunchImage.launchimage assets, that include Default-2688h.png Try to generate splash screen assets for the project using a 1024x1024 png image.
Generation will fail with :
Invalid settings specified for the resizer., Error: Invalid settings specified for the resizer.
at Resize.initialize (C:\Work\GitHub\kinvey-sidekick\dist\sources\node_modules\nativescript\node_modules\jimp\resize.js:25:16)
at new Resize (C:\Work\GitHub\kinvey-sidekick\dist\sources\node_modules\nativescript\node_modules\jimp\resize.js:17:10)
at Jimp.resize (C:\Work\GitHub\kinvey-sidekick\dist\sources\node_modules\nativescript\node_modules\jimp\index.js:1762:22)
at Jimp.scale (C:\Work\GitHub\kinvey-sidekick\dist\sources\node_modules\nativescript\node_modules\jimp\index.js:1891:10)
at Jimp.scaleToFit (C:\Work\GitHub\kinvey-sidekick\dist\sources\node_modules\nativescript\node_modules\jimp\index.js:1916:10)
at AssetsGenerationService.<anonymous> (C:\Work\GitHub\kinvey-sidekick\dist\sources\node_modules\nativescript\lib\services\assets-generation\assets-generation-service.js:101:26)
Expected behavior
Assets are generated correctly.
Sample project
Additional context
Kinvey Studio Desktop project updated to 6.1.2 exhibits this behavior when generating assets using Sidekick.