В скрипра на gallery2 искам да променям снимките , най-простото е да ги блурвам с
$image = new Imagick('test.jpg');
$image->blurImage(5,3);
Пробвах почти всичко с кода, и все дава грешка
кода в скрипта (предполагам това е частта която показва картинката):
GeSHi (PHP):
$phpVm->header('Content-type: ' . $data['mimeType']);
$phpVm->header('Content-Disposition: inline; filename="' . $data['pseudoFileName'] . '"');
$stats = $platform->stat($data['derivativePath']);
$phpVm->header('Last-Modified: ' . GalleryUtilities::getHttpDate($stats[9]));
$phpVm->header('Expires: ' . GalleryUtilities::getHttpDate(2147483647));
$phpVm->header('Cache-Control: private');
/* If the request method is HEAD, don't send back the body */
if ($requestMethod == 'head') {
$phpVm->header('Content-length: 0');
} else {
if ($stats[7] > 0) {
$phpVm->header('Content-length: ' . $stats[7]);
}
/*
* Don't use readfile() because it buffers the entire file in memory. Profiling shows
* that this approach is as efficient as fpassthru() but we get to call
* guaranteeTimeLimit which prevents it from failing on very large files
*/
if ($fd = $platform->fopen($data['derivativePath'], 'rb')) {
while (true) {
$bits = $platform->fread($fd, 65535);
break;
}
$gallery->guaranteeTimeLimit(30);
}
$platform->fclose($fd);
}
}
return null;
}