Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
BLIT image function fails in Add-on Manager #2058
I have been experimenting with add-on publishing facility and get this message:
error config: Failed to apply a modification to an image:
As far, as I understand, this happens because of addon_list.cpp:151.
I see at least two solutions to this problem:
Hi @Arcanister ,
You could just blit both images onto misc/blank-hex.png, and scale as needed.
It is intuitive that you can't fit a larger image into a smaller image. Scaling the larger image first, or not using the smaller image as a base, would fix it. I'd rather have the error than have the function switch to some other behavior when I don't use it correctly.
@Arcanister - I'd still say there is nothing wrong with BLIT(). Your second solution seems reasonable, but I don't know why it should be 64x64px. 72px might be better, though even that might be problematic for people who want to use bigger images. Making BLIT( ) auto-detect the largest image might be simple, I have no idea, but it seems unnecessary; at the end of the day, you chose an image that didn't work, you got an error, and now you can easily fix it so that it does work. So, I'd still not be convinced anything is wrong here.
@CelticMinstrel - It might be nice in some circumstances, but I'd still rather have the error, since it meant I wasn't paying attention to the coordinates on the base image or the size of the applied image. For an image that is built up by macros, this could be an issue, silently leading to messed up images I might not see for a while.