Add double-density support to photo thumbnails #28

Sloučený
Aaron sloučil 13 commity z větve improve_thumbs do větve master před 2022-11-27 14:38:22 +01:00
Zobrazuji pouze změny commitu b5edf09a69 - Zobrazit všechny commity

Zobrazit soubor

@ -74,7 +74,11 @@ class Image extends Asset
{
$thumbnail = new Thumbnail($this);
$image_urls[1] = $this->getThumbnailUrl($width, $height, false);
$image_urls[2] = $this->getThumbnailUrl($width * 2, $height * 2, false);
// Can we afford to generate double-density thumbnails as well?
if ((!isset($width) || $this->image_width >= $width * 2) &&
(!isset($height) || $this->image_height >= $height * 2))
$image_urls[2] = $this->getThumbnailUrl($width * 2, $height * 2, false);
}
else
$image_urls[1] = $this->getUrl();