phpThumb icon indicating copy to clipboard operation
phpThumb copied to clipboard

thumb create wrong image

Open webdev2009 opened this issue 6 months ago • 0 comments

Hi James; thanks for the for the great script , I had use it some years ego. I downloaded the latest version from https://github.com/JamesHeinrich/phpThumb .

I think the last version of the script has issues.

when i run my php script

require_once('phpthumb.class.php');

$phpThumb = new phpThumb(); $phpThumb->resetObject();

$thumbnail_width = 1000; $thumbnail_hight = 1000;

$phpThumb->setParameter('w', $thumbnail_width); $phpThumb->setParameter('h', $thumbnail_hight); $phpThumb->setParameter('bg', 'FFFFFF'); $phpThumb->setParameter('far', '1'); $phpThumb->setParameter('aoe', '0');

$phpThumb->setParameter('f', 'jpeg');

$phpThumb->setSourceData(file_get_contents('https://lightingzone.xologic.com/vendors/10/large/1049-677.jpg'));

$output_filename = '1049-677_HH5H.jpg';

if ($phpThumb->GenerateThumbnail()) { // this line is VERY important, do not remove it!
    if ($phpThumb->RenderToFile($output_filename)) {
        echo 'Successfully rendered to "'.$output_filename.'"';
    } else {
        echo 'Failed: #1 <pre>'.implode("\n\n", $phpThumb->debugmessages).'</pre>';
    }
} else {
    echo 'Failed: #2 <pre>'.$phpThumb->fatalerror."\n\n".implode("\n\n", $phpThumb->debugmessages).'</pre>';
}

it run good . no errors , how ever the new image is not the same ar original. sometime it looks like a 'Negative Film Picture' or the colors are not the same. . please help. Thanks

1049-677_HH5H 1049-677-1

webdev2009 avatar Aug 17 '24 00:08 webdev2009