Trying to get the size of a PNG material.
Tried combining these two but they wouldn’t work.
Trying to get the size of a PNG material.
Tried combining these two but they wouldn’t work.
surface.GetTextureSize is only compatible with surface.GetTextureID. But surface.GetTextureID is not compatible with png or jpg meaning you should probs give in.
(You can always just look at the initial file size?)
Or you can use http://wiki.garrysmod.com/page/file/Size
But you have to grab the material location, shouldn’t be hard.
file.Size( "addons/thing_bob/materials/cool_mat.png", "GAME" )
etc
Sorry I meant dimensions in pixels not bytes.
Thank you I completely missed those.