开发者

Resize image with limit in linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
开发者_如何转开发

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I want to resize image in linux and want this image to be convert to below the threshold value (certain limit).

eg. Threshold Limit: 500Kb, Image dimension: 100x100

Output image will be in 100x100 dimension and size below 500Kb or exactly 500kb (Not more than 500Kb)

Appreciate your help.


One possible solution would be to use Imagemagick inside a shell script and do the following:

  1. Scale down your image to 100x100 pixels.
  2. Check if the files size is <= 500kb
  3. If yes: youre done.
  4. If not: user imagemagicks "convert" to convert your image to a lower quality and then go back to step 2.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜