Dodaj umjetnicki rub oko fotografije

This commit is contained in:
Senad Uka
2020-06-08 08:26:43 +02:00
parent 2a091f1f8a
commit 1f887bc359
5 changed files with 43 additions and 28 deletions

View File

@@ -27,8 +27,8 @@ foreach ($okvirovi as $okvir) {
$boja = $okvir_image->getColorAt(new Imagine\Image\Point($i, $j));
// provjeri jel transparentna
if($boja->getAlpha() < 90) {
$sirina = $okvir_size->getWidth() - (2 * $i);
$duzina = $okvir_size->getHeight() - (2 * $j);
$sirina = $okvir_size->getWidth() - (2 * ($i + 60));
$duzina = $okvir_size->getHeight() - (2 * ($j + 60));
// vrati velicinu povrsine
// pod pretpostavkom simetricnosti okvira
echo "$okvirid => new Imagine\Image\Box($sirina, $duzina),\n";