ScriptSpot

Forum topic · General Scripting

pixel resolution of an image file

By yanmaznecip · 2010-03-08

Description

Hi everybody,

By using maxscript how can I get pixel resolution (width and height) of an image file which is used as texture.

thx for your time
ny

Comments (2)

yanmaznecip · 2010-03-09

Thanks, this is exactly what I am looking for.

Anubis · 2010-03-08

Shortly, using ".bitmap.width" and ".bitmap.height", ie if for example your material is in 1st ME slot and the texture map is assigned to the diffuse then:

meditMaterials[1].diffuseMap.bitmap.width
meditMaterials[1].diffuseMap.bitmap.height