Skip to content

Wrong $fillColor Inside function resizeInsideRect() #22

Description

@applibs

This function has param $fillColor = null abn when is not passed, image is filled black color! Who said that background color must be black and not white or transparent.
I expect transparent color and other colors only when is passed.

Something like this:

if ($fillColor) {
                if (is_numeric($fillColor)) {
                    $fillColor = $this->getColorRGB($fillColor);
                }
            } else {
                // $fillColor = $this->getColorRGB($this->getColorAt(0, 0));
            }
            
            $rect = WideImage::createTrueColorImage($width, $height);
            if($fillColor) {
                $rect->fill(0, 0, $rect->allocateColor($fillColor));
            } else {
                $rect->fill(0, 0, $rect->setTransparentColor(0));
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions