Blend_rect confusion

Godot Version

4.3

Question

I’ve been trying to put two seperate images together through the use of the blend_rect function, however it doesn’t seem to work how it should.

output_image.blend_rect(cost_image, Rect2(64,0,64,128), Vector2i.ZERO)

Whenever I get to this part in my script, it gives me an error.

discard_pile.gd:41 @ add_new_blended_discard_item(): Condition "format != p_src->format" is true.

If you need to see the more of the script I’m happy to show it, but I’m very sure that it has something to do with the last passed argument for blend_rect.

I’d love some help on how the blend_rect function work in general, because I’m lost as for what do to with it.