Cropped image dimensions by 30% is like 5% less size on memory
See original GitHub issuenote: I know the main purpose of this, is to smart crop, and this is already great. Still I have another problem
Context
I want to use this amazing library for uploads in browser. I tried to grab code from testsuite and it works fine.
Unfortunately I find in most cases:
Problem
cropped size in px / original size in px
is always way less than
cropped size in mb / original size in mb
I wished smartcrop.js would let the image quality as is, in this case I think size on memory would drop relatively to the cropped size ( logically as images are raw data? ).
Thanks a lot !!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Image Resize, Part 2 Details of Cropping, Resampling, Scaling
4x5 or 8x10 shapes are a little wider and less long, so to speak. Shape and size are different properties. Images are easily...
Read more >Part 2: Scale and Crop Images - SERC - Carleton
Two common solutions are scaling the images down and cropping them to a smaller size. Scaling, Interpolation, and Spatial Calibration. Scaling ...
Read more >How to Resize an Image [from Any Device] - Alphr
1. Open one of your favorite browsers and visit TinyWow.com. 2. Hover your mouse to the Image tab and click Resize Image Dimension...
Read more >Website Image Size Guidelines Cheat Sheet (2023) - Shopify
The main methods include using the right image sizes to begin with (pixels and memory size), and using online image-optimizer tools.
Read more >How to Resize and Reduce Photo File Size on iPhone or iPad ...
Do you want to crop, resize and reduce the photo file size that you took from your iPhone? You can compress the image...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are really comparing apples and oranges here. PNG and JPEG compress data differently. PNG is generally a quite bad choice to compress photographs. Maybe https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types#choosing_an_image_format or https://www.freecodecamp.org/news/best-image-format-for-web-in-2019-jpeg-webp-heic-avif-41ba0c1b2789/ help you understand that a bit better.
But that really doesn’t have anything to do with smartcrop. Smartcrop doesn’t produce jpegs or pngs - it just gives you crops.
Hi @bacloud14,
I’m not sure what you mean. smartcrop.js does not do anything to image quality nor does it do image compression - or anything else - to the image. It just gives you candidate crops. The test suite just draws on <canvas>. It doesn’t do image compression either.
Could you provide a bit more background on what you mean?