
- I have canvas with width equal to window width.
- I am drawing an image(1920x1080) to canvas.
- Then I selected area to crop image inside canvas which will be 492x369.
- After cropping image I want to scale that cropped image to 1024x768.
But when I scale that image it loses its quality..
How can I scale image without losing its quality?
The steps which I performed are
- Added Image to Main Canvas
- Selected Crop area on Canvas
- using getImageData() stored croped image data in temp variable.
- created new canvas in memory
- using putImageData() added image data to new in memory canvas
- then getting base64 image data using newcanvas.toDataURL()