Skip to content

Does not overlay text on image with latest GraphicsMagick versions #877

@grisov

Description

@grisov

To overlay text on image I use the following code:

  import * as gmagick from "gm";

  const gm = gmagick.subClass({ imageMagick: false });

  gm(200, 200, "#ffaca2")
    .region(200, 200, 0, 0)
    .gravity("Center")
    .font("../fonts/OpenSans-Regular2.ttf", 22)
    .fill("#000000")
    .drawText(0, 0, "AB")
    .setFormat("png")
    .quality(4);

Operating system: Alpine Linux 3.21

  apk add libwebp libwebp-tools freetype graphicsmagick

gm==1.25.0

The text is missing on image if installed GraphicsMagick == 1.3.43-1.3.45.

With older versions of GraphicsMagick up to 1.3.42, this code works correctly.

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