#39741·n8n

Edit Image → Draw often succeeds with no visible drawing

Author: snowboarder04Created Sep 28, 2026Updated Sep 28, 2026
Labelsteam:nodesstatus:in-linearstatus:team-assigned

Bug Description

Three related defects:

  1. Colour picker / default is unusable with GraphicsMagick

    • Draw Colour is type: color with showAlpha: true.
    • Default is #ff000000 (CSS #RRGGBBAA = fully transparent red).
    • The picker stores 8-digit hex (e.g. picking opaque red stores #ff0000ff).
    • Draw only does fill(color) then drawRectangle / drawLine / drawCircle. It never sets a stroke.
    • Alpine GraphicsMagick in the official Docker image often rejects 8-digit hex (or treats #ff000000 as invisible). Invalid/transparent fill + no stroke = unchanged image, no error.
  2. No hollow rectangle / Line is effectively broken

    • There is no stroke width. Rectangle is always a filled slab.
    • Line uses GM stroke, which n8n never sets, so Line usually paints nothing.
    • Workaround for an outline: Multi Step + four thin filled Rectangles.
  3. Draw still does not appear on PNG inputs (JPEG does)

    • After forcing Colour to an expression {{ 'red' }} (named / 6-digit, no alpha), Draw does paint on JPEG inputs.
    • The same Draw/Multi Step on a PNG input still produces no overlay. Execution succeeds; output looks identical to input.
    • This is separate from (1): the colour workaround is not enough for PNG.

Relevant code: packages/nodes-base/nodes/EditImage/EditImage.node.ts

  • Draw colour default #ff000000, showAlpha: true
  • Draw path: fill(operationData.color) then drawRectangle / drawLine / drawCircle only

To Reproduce

A – colour (JPEG is enough)

  1. HTTP Request or Read/Write Files: load a JPEG into binary data.
  2. Edit Image → Draw → Rectangle.
  3. Colour: leave picker default, or pick red (field shows #ff0000ff).
  4. Start 0,0 End 800,800, Corner Radius 0.
  5. Execute.

Actual: no rectangle.
Workaround that proves GM works: Colour as expression {{ 'red' }} or {{ '#FF0000' }} → filled red block appears on JPEG.

B – PNG

  1. Same Draw that works on JPEG ({{ 'red' }}, 0,0–800,800).
  2. Feed a PNG in data instead of JPEG.
  3. Execute.

Actual: still no drawing on PNG.

C – Line

  1. Draw → Line, Colour {{ 'red' }}, 0,0–800,800.
  2. Actual: usually nothing (no stroke).

Expected behavior

  • Default Draw colour should be opaque and a format GM accepts (red or #FF0000).
  • Picker should not send #RRGGBBAA unless it is converted (e.g. rgba() / 6-digit + opacity).
  • Invalid fill should error, not silently no-op.
  • Line should set stroke (and optionally fill none).
  • Draw should work on PNG as well as JPEG.
  • Docs should say Rectangle is filled, not an outline.

Suggested fix

  • Change Draw default from #ff000000 to #ff0000 / red; disable alpha on Draw, or map #RRGGBBAA → GM-safe colour.
  • stroke(color) + strokeWidth(...) for Line (and optional outline Rectangle).
  • Investigate PNG: background('transparent') + alpha JPEG vs PNG; ensure fill is applied in a drawable colourspace.

Debug Info

  • n8n version: 2.40.7
  • Running n8n via: Docker (n8nio/n8n:stable)
  • Operating system: Linux (self-hosted)
  • Database: SQLite
  • Execution mode: regular (N8N_RUNNERS_ENABLED=true)
  • Node: Edit Image (n8n-nodes-base.editImage)
  • GraphicsMagick: bundled in official Alpine image
  • Confirmed GM works: Get Information returns geometry; Draw with {{ 'red' }} on JPEG paints; Border (6-digit, no alpha) also works.

Debug info

core

  • n8nVersion: 2.40.7
  • platform: docker (self-hosted)
  • nodeJsVersion: 26.7.0
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId:

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10.15; rv:156.0) gecko/20100101 firefox/156.0
  • isTouchDevice: false

cluster

  • instanceCount: 1
  • versions: 2.40.7
  • instances:
    • instanceKey: , hostId: , instanceType: main, instanceRole: leader, version: 2.40.7
  • checks:
    • check: hostid-clash, status: succeeded, warnings: -
    • check: lifecycle, status: succeeded, warnings: -
    • check: split-brain, status: succeeded, warnings: -
    • check: version-mismatch, status: succeeded, warnings: -

Generated at: 2026-09-28T10:36:38.288Z

Operating System

Docker n8nio/n8n:stable on Fedora 44

n8n Version

2.40.7

Node.js Version

Debug info

core

  • n8nVersion: 2.40.7
  • platform: docker (self-hosted)
  • nodeJsVersion: 26.7.0
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: e68ac30a-dc57-41dc-ab2b-47578a5e6656

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10.15; rv:156.0) gecko/20100101 firefox/156.0
  • isTouchDevice: false

cluster

  • instanceCount: 1
  • versions: 2.40.7
  • instances:
    • instanceKey: 7347a71b-3e86-4d8b-a5c2-db6040ab1886, hostId: main-5a9b1c819cf6, instanceType: main, instanceRole: leader, version: 2.40.7
  • checks:
    • check: hostid-clash, status: succeeded, warnings: -
    • check: lifecycle, status: succeeded, warnings: -
    • check: split-brain, status: succeeded, warnings: -
    • check: version-mismatch, status: succeeded, warnings: -

Generated at: 2026-09-28T10:36:38.288Z

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted