jarun / imgp

:camera_flash: Fast batch image resizer and rotator
GNU General Public License v3.0
1.03k stars 50 forks source link

Process images less than 350KB #32

Closed Zhangxuri closed 5 years ago

Zhangxuri commented 5 years ago

how to resize an image to at most 350kb?

jarun commented 5 years ago

That option is not available today (max size). What's your use case?

Zhangxuri commented 5 years ago

That option is not available today (max size). What's your use case?

I use some algorithms to do image processing, and my GPU is 1080Ti. With my algorithms, if the size of the image exceeds 1MB(may be 350KB), an Out of Memory error will be thrown. So I just want to know how to let all my pictures less than 1MB.

jarun commented 5 years ago

Please raise a PR following the current implementation of min size.

Zhangxuri commented 5 years ago

Please raise a PR following the current implementation of min size.

Sorry, I understand this ‘-s’ parameter incorrectly. I thought it would handle all the images, large image compression, small image enlargement, so that all image sizes are larger than a '-s' value.Now I need to compress all the images larger than 1MB to less than 1MB. Is there any way to achieve this?  

jarun commented 5 years ago

Use -s 1048576.