Skip to content
This repository was archived by the owner on Aug 1, 2020. It is now read-only.
This repository was archived by the owner on Aug 1, 2020. It is now read-only.

Bottom or right 1px black line #918

Closed
@samuel-clara

Description

@samuel-clara

Using the fixed crop box some images are uploaded with 1px of the fillcolor on the bottom or on the right. Maybe it's a problem with the approximation of subpixels. I'm uploading images using HTMLCanvasElement.toBlob() and then php.

This is the code I'm using:

var image_cropper = croppedImg.cropper({
            viewMode: 1,
            dragMode: 'move',
            autoCropArea: 0.85,
            wheelZoomRatio: 0.02,
            restore: false,
            guides: false,
            highlight: false,
            cropBoxMovable: false,
            cropBoxResizable: false,
            aspectRatio: aspectRatio,
            zoom: function (e) { // function to allow maxZoom to max size
                if (e.ratio > 1) {
                    e.preventDefault();
                    $(this).cropper('zoomTo', 1);
                }
            }
 });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions