Jump to content

Change quality of image


Hamlets666

Recommended Posts

[code]$neww=40;
$newh=40;
list(, , $type,)=@getimagesize($file);
if ($type==1) {$funci="imagecreatefromgif";} //$funco="imagegif";}
if ($type==2) {$funci="imagecreatefromjpeg";} //$funco="imagejpeg";}
$im1 = @$funci($file);
$im2=@ImageCreate($neww,$newh);
@imagecopyresized($im2, $im1, 0,0,0,0,$neww,$newh, @imagesx($im1), @imagesy($im1));
@header("Content-type: image/png");
@imagepng($im2);[/code]

It`s code which changes image size(pixels), but after this image size(kb) is still too big for me, so are there any ideas, how could I change quality of image?
Link to comment
https://forums.phpfreaks.com/topic/31102-change-quality-of-image/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.