Garry's Mod Wiki

Garry's Mod Wiki

  number, number surface.GetTextureSize( number textureID )


Returns the size of the texture with the associated texture ID.

For .png/.jpg textures loaded with Material you can use the $realheight and $realwidth material parameters (IMaterial:GetInt) to get the size of the image.


1 number textureID
The texture ID, returned by surface.GetTextureID.


1 number
The texture width.
2 number
The texture height.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...