enchev / nativescript-screenshot

Save NativeScript view as image
Apache License 2.0
14 stars 8 forks source link

Over scaled return image #6

Closed mudlabs closed 5 years ago

mudlabs commented 6 years ago

The actual Image that's being returned from screenshot.getImage(view) is way to big.

If I go into nativescript-screenshot and set the last parameter (scale) of UIGraphicsBeginImageContextWithOptions to 1 the dimensions are correct. But the image is heavily pixilated.

attempting the apply width or height to the image within the rendered layout just chops the image.

mudlabs commented 5 years ago

Problem comes from passing in a view that does not occupy the full screen. Basically always pass the page (or top level container) and it's all good.