Hi I need to calculate the dataSize of ARGB8 textures with mipmaps.

I made this routine but ti don´t know if is there a minimum size for the mimaps, so I don´t know if it s right

size=width*height*4; mipWidth=width; mipHeight=height; if(mipMaps!=0){ for(int i=0;i<mipMaps;i++){ mipWidth/=2; mipHeight/=2; if(mipHeight<1) mipHeight=1; if(mipWidth<1) mipWidth=1; tempSize=mipWidth*mipHeight*4; size+=tempSize; } }