Add space around a loaded image

I have loaded a PNG image of a lightbulb. The image contents fill the rectangle to the edges.
Now I’m adding a ‘bloom’ filter to add a glow but the bloom is cropped to the size of the rectangle.
Is there a way to add space around my image before I filter it?
Maybe using a canvas texture?

With purely visual questions like these, it would be useful to provide a screenshot of what is happening as well as what you’d like to happen.

clearly you can see the cropping of the bloom effect.
this is because the icon fills the png to the edges.
if i add space to the sides of the png it works and the bloom looks as it should.
but can i add space in code somehow?
clippedIconBloom ?

That invisible padding needs to be included already with the image. I’m guessing when Solar2D loads the image, it sets the “texture size” that you apply the bloom filter to. The bloom is bound to the texture itself and the texture size won’t be dynamically adjusted to account for changes made by the shader.

can a canvas be used here?
I mean you can ‘draw’ a circle to a canvas.
can you ‘draw’ my png image to a larger canvas then apply the bloom to the canvas?

this is interesting:

Yes, you could use canvas with that, however, I’d recommend that unless it’s something that you must do via code, that you’d instead do it in your image editing software of choice.

Unfortunately I could not get it to work with a canvas.
Could someone please attach some code?
Many thanks :slight_smile: