简体   繁体   中英

how to scale screenshot with out losing quality?

Now I am developing photography app for that I am developing pinch zooming and all apply effects selected image this is my code:

      view = new SandboxView(getApplicationContext(), bmp);

And am adding this view to my frame layout. I am tacking screenshot of this layout for saving purpose,but it will gives based on screen width and screen height but I want with out losing image quality with 500*500 image.

What do you mean exactly when you say "without losing quality"? The only thing you can do is to use a smooth (but slow) scaling method. But when you scale down your image will lose information (that's a mathematical fact) and therefore you will lose quality. A good scaling algorithm will be able to show a picture that still looks nice to a human but there will be a loss.

And when you scale it to a bigger size using whatever scaling algorithm it will either look unsharp or bricky. There you do not lose information but the visual quality is not as you would expect it from a native image of the upscaled size.

So you only can save the original image and scale it to whateve size as soon as somebody wants to see it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM