Hallo ich benutze 4.6.8. Das Modul Illustration konvertiert mir ein gif in ein Jpg. Upload per ftp oder Dateimanager als gif. In der Konfiguration wird auch das gif korrekt angezeigt, nur im Frontend ist es ein jpg aus dem Cache mit schwarzen statt transparenten Flächen (dies es ja nicht anzeigen kann). Habe das gleiche mit nem png probiert, derselbe Fehler.
Woran liegt das?
Modul Illustration aus gif wird jpg
Das Modul Illustration führt ein Resize durch - das in der Größe erstellte Bild wird immer als .jpg gespeichert.
Du kannst im Forum mal suchen, es müsste eine Änderung des Moduls geben, so dass nur Resized wird, wenn das Bild die angegebenen Grenzen überschreitet (oder Du nimmst den Code zum Resize aus dem Modul).
Gruß
HerrB
Du kannst im Forum mal suchen, es müsste eine Änderung des Moduls geben, so dass nur Resized wird, wenn das Bild die angegebenen Grenzen überschreitet (oder Du nimmst den Code zum Resize aus dem Modul).
Gruß
HerrB
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Hallo HerrB, ich hatte diesen Part:<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Illustration
* Author(s) : Andreas Lindner, 4fb
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 12.08.2005
************************************************/
#Selected img directory
$cms_dirname = "CMS_VALUE[1]";
#Selected img
$cms_filename = "CMS_VALUE[2]";
#alt tag
$cms_alt_tag = "CMS_VALUE[3]";
#title tag
$cms_title_tag = "CMS_VALUE[4]";
#Default settings
$img_width = 496;
$img_height = 496;
$defaultImage = 'bilder/trans.gif';
$htmlpath = $cfgClient[$client]['path']['htmlpath'];
$frontendpath = $cfgClient[$client]['path']['frontend'];
$img_path = $htmlpath.$cfgClient[$client]['upload'].$defaultImage;
$img_path_fs = $frontendpath.$cfgClient[$client]['upload'].$defaultImage;
#Check configured images
if ($cms_dirname != '0' AND $cms_filename != '0' AND strlen($cms_dirname) > 0 AND strlen($cms_filename) > 0) {
$img_path = $htmlpath.$cfgClient[$client]['upload'].$cms_dirname.$cms_filename;
$img_path_fs = $frontendpath.$cfgClient[$client]['upload'].$cms_dirname.$cms_filename;
$img_split = preg_split("/\./", $cms_filename);
$count = count($img_split);
$type = $img_split[$count -1];
if (!file_exists($img_path_fs)) {
$img_path = $htmlpath.$cfgClient[$client]['upload'].$defaultImage;
$img_path_fs = $frontendpath.$cfgClient[$client]['upload'].$defaultImage;
}
}
#Scale image
$image = capiImgScale($img_path_fs, $img_width, $img_height, false, false, 10, false);
#Get dimensions of scaled image
list ($width, $height, $type, $attr) = getimagesize($image);
#Output image tag
echo '<img src="'.$image.'" width="'.$width.'" height="'.$height.'" alt="'.$cms_alt_tag.'" title="'.$cms_title_tag.'"/>';
?>
schon enfernt, da bekomme ich nur Fehlermeldungen#Get dimensions of scaled image
list ($width, $height, $type, $attr) = getimagesize($image);
Contenido 4.6.8 - Firefox
Zum einen hatte ich erwähnt, dass es da im Forum was geben sollte (hast Du gesucht)? Zum anderen: Bitte mit dem Code auseinandersetzen ("Kann kein PHP!" -> "Eine gute Gelegenheit, es zu lernen...").
getimagesize ermittelt die Bilddimensionen, wenn Du das weglässt, ist es klar, dass es Fehler hagelt. Stattdessen muss das capiImgScale weggelassen werden und stattdessen der Serverpfad für getimagesize und der Webpfad für das img-Tag gesetzt werden:
Ungetestet.
Gruß
HerrB
Code: Alles auswählen
#Scale image
$image = capiImgScale($img_path_fs, $img_width, $img_height, false, false, 10, false);
#Get dimensions of scaled image
list ($width, $height, $type, $attr) = getimagesize($image);
#Output image tag
echo '<img src="'.$image.'" width="'.$width.'" height="'.$height.'" alt="'.$cms_alt_tag.'" title="'.$cms_title_tag.'"/>';
Code: Alles auswählen
#Scale image
// $image = capiImgScale($img_path_fs, $img_width, $img_height, false, false, 10, false);
#Get dimensions of scaled image
list ($width, $height, $type, $attr) = getimagesize($img_path_fs);
#Output image tag
echo '<img src="'.$img_path.'" width="'.$width.'" height="'.$height.'" alt="'.$cms_alt_tag.'" title="'.$cms_title_tag.'"/>';
Gruß
HerrB
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net