Loss of color quality when saving canvas into an image in javascript -


i implementing cropping tool images (using jcrop library) gives possibility upload images, choose cropping area, , save image disk clicking in button.

all logic works, except image saved disk looses it's colors tone , and few details well.

enter image description here

cropped 1 on left, original on right

my javascript of canvas drowing following:

crop_canvas = document.createelement('canvas'); crop_canvas.width = width; crop_canvas.height = height;  crop_2d = crop_canvas.getcontext('2d'); crop_2d.imagesmoothingenabled = false; crop_2d.drawimage(image_target, left, top, parseint(width), parseint(height), 0, 0, parseint(width), parseint(height));  this.href = crop_canvas.todataurl('image/png'); 

i'm missing ? see wrong ?

thanks!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -