Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Einstellungen "Maximale GD-Bildbreite" und "Maximale GD-Bildhöhe" #875

Closed
Mynyx opened this issue Oct 27, 2019 · 9 comments
Closed

Einstellungen "Maximale GD-Bildbreite" und "Maximale GD-Bildhöhe" #875

Mynyx opened this issue Oct 27, 2019 · 9 comments

Comments

@Mynyx
Copy link
Contributor

Mynyx commented Oct 27, 2019

In den Einstellungen werden die Felder "Maximale GD-Bildbreite" und "Maximale GD-Bildhöhe" angezeigt.

Soweit dies für mich nachvollziehbar ist, gelten diese Einstellungen jedoch unabhängig von der verwendeten Erweiterung, also nicht nur für GD sondern auch für Imagick und Gmagick.

@ausi
Copy link
Member

ausi commented Oct 27, 2019

Nein, diese Limits gelten nur für GD, nicht für Imagick oder Gmagick, siehe

if ($image->getImagine() instanceof GdImagine) {

@Mynyx
Copy link
Contributor Author

Mynyx commented Oct 27, 2019

Zum Beispiel bei dieser Funktion gelten die Limits aber unabhängig von der verwendeten Bibliothek (Zeile 443)?

protected function getPreviewImage(File $objFile, $strInfo, $strClass='gimage')
{
if (($objFile->isSvgImage || ($objFile->height <= Config::get('gdMaxImgHeight') && $objFile->width <= Config::get('gdMaxImgWidth'))) && $objFile->viewWidth && $objFile->viewHeight)
{
// Inline the image if no preview image will be generated (see #636)
if ($objFile->height !== null && $objFile->height <= 75 && $objFile->width !== null && $objFile->width <= 100)
{
$image = $objFile->dataUri;
}
else
{
$rootDir = System::getContainer()->getParameter('kernel.project_dir');
$image = System::getContainer()->get('contao.image.image_factory')->create($rootDir . '/' . $objFile->path, array(100, 75, ResizeConfiguration::MODE_BOX))->getUrl($rootDir);
}
}
else
{
$image = Image::getPath('placeholder.svg');
}
if (strncmp($image, 'data:', 5) === 0)
{
return '<img src="' . $objFile->dataUri . '" width="' . $objFile->width . '" height="' . $objFile->height . '" alt="" class="' . $strClass . '" title="' . StringUtil::specialchars($strInfo) . '">';
}
return Image::getHtml($image, '', 'class="' . $strClass . '" title="' . StringUtil::specialchars($strInfo) . '"');
}

@leofeyer leofeyer added the bug label Nov 20, 2019
@leofeyer leofeyer added this to the 4.4 milestone Nov 20, 2019
@leofeyer
Copy link
Member

Sieht aus als hätten wir die FileTree-Klasse in contao/core-bundle#826 nicht mit aktualisiert.

@ausi Haben wir das absichtlich nicht gemacht, weil das FileTree-Widget ja deprecated ist (zugunsten des Pickers)?

@ausi
Copy link
Member

ausi commented Nov 21, 2019

Denke nicht, dass wir das absichtlich ausgelassen haben. Wenn es deprecated ist, ist es aber auch nicht nötig es zu aktualisieren IMO, weil es sich ja genau so verhält wie früher.

@leofeyer leofeyer removed this from the 4.4 milestone Nov 26, 2019
@Mynyx
Copy link
Contributor Author

Mynyx commented Nov 26, 2019

Woran ist zu erkennen, dass die FileTree-Klasse deprecated ist?

@leofeyer
Copy link
Member

Ist sie nicht. Hatte sie mit der FileSelector-Klasse verwechselt.

@Mynyx
Copy link
Contributor Author

Mynyx commented Nov 28, 2019

Reopen?

@leofeyer
Copy link
Member

Nein?

Wenn es deprecated ist, ist es aber auch nicht nötig es zu aktualisieren IMO, weil es sich ja genau so verhält wie früher.

@Mynyx
Copy link
Contributor Author

Mynyx commented Dec 4, 2019

Ich verstehe noch nicht, welche Klasse denn jetzt tatsächlich deprecated ist?

Auch in https://github.com/contao/contao/blob/3a70ea01a545d97481c3120fcd847eb878dc1ad7/core-bundle/src/Resources/contao/widgets/FileSelector.php finde ich keine Deprecation?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants