das klingt gut. ich kann diese stelle jedoch in meiner admin-functions.php jedoch nicht richtig ausmachen... Folgender Code sieht so ähnlich aus
admin-functions.php (ab Zeile 777)
$thumbnail = imagecreatetruecolor($image_new_width, $image_new_height);
@ imagecopyresampled($thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $image_attr[0], $image_attr[1]);
// If no filters change the filename, we'll do a default transformation.
if ( basename($file) == $thumb = apply_filters('thumbnail_filename', basename($file)) )
$thumb = preg_replace('!(\.[^.]+)?$!', __('.thumbnail').'$1', basename($file), 1);
$thumbpath = str_replace(basename($file), $thumb, $file);
// move the thumbnail to it's final destination
if ($type[2] == 1) {
if (!imagegif($thumbnail, $thumbpath)) {
$error = __("Thumbnail path invalid");
}
}
elseif ($type[2] == 2) {
if (!imagejpeg($thumbnail, $thumbpath)) {
$error = __("Thumbnail path invalid");
}
}
elseif ($type[2] == 3) {
if (!imagepng($thumbnail, $thumbpath)) {
$error = __("Thumbnail path invalid");
}
}
Alles anzeigen
bin mir nicht sicher wo ich den dritten Parameter einbringen kann. Liegt es an der Version (2.0.7)?