##### Views

- Page
- Discussion
- View source
- History

# CompressedData:getMipmapCount

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Gets the number of mipmap levels in the CompressedData. The base mipmap level (original image) is included in the count.

## Function

### Synopsis

mipmaps = CompressedData:getMipmapCount( )

### Arguments

None.

### Returns

`number mipmaps`
  The number of mipmap levels stored in the CompressedData.

## Notes

Mipmap filtering cannot be activated for an Image created from a CompressedData which does not have enough mipmap levels to go down to 1x1. For example, a 256x256 image created from a CompressedData should have 8 mipmap levels or Image:setMipmapFilter will error. Most tools which can create compressed textures are able to automatically generate mipmaps for them in the same file.

## See Also

- CompressedData
- Image:setMipmapFilter

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/CompressedData:getMipmapCount"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties