aheckmann / gm

GraphicsMagick for node
http://aheckmann.github.com/gm/
6.95k stars 615 forks source link

Instantiate without image #824

Closed reggi closed 3 years ago

reggi commented 3 years ago

Is there a way to call gm / im without a file path or starting -size , I found this example:

    convert -background darkred -fill white -font "OpenSans-Regular.ttf" -pointsize 200 \
    label:"Hello\nWorld" -trim -resize 144x72 -gravity center -extent 480x480

It doesn't seem like I can do this.

reggi commented 3 years ago

Passing "" to the function throws no images defined

reggi commented 3 years ago

I got a workaround:

        const instance = im(0, 0);
        instance.source = undefined

or simply im(undefined)