auto calculate mipmap-level from min(width,height)