Zitat:
Zitat von Bluti
Ja könntest DU dies bitte tun??? Wäre mir und anderen sehr wichtig. Danke 
|
Okay, ist zwar hier ein wenig Off-Topic, aber wenn DU so nett fragst...
Wenn man mit der Original-Bildbearbeitung in xt:Commerce verhindern möchte, dass Bilder grösserskaliert werden als sie eigentlich sind (Produkt-Popup-Bilder behalten ihre Originalgrösse), ändere man folgende Dateien:
/admin/includes/classes/imagemanipulator_gd2.php, ca. Zeile 56
/admin/includes/classes/imagemanipulator_gd1.php, ca. Zeile 50
Das hier:
PHP-Code:
$this->o = ($this->i / $this->m);
$this->p = ($this->j / $this->n);
$this->q = ($this->o > $this->p) ? $this->m : round($this->i / $this->p); // width
$this->r = ($this->o > $this->p) ? round($this->j / $this->o) : $this->n; // height
}
$this->s = ($this->k < 4) ? ($this->k < 3) ? ($this->k < 2) ? ($this->k < 1) ? Null : imagecreatefromgif($this->a) : imagecreatefromjpeg($this->a) : imagecreatefrompng($this->a) : Null;
if($this->s !== Null)
{
$this->t = imagecreatetruecolor($this->q, $this->r); // created thumbnail reference
$this->u = imagecopyresampled($this->t, $this->s, 0, 0, 0, 0, $this->q, $this->r, $this->i, $this->j);
}
}
ersetzen durch:
PHP-Code:
$this->o = ($this->i / $this->m);
$this->p = ($this->j / $this->n);
$this->q = ($this->o > $this->p) ? $this->m : round($this->i / $this->p); // width
$this->r = ($this->o > $this->p) ? round($this->j / $this->o) : $this->n; // height
// -- begin verhindern bildvergroesserung -- //
if( ($this->i < $this->m) && ($this->j < $this->n) ) { // neue Breite und Hoehe groesser als Original
$this->q = $this->i; // width
$this->r = $this->j; // height
}
// -- end verhindern bildvergroesserung -- //
}
$this->s = ($this->k < 4) ? ($this->k < 3) ? ($this->k < 2) ? ($this->k < 1) ? Null : imagecreatefromgif($this->a) : imagecreatefromjpeg($this->a) : imagecreatefrompng($this->a) : Null;
if($this->s !== Null)
{
$this->t = imagecreatetruecolor($this->q, $this->r); // created thumbnail reference
$this->u = imagecopyresampled($this->t, $this->s, 0, 0, 0, 0, $this->q, $this->r, $this->i, $this->j);
}
}
Okay, sind vier Zeilen - thanks to allesmir!
Cheers,
IaN