fengyuanchen / cropper

⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
MIT License
7.75k stars 1.74k forks source link

Image colors change in cropper window #964

Closed jonasva closed 6 years ago

jonasva commented 6 years ago

When viewing an image in cropper, I've noticed the colors are a bit different from the original.

See image below of the difference (left is the original, right is cropperJS):

screen shot 2018-02-02 at 15 51 19

After saving and uploading to the server, the color difference is also there (left original, right manipulated with cropperJS): screen shot 2018-02-02 at 16 05 25

My HTML:

<div class="js-cropper-wrapper cropper__wrap">
    <img class="js-image-preview cropper__img" src="/images/huge-2.jpg">
</div>

JS:

$('.js-image-preview').cropper();

Cropper version: cropper@3.1.4 Browser: Chrome 63 OS: OSX 10.13

Source image file

fengyuanchen commented 6 years ago

You are viewing the image in two different applications which have different image rendering engines. Just open your original image in chrome tab to compare!!!

jonasva commented 6 years ago

Yeah I kinda figured you would say something like that. That's why I included the second image as well (both in the same application)

fengyuanchen commented 6 years ago

I mean the browser will change the color. Open your original image in a browser tab and compare to cropping image.

jonasva commented 6 years ago

Oh I see what you mean. Ok, thx for elaborating.