Problem mit ImageColorAllocate()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem mit ImageColorAllocate()

    Warum zum Teufel wird das gesamt Image mit der Farbe, die ich in meinem Array stehen habe, gezeichnet?

    PHP Code:
    $temp 0;
    for (
    $piece 0$piece count($this->data); $piece++) {
         
    $start $temp;
         
    $end $this->data[$piece]['Winkel'];
         
    $red substr($this->data[$piece]['Farbe'],0,2);
         
    $green substr($this->data[$piece]['Farbe'],2,2);
         
    $blue substr($this->data[$piece]['Farbe'],4,2);
         
    $c  imagecolorallocate($this->handle"0x".$red"0x".$green"0x".$blue);
         
    imagefilledarc($this->handle$centerX$y$radiusX$radiusY$start$end$cIMG_ARC_PIE);
         
    $temp $end;

    Any idea?! Danke

  • #2
    welche farbe? erste ... letzte ... irgendeine?
    Kissolino.com

    Comment


    • #3
      und was für werte übergibst du an die funktion ... rgb (0-255) ist das
      wohl nicht.
      Kissolino.com

      Comment


      • #4
        Ich möchte z.B. "FF0080" übergeben! Wenn ich das tue, dann wird erstmal das ganze Image in der Farbe gezeichnet... warum?

        Comment


        • #5
          schon mal ins manual geschaut? imagecolorallocate() erwartet rgb-werte,
          d.h. zahlen von 0-255 je farbwert.

          in den UCN steht übrigens auch ne funktion, zum umrechnen
          Kissolino.com

          Comment

          Working...
          X