Öffne include/picmgmt.inc.php, finde
} elseif (is_image($filename)) {
und
clearstatcache();
und ersetze alles, was sich dazwischen befindet durch
$imagesize = cpg_getimagesize($image);
// resize picture if it's bigger than the max width or height for uploaded pictures
if (max($imagesize[0], $imagesize[1]) > $CONFIG['max_upl_width_height']) {
if ((USER_IS_ADMIN && $CONFIG['auto_resize'] == 1) || (!USER_IS_ADMIN && $CONFIG['auto_resize'] > 0)) {
resize_image($image, $image, $CONFIG['max_upl_width_height'], $CONFIG['thumb_method'], 'any', 'false'); // hard-coded 'any' according to configuration string 'Max width or height for uploaded pictures'
$imagesize = cpg_getimagesize($image);
} else {
@unlink($uploaded_pic);
$msg = sprintf($lang_db_input_php['err_fsize_too_large'], $CONFIG['max_upl_width_height'], $CONFIG['max_upl_width_height']);
return array('error' => $msg, 'halt_upload' => 1);
}
}
// create backup of full sized picture if watermark is enabled for full sized pictures
if (!file_exists($orig) && $CONFIG['enable_watermark'] == '1' && ($CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'original')) {
if (!copy($image, $orig)) {
return false;
} else {
$work_image = $orig;
}
}
if ($CONFIG['read_iptc_data']) {
// read IPTC data
$iptc = get_IPTC($image);
if (is_array($iptc) && !$title && !$caption && !$keywords) { //if any of those 3 are filled out we don't want to override them, they may be blank on purpose.
$title = (isset($iptc['Headline'])) ? $iptc['Headline'] : $title;
$caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
$keywords = (isset($iptc['Keywords'])) ? implode($CONFIG['keyword_separator'], $iptc['Keywords']) : $keywords;
}
}
if (!file_exists($thumb)) {
// create thumbnail
if (($result = resize_image($work_image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], "false", 1)) !== true) {
return $result;
}
}
if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate'] && !file_exists($normal)) {
// create intermediate sized picture
$resize_method = $CONFIG['picture_use'] == "thumb" ? ($CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use']) : $CONFIG['picture_use'];
if ($aid == 31) {
$watermark = 'false';
} else {
$watermark = ($CONFIG['enable_watermark'] == '1' && ($CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'resized')) ? 'true' : 'false';
}
if (($result = resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method, $watermark)) !== true) {
return $result;
}
}
// watermark full sized picture
if ($aid != 31) {
if ($CONFIG['enable_watermark'] == '1' && ($CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'original')) {
if (($result = resize_image($work_image, $image, $CONFIG['max_upl_width_height'], $CONFIG['thumb_method'], 'any', 'true')) !== true) {
return $result;
}
}
}
} else {
$imagesize[0] = $iwidth;
$imagesize[1] = $iheight;
}