Hallo in die Runde,

ich arbeite gerade an einer Bootstrap 3 kompatiblen Version von css_styled_content, 
welche für den Standardfall (Bild mit oder ohne "width" Angabe) bereits bestens 
funktioniert. Jetzt möchte ich mich um Feinheiten kümmern, wie z.B. Images mit 
equalHeight. Dabei ist mir aufgefallen, dass die Originalfunktionen aus 
css_styled_content nicht funktionieren, sobald es sich um ein FAL Image handelt. Es geht 
um folgenden Block:

                if ($equalHeight) {
                        // Initiate gifbuilder object in order to get 
dimensions AND calculate the imageWidth's
                        $gifCreator = 
GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Imaging\\GifBuilder');
                        $gifCreator->init();
                        $relations_cols = array();
                        // contains the individual width of all images after 
scaling to $equalHeight
                        $imgWidths = array();
                        for ($a = 0; $a < $imgCount; $a++) {
                                $imgKey = $a + $imgStart;
                                $imgInfo = 
$gifCreator->getImageDimensions($imgPath . $imgs[$imgKey]);
                                // relationship between the original height and 
the wished height
                                $rel = $imgInfo[1] / $equalHeight;
                                // if relations is zero, then the addition of 
this value is omitted as the image is not expected to display because of some 
error.
                                if ($rel) {
                                        $imgWidths[$a] = $imgInfo[0] / $rel;
                                        // counts the total width of the row 
with the new height taken into consideration.
                                        $relations_cols[(int) floor($a / 
$colCount)] += $imgWidths[$a];
                                }
                        }
                }

Der GifBuilder wird zwar instanziert, aber "$imgInfo = 
$gifCreator->getImageDimensions($imgPath . $imgs[$imgKey])" liefert immer Blödsinn, 
bzw. nichts.

Dies dürfte bereits seit der Einführung von FAL so sein, und fällt wohl nicht 
auf, weil entweder niemand neuere TYPO3 Versionen nutzt, oder keine Images mit 
equalHeight.

Um jetzt meine Frage zu abstrahieren: Ich habe eine FAL uid. Wie komme ich an 
die derzeitigen Abmessungen des Originalbildes? Egal ob mit oder ohne 
GifBuilder (letzteren benötige ich an dieser Stelle nicht wirklich).

Habe die Frage bereits erfolglos im Englischen Forum gestellt.

p.s. Die Tatsache, dass am Ende doch Bilder mit equalHeight erzeugt werden, ist 
derzeit eher Zufall. Der gesamte Code zur Berechnung ist wirkungslos.
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an