I'm iterating over the material slots in all the meshes in an imported scene, and I'm wondering if there's a way to downsample the image data (using python) associated with the material -- or should I just do it w/the standard python fare (the numpy family). ie I'm assuming blender has some built in bilinear / bicubic downsampling functionality, but I'm new to the API.
...
for i, obj in enumerate(meshes):
for s in obj.material_slots:
if s.material and s.material.use_nodes:
for n in s.material.node_tree.nodes:
if n.type == 'TEX_IMAGE':
select_mat = n.image.size[:]
print(obj.name,'uses',n.image.name,'saved at',n.image.filepath, select_mat)
image.scale(new_width, new_height)
. $\endgroup$