I can't reproduce this problem. Please provide a fully working (but small!) code snippet. Then I can see what's wrong there.
Ok, do this:
1. Save the second PNG-Image from my first post named "n_sunny.png" and save it to ram:
2. Copy and execute this code:
Code: Select all
@BRUSH 1,"ram:n_sunny.png", {loadalpha = True}
CopyBrush(1, 2)
trimbrush(2)
ScaleBrush(2,40,#KEEPASPRAT)
SaveBrush(2, "ram:ico.png", IMGFMT_PNG)
It will save a trimmed and resized icon to ico.png, but the borders are not filled with alpha-tranceparency anymore but with garbarge!
Here you can see the result without trim and resize after saving to png:
Alpha is missing (white canvas) and garbarge around the object was added
