VEX: Get Image Resolution Info? [{SOLVED}]

   1506   2   0
User Avatar
Member
1107 posts
Joined: 4月 2017
Offline
Hi,

I want to apply a texture on point @Cd of a grid but I would like to know the image resolution so I can scale its width/length properly. Can that be accessed through vex or do I absolutely need python for that?

-Olivier
Edited by olivierth - 2023年6月16日 11:10:43
User Avatar
Member
9121 posts
Joined: 7月 2007
Offline
you can use teximport() function
int xres, yres;
string texture = chs("texture");
teximport(texture, "texture:xres", xres);
teximport(texture, "texture:yres", yres);

printf("%dx%d", xres, yres);
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1107 posts
Joined: 4月 2017
Offline
Super! Thank you!
  • Quick Links