Garry's Mod Wiki

surface.GetTextureSize

number, number surface.GetTextureSize( number textureID )

Description

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.

Arguments

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

Returns

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

Page Links


Special Pages


Wikis

?

Render Time: 37ms

DB GetPage 4
Generate Html 11
SaveChanges (1) 8
Render Body 0
Render Sidebar 12