$phpThumb->GenerateThumbnail() or $phpThumb->RenderToFile() create a output with header information and the thumbnail. How can i disable it? I need to store the thumbnail without a return of the thumbnail on the harddisk.
Here is my code:
require 'class.phpthumb/phpthumb.class.php';
$phpThumb = new phpThumb();
$phpThumb->config_temp_directory = 'thumbnails_c/';
$phpThumb->config_cache_directory = 'thumbnails_c/';
$phpThumb->config_cache_disable_warning = true;
$phpThumb->cache_maxage = 86400 * 30;
$phpThumb->cache_maxsize = 10 * 1024 * 1024;
$phpThumb->config_cache_force_passthru = false;
$phpThumb->setSourceData($file_data);
$phpThumb->setParameter('w', 45);
$phpThumb->setParameter('h', 32);
$phpThumb->setParameter('zc', 1);
$phpThumb->setParameter('JPEGquality', 100);
$phpThumb->setParameter('f', 'jpeg');
if ($phpThumb->GenerateThumbnail()) {
if ($phpThumb->RenderToFile($path_to_the_new_file)) {
// return the data as an array
return array(
'thumbnail' => $phpThumb->OutputThumbnail(),
'contenttype' => 'image/jpeg',
);
} else {
// error
return false;
}
} else {
// error
return false;
}
greetings!
From the readme: