An example of another great contribution, thanks smerf, especially like the idea of no plugins require il give it a thorough checking later
when using mipmaps you may find these two functions useful
as you need powers of 2
//condition to check whether number is power of two or not
//performing bitwise operation
if(n <> 0) and ((n &&(n - 1)) = 0)
example of how to use them
print (str(i) + " is power of 2")
//once you have determined width and height the resize image or the creation of images in your program could be used accordingly
I changed line 14 in Command_Camera.agc to "API.gadget[ret].BgImageID= CreateRenderImage(128,128,0,0)"
and changed line 266 in Gadget_Build.agc to "renderer=CreateRenderImage (API.Gadget[ID].wIDth,API.Gadget[ID].Height,0,0)"
which turns off mipmapping but the above functions could be used to check and resize accordingly