question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can i keep the quality original image after cropping ?

See original GitHub issue

I have a original image with resolution 96(pixels/inch). After cropping the new picture just have 72 (pixels/inch). Will I be able to use Croppies to crop photos without losing quality? —INFO: Original Image:

  • width x height: 1000x565
  • resolution: 96 Pixels/inch New Image:
  • width x heigth: 330 x205 = viewport
  • resolution: 72 Pixels/inch $uploadCrop.croppie('result', { type: 'canvas', size: 'viewport', quality:1 }).then(function (resp) { if(resp != 'data:,') $('#imgReview').attr("src",resp); });

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
thedustinsmithcommented, Jun 14, 2018

@lminhphuongtma This may be because of how big the size difference is, I’ve heard of other people experiencing this. We might be able to overcome it by incrementally scaling down our canvas. Currently we just go from image dimensions to output dimensions. This SO post could be a starting point: https://stackoverflow.com/questions/28498014/canvas-drawimage-poor-quality

@ilmetu , your post is a little too vague. If that’s really how you’re using the result method, you’re using it wrong. Result takes in an object, not multiple arguments.

vanilla.result({type: 'canvas', size: 'original', format: 'jpeg', quality: 1, circle: false });
0reactions
vini2001commented, Sep 4, 2019

You can change your size from size: 'viewport' to size: 'original' ’ to keep the original image’s quality

Doesn’t that ignore cropping, just keeps an original image?

No, this is about the size, not the proportion or the cropping.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I crop an image without losing quality? - Quora
If you're using Photoshop, you will be able to use Crop tool and then save it in original quality, using Ctrl+Shift+S hotkeys.
Read more >
5 Solutions of How to Resize an Image Without Losing Quality
To use Perfect Resize, first, open the resize image in the application. Then click File, Automate, and select Perfect Resize. This opens the...
Read more >
How do I crop an image without losing quality? - Medium
First, open up Photoshop and select “file” then “place.” Find the picture that you want to crop, then click “okay.” Once this is...
Read more >
How to Resize an Image without Losing Quality - HubSpot Blog
With PicResize, you can easily resize, crop, and edit your images for free. You can decrease the image by pre-set percentages, or by...
Read more >
Crop and resize image online without losing quality
The Easy Image Resizer is a 3 step free online image optimization tool, which allows you to select, crop and resize an image...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found