{{newin|[[0.9.0]]|090|type=function}}
Gets the number of [http://en.wikipedia.org/wiki/Mipmap mipmap] levels in the CompressedImageData. The base mipmap level (original image) is included in the count.

== Function ==
=== Synopsis ===
<source lang="lua">
mipmaps = CompressedImageData:getMipmapCount( )
</source>
=== Arguments ===
None.
=== Returns ===
{{param|number|mipmaps|The number of mipmap levels stored in the CompressedImageData.}}

== Notes ==
Mipmap filtering cannot be activated for an [[Image]] created from a CompressedImageData which does not have enough mipmap levels to go down to 1x1. For example, a 256x256 image created from a CompressedImageData should have 8 mipmap levels or [[(Image):setMipmapFilter|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 ==
* [[parent:: CompressedImageData]]
* [[(Image):setMipmapFilter|Image:setMipmapFilter]]
[[Category:Functions]]
{{#set:Description=Gets the number of mipmap levels in the CompressedImageData.}}
== Other Languages ==
{{i18n| CompressedImageData:getMipmapCount}}