Skip to content

thumb create wrong image #225

@webdev2009

Description

@webdev2009

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions