Development

#10000 (sfImageTransformPlugin: ImageMagick 'text' doesn't honor color setting)

You must first sign up to be able to contribute.

Ticket #10000 (new defect)

Opened 1 year ago

sfImageTransformPlugin: ImageMagick 'text' doesn't honor color setting

Reported by: cheoppy Assigned to: Stuart Lowes
Priority: minor Milestone: plugins
Component: plugins Version: 1.4.1
Keywords: Cc:
Qualification: Unreviewed

Description

Using 'text' transformation with ImageMagick? doesn't set the color of the written text.

The following patch resolved this issue:

*** sfImageTextImageMagick.class.php	2012-02-16 23:49:04.447653096 +0100
--- sfImageTextImageMagick.class.php.new	2012-02-16 23:49:00.827727135 +0100
***************
*** 232,237 ****
--- 232,238 ----
      $draw = new ImagickDraw();
      $draw->setFont($this->font_dir . '/' . $this->font . '.ttf');
      $draw->setFontSize($this->size);
+     $draw->setFillColor(new ImagickPixel($this->getColor()));
  
      $resource->annotateImage($draw, $this->x, $this->y, $this->angle, $this->text);