Skip to content

drawLine() ignores line width with GD <= 2.1.0 #1304

@anhao

Description

@anhao

Describe the bug
I am using Image v3.4.0 , I used drawLine to draw lines, it has always been 1px

The same result was obtained using the DrawPixelLine of #1298

Code Example

$image->drawLine(function (LineFactory $line)use($listHeight) {
    $line->from(980, 20); // starting point of line
    $line->to(980, $listHeight-20); // ending point
    $line->color('#723e4b'); // color of line
    $line->width(5); // line width in pixels
});

Images
test

Environment (please complete the following information):

  • PHP Version: PHP 8.1.25 (cli)
  • OS: windows
  • Intervention Image Version: v3.4.0
  • GD or Imagick: GD
gd

GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.9.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.6.34
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30512
XBM Support => enabled
WebP Support => enabled
BMP Support => enabled
AVIF Support => enabled
TGA Read Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1
···

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions