It seems that ImageMagick ignores the opacity in this line:
<rect id="ext-gen1275" opacity="0" stroke="none" fill="#000" height="100%" width="100%"></rect>
I don't know why this is happing but I will try to figure that out later.