I want to save all material's preview image.
And i try to use BaseBitmap.ScaleIt() , but it's not working.
All images remain the before ScaleIt() size，I'm not sure what went wrong.
there are my code:
bmps = 
for m in mats:
image = m.GetPreview(0)
dst_bmp = c4d.bitmaps.BaseBitmap()
image.ScaleIt(dst_bmp, 256, True, True)
path = "D:\\Program Files\\my folder"
mats = doc.GetMaterials()
bmps = SetBmpSize(mats,32)
for index,bmp in enumerate(bmps):
#name = path + "\\" + str(index) + "material preview.tif"
#bmp.Save(name, c4d.FILTER_TIF, data=None, savebits=c4d.SAVEBIT_0)
this is the show in picture viewer after ScaleIt() Image:
@gheyret said in BaseBitmap.ScaleIt() IS NOT WORKING:
This does append the original image to your array of bmps being returned, not the scaled up one.
you should do:
Thank you for your help! It works！