Jump to content

Resize images finally quality !


Xavierator

Recommended Posts

Hi, I just see a few topics of resize images.

 

Like me I see that you use imagecopyresampled() function

 

I can see that the result is very different than using Photoshop for example, worst quality image with this PHP Code using 100% of jpeg quality:

 

$image_m = new SimpleImage();

$image_m->load( $path.$elemento );

$image = new SimpleImage();

$image->load( $path.$bigImage.'.jpg' );

$image->resize(round( $image_m->getWidth() * 1.07 ), round( $image_m->getHeight() * 1.07 ) );

$image->save($path.$elemento);

 

function resize($width,$height)

{

$new_image = imagecreatetruecolor($width, $height);

imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());

$this->image = $new_image;

}

 

, have you the same quality problem ?

 

Thanks, Xavi

Link to comment
https://forums.phpfreaks.com/topic/274148-resize-images-finally-quality/
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.