Commit b6681e0f authored by Laurent's avatar Laurent

article, library and album thumbnails to 500x500px bestfit

parent 0c3dee9d
Pipeline #7999 passed with stage
in 37 minutes and 44 seconds
- ticket #95486 : articles, albums, fiches bibliothèque: les vignettes générées sont maintenant en 500px
\ No newline at end of file
......@@ -739,7 +739,7 @@ class Class_Album extends Storm_Model_Abstract {
try {
$image = new Imagick($this->getVignettePath());
$image->thumbnailImage(300, 0);
$image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false);
if (!$image->writeImage($this->getThumbnailPath())) {
$this->addError('Erreur lors de l\'enregistrement de la vignette');
......
......@@ -318,7 +318,7 @@ class Class_AlbumRessource extends Storm_Model_Abstract {
try {
$image = $this->getImage();
$image->thumbnailImage(160, 0);
$image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false);
if (!$image->writeImage($this->getThumbnailPath())) {
$this->addError($this->_('Erreur lors de l\'enregistrement de la vignette'));
......
......@@ -845,7 +845,7 @@ class Class_Bib extends Storm_Model_Abstract {
try {
$image = self::getImageFactory($this->getBasePath() . $this->getFile());
$image->thumbnailImage(160, 0);
$image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false);
if (!$image->writeImage($this->getThumbnailPath())) {
$this->addError('Erreur lors de l\'enregistrement de la vignette');
......
......@@ -32,7 +32,7 @@ class Class_Notice_Thumbnail_ProviderLocal
$filename = $this->_record->getClefAlpha().'.jpg';
$image->thumbnailImage(160, 220, true, true);
$image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false);
try {
$image->writeImage($this->_getPath($filename));
......
......@@ -138,6 +138,7 @@ class Bokeh_Engine {
defineConstant('MEMCACHED_PORT', '11211');
defineConstant('IMAGE_MAGICK_PATH', 'convert');
defineConstant('THUMBNAIL_FIT_WIDTH_HEIGHT', '500');
defineConstant('PATCH_PATH', ROOT_PATH . '/cosmogramme/sql/patch/');
return $this;
......
......@@ -932,7 +932,7 @@ class CmsControllerArticleConcertEditActionPostTest extends CmsControllerWithPer
$image = $this->mock()
->whenCalled('thumbnailImage')
->with(160, 220, true, true)
->with(500, 500, true, false)
->answers(null)
->whenCalled('writeImage')
......
......@@ -1105,7 +1105,7 @@ class ArticleIndexAllTest extends ModelTestCase {
$image = $this->mock()
->whenCalled('thumbnailImage')
->with(160, 220, true, true)
->with(500, 500, true, false)
->answers(null)
->whenCalled('writeImage')
......
......@@ -344,7 +344,7 @@ class NoticeVignetteTest extends ModelTestCase {
->beStrict());
$image = $this->mock()
->whenCalled('thumbnailImage')
->with(160, 220, true, true)
->with(500, 500, true, false)
->answers(null)
->whenCalled('writeImage')
......
......@@ -142,7 +142,7 @@ class Class_WebService_VignetteWrongFrbrTest extends ModelTestCase {
$image = $this->mock()
->whenCalled('thumbnailImage')
->with(160, 220, true, true)
->with(500, 500, true, false)
->answers(null)
->whenCalled('writeImage')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment