How to create a transparent background png with Erlang Graphical Drawer?

I am trying to to use EGD to draw a png with information that come from harvest machine logs.

I use to create a png image with a given width an heigth and then
draw color filled circles of specific radius that come from a list
of points, then Leaflet consume the image.

The problem is that the image need to have a transparent background.

def  create_image(w,h,stamps) do

    im = :egd.create(w,h)
    transparent = :egd.color({255,255,255,255})
    :egd.rectangle(im, {1,1}, {w,h}, transparent)
    green = :egd.color({0,255,0,255})
    rad=2

    for %{"x"=>x,"y"=>y,"value"=>value} <- stamps do
      
      :egd.filledEllipse(im, {x-rad,y-rad},{x+rad,y+rad},green)

    end

    :egd.render( im, :png, [{ :render_engine, :alpha}] )
    
end 

I have made many tries:

  1. Just draw the dots without any specification about the background.
    And without the :egd.rectangle(im, {1,1}, {w,h}, transparent)
    and get a white background.

  2. Drawing a rectangle with a white color:

  transparent = :egd.color({255,255,255,255})
   :egd.rectangle(im, {1,1}, {w,h}, transparent)
  1. The same color with another alpha
  transparent = :egd.color({255,255,255,0})
   :egd.rectangle(im, {1,1}, {w,h}, transparent)

Also there isn’t any change if the render function is called

 :egd.render( im, :png, [ render_engine: :alpha] )
 instead of 
 :egd.render( im, :png, [{ :render_engine, :alpha}] )

In both case the alpha of the colors is applied correctly.

Anybody know what supposed to do, the documentation is pretty short,
or any can recommend a only erlang or elixir librarie (no binding to ImageMagic), for this task

https://www.erlang.org/docs/17/apps/percept/egd_ug

Greetings