mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
add background color to subdefs of transparent tiff. (#4376)
bump media-alchemyst and imagine
This commit is contained in:
@@ -89,14 +89,14 @@
|
|||||||
"hoa/dispatcher": "~0.0",
|
"hoa/dispatcher": "~0.0",
|
||||||
"hoa/router": "~2.0",
|
"hoa/router": "~2.0",
|
||||||
"igorw/get-in": "~1.0",
|
"igorw/get-in": "~1.0",
|
||||||
"imagine/imagine": "0.9.0",
|
"imagine/imagine": "^0.10.0",
|
||||||
"jms/serializer": "~0.10",
|
"jms/serializer": "~0.10",
|
||||||
"jms/translation-bundle": "dev-fix-2021-04-19",
|
"jms/translation-bundle": "dev-fix-2021-04-19",
|
||||||
"justinrainbow/json-schema": "2.0.3 as 1.6.1",
|
"justinrainbow/json-schema": "2.0.3 as 1.6.1",
|
||||||
"league/flysystem": "^1.0",
|
"league/flysystem": "^1.0",
|
||||||
"league/flysystem-aws-s3-v2": "^1.0",
|
"league/flysystem-aws-s3-v2": "^1.0",
|
||||||
"league/fractal": "dev-webgalleries#af1acc0275438571bc8c1d08a05a4b5af92c9f97 as 0.13.0",
|
"league/fractal": "dev-webgalleries#af1acc0275438571bc8c1d08a05a4b5af92c9f97 as 0.13.0",
|
||||||
"media-alchemyst/media-alchemyst": "^0.5.7",
|
"media-alchemyst/media-alchemyst": "^4.1.8",
|
||||||
"monolog/monolog": "~1.3",
|
"monolog/monolog": "~1.3",
|
||||||
"mrclay/minify": "~2.1.6",
|
"mrclay/minify": "~2.1.6",
|
||||||
"neutron/process-manager": "2.0.x-dev@dev",
|
"neutron/process-manager": "2.0.x-dev@dev",
|
||||||
|
30
composer.lock
generated
30
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "eadceda3244b4c8a1890620dbbdd655b",
|
"content-hash": "12f2708ee329327ead6eac100cdf302e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "alchemy-fr/tcpdf-clone",
|
"name": "alchemy-fr/tcpdf-clone",
|
||||||
@@ -3706,16 +3706,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "imagine/imagine",
|
"name": "imagine/imagine",
|
||||||
"version": "v0.9.0",
|
"version": "v0.10.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/alchemy-fr/Imagine.git",
|
"url": "https://github.com/alchemy-fr/Imagine.git",
|
||||||
"reference": "94dc35d33d5730d5ad2031c3b17fc9761a29d322"
|
"reference": "352a4bbf72c34f9a4b8990da790d65d82ff9542a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/alchemy-fr/Imagine/zipball/94dc35d33d5730d5ad2031c3b17fc9761a29d322",
|
"url": "https://api.github.com/repos/alchemy-fr/Imagine/zipball/352a4bbf72c34f9a4b8990da790d65d82ff9542a",
|
||||||
"reference": "94dc35d33d5730d5ad2031c3b17fc9761a29d322",
|
"reference": "352a4bbf72c34f9a4b8990da790d65d82ff9542a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3759,9 +3759,9 @@
|
|||||||
"image processing"
|
"image processing"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/alchemy-fr/Imagine/tree/v0.9.0"
|
"source": "https://github.com/alchemy-fr/Imagine/tree/v0.10.0"
|
||||||
},
|
},
|
||||||
"time": "2022-12-01T14:36:05+00:00"
|
"time": "2023-09-14T14:43:24+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ircmaxell/password-compat",
|
"name": "ircmaxell/password-compat",
|
||||||
@@ -4343,22 +4343,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "media-alchemyst/media-alchemyst",
|
"name": "media-alchemyst/media-alchemyst",
|
||||||
"version": "0.5.7",
|
"version": "v4.1.8",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/alchemy-fr/Media-Alchemyst.git",
|
"url": "https://github.com/alchemy-fr/Media-Alchemyst.git",
|
||||||
"reference": "5c7277ccdab03dd34dea13bec4ac1f4e5963ac94"
|
"reference": "9097b7b074afc28aa4d5a83e7a2e59609c59b617"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/alchemy-fr/Media-Alchemyst/zipball/5c7277ccdab03dd34dea13bec4ac1f4e5963ac94",
|
"url": "https://api.github.com/repos/alchemy-fr/Media-Alchemyst/zipball/9097b7b074afc28aa4d5a83e7a2e59609c59b617",
|
||||||
"reference": "5c7277ccdab03dd34dea13bec4ac1f4e5963ac94",
|
"reference": "9097b7b074afc28aa4d5a83e7a2e59609c59b617",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"alchemy/ghostscript": "~0.4.0",
|
"alchemy/ghostscript": "~0.4.0",
|
||||||
"alchemy/mediavorus": "^0.4.4",
|
"alchemy/mediavorus": "^0.4.4",
|
||||||
"imagine/imagine": "^0.9.0",
|
"imagine/imagine": "^0.10.0",
|
||||||
"monolog/monolog": "~1.0",
|
"monolog/monolog": "~1.0",
|
||||||
"neutron/temporary-filesystem": "^2.1.1",
|
"neutron/temporary-filesystem": "^2.1.1",
|
||||||
"php": ">=5.3.3",
|
"php": ">=5.3.3",
|
||||||
@@ -4415,9 +4415,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/alchemy-fr/Media-Alchemyst/issues",
|
"issues": "https://github.com/alchemy-fr/Media-Alchemyst/issues",
|
||||||
"source": "https://github.com/alchemy-fr/Media-Alchemyst/tree/0.5.7"
|
"source": "https://github.com/alchemy-fr/Media-Alchemyst/tree/v4.1.8"
|
||||||
},
|
},
|
||||||
"time": "2023-08-07T12:59:05+00:00"
|
"time": "2023-09-14T15:36:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
@@ -8736,5 +8736,5 @@
|
|||||||
"ext-intl": "*"
|
"ext-intl": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.2.0"
|
"plugin-api-version": "2.3.0"
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,7 @@ class Image extends Provider
|
|||||||
const OPTION_WATERMARK = 'watermark';
|
const OPTION_WATERMARK = 'watermark';
|
||||||
const OPTION_WATERMARKTEXT = 'watermarktext';
|
const OPTION_WATERMARKTEXT = 'watermarktext';
|
||||||
const OPTION_WATERMARKRID = 'watermarkrid';
|
const OPTION_WATERMARKRID = 'watermarkrid';
|
||||||
|
const OPTION_BACKGROUNDCOLOR = 'backgroundcolor';
|
||||||
|
|
||||||
protected $options = [];
|
protected $options = [];
|
||||||
|
|
||||||
@@ -41,6 +42,7 @@ class Image extends Provider
|
|||||||
$this->registerOption(new OptionType\EnumButton($this->translator->trans('Watermark'), self::OPTION_WATERMARK, array('no' => 'no', 'yes' => 'yes'), 'no'));
|
$this->registerOption(new OptionType\EnumButton($this->translator->trans('Watermark'), self::OPTION_WATERMARK, array('no' => 'no', 'yes' => 'yes'), 'no'));
|
||||||
$this->registerOption(new OptionType\Text($this->translator->trans('Watermark text'), self::OPTION_WATERMARKTEXT, ''));
|
$this->registerOption(new OptionType\Text($this->translator->trans('Watermark text'), self::OPTION_WATERMARKTEXT, ''));
|
||||||
$this->registerOption(new OptionType\Text($this->translator->trans('Watermark Record_id'), self::OPTION_WATERMARKRID, ''));
|
$this->registerOption(new OptionType\Text($this->translator->trans('Watermark Record_id'), self::OPTION_WATERMARKRID, ''));
|
||||||
|
$this->registerOption(new OptionType\Text($this->translator->trans('Background Color'), self::OPTION_BACKGROUNDCOLOR, ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType()
|
||||||
@@ -69,6 +71,7 @@ class Image extends Provider
|
|||||||
$this->spec->setStrip($this->getOption(self::OPTION_STRIP)->getValue());
|
$this->spec->setStrip($this->getOption(self::OPTION_STRIP)->getValue());
|
||||||
$this->spec->setFlatten($this->getOption(self::OPTION_FLATTEN)->getValue());
|
$this->spec->setFlatten($this->getOption(self::OPTION_FLATTEN)->getValue());
|
||||||
$this->spec->setResolution($resolution, $resolution);
|
$this->spec->setResolution($resolution, $resolution);
|
||||||
|
$this->spec->setBackgroundColor($this->getOption(self::OPTION_BACKGROUNDCOLOR)->getValue());
|
||||||
|
|
||||||
return $this->spec;
|
return $this->spec;
|
||||||
}
|
}
|
||||||
|
@@ -159,6 +159,9 @@ class databox_subdef
|
|||||||
if ($sd->watermarkrid) {
|
if ($sd->watermarkrid) {
|
||||||
$image->setOptionValue(Image::OPTION_WATERMARKRID, $sd->watermarkrid);
|
$image->setOptionValue(Image::OPTION_WATERMARKRID, $sd->watermarkrid);
|
||||||
}
|
}
|
||||||
|
if ($sd->backgroundcolor) {
|
||||||
|
$image->setOptionValue(Image::OPTION_BACKGROUNDCOLOR, $sd->backgroundcolor);
|
||||||
|
}
|
||||||
return $image;
|
return $image;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user