#1 (permalink)  
Alt 19.10.2007, 18:03
Neuer Benutzer
 
Registriert seit: 26.04.2006
Beiträge: 4
Standard Bilder mit echtem transparenten Wasserzeichen

Wir verwenden als Wasserzeichen ("merge") für unsere Shop-Bilder 24-Bit PNG-Dateien die einen echten Alpha-Kanal enthalten. Die aktuelle Shopsoftware ignoriert das.

Wer das beheben will, kann in v3.0.4 SP2.1 in admin/include/classes/image_manipulator_GD2.php ab Zeile 183 folgendes einfügen:
Code:
        if ($this->md[2] == 3) {
            imageAlphaBlending($this->mm, false);
            imageSaveAlpha($this->mm, true);
            @imagecopy($this->t, $this->mm, $this->xx, $this->yy, 0, 0, $this->mw, $this->mh);
        }
        else {
            for($this->ypo = 0; $this->ypo < $this->mh; $this->ypo++)
                {
                for($this->xpo = 0; $this->xpo < $this->mw; $this->xpo++)
                    {
                    $this->indx_ref = @imagecolorat($this->mm, $this->xpo, $this->ypo);
                    $this->indx_rgb = @imagecolorsforindex($this->mm, $this->indx_ref);
                    if(($this->indx_rgb['red'] == $this->tr) && ($this->indx_rgb['green'] == $this->tg) && ($this->indx_rgb['blue'] == $this->tb))
                        {
                        // transparent colour, so ignore merging this pixel
                        }
                    else
                        {
                        @imagecopymerge($this->t, $this->mm, $this->xx+$this->xpo, $this->yy+$this->ypo, $this->xpo, $this->ypo, 1, 1, $this->mo);
                        }
                    }
                }
        }
Vorher stand da nur:
Code:
            for($this->ypo = 0; $this->ypo < $this->mh; $this->ypo++)
                {
                for($this->xpo = 0; $this->xpo < $this->mw; $this->xpo++)
                    {
                    $this->indx_ref = @imagecolorat($this->mm, $this->xpo, $this->ypo);
                    $this->indx_rgb = @imagecolorsforindex($this->mm, $this->indx_ref);
                    if(($this->indx_rgb['red'] == $this->tr) && ($this->indx_rgb['green'] == $this->tg) && ($this->indx_rgb['blue'] == $this->tb))
                        {
                        // transparent colour, so ignore merging this pixel
                        }
                    else
                        {
                        @imagecopymerge($this->t, $this->mm, $this->xx+$this->xpo, $this->yy+$this->ypo, $this->xpo, $this->ypo, 1, 1, $this->mo);
                        }
                    }
                }
Setzt Nutzung von GD2 vorraus.

Viel Spaß - vielleicht findet es ja seinen Weg in ein Release.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
bilder, echtem, transparenten, wasserzeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Bilder Artikelbilder kmarcus Installation und Konfiguration 0 21.08.2004 10:39
Cao -> Xt-c Bilder Upload JKFrost xt:Commerce Schnittstellen ERP Systeme 5 26.07.2004 16:07


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:42 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand