Jump to content

Recommended Posts

What the following bit of code does is create a thumbnail of 190x190 then it will crop it to 170x150 in proportion

 

Its working great but some of the file sizes are still coming out quite large and eating on load times/Bandwidth

 

Now I should be able to get a size of about 8 - 12kb for each of these images as they are only small but I cant find any code that will compress the file size to a size that I specify.

 

Ive found loads of resizing commands but I cant find a command to specify a size to compress to.

 

Can anyone help me out?

 

exec("convert -size 190x190 $path1 -thumbnail \"170x150^\" -gravity center -extent 170x150  $path2");

Link to comment
https://forums.phpfreaks.com/topic/152002-imagemagick-file-size-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.