Scaling images and environment maps in Blender

With the Blender Python API we can very easily resize images, both common and .hdr or .exr environment maps. Any image loaded to Blender can be resized with the scale function.

Once we’ve loaded an image into Blender, from the Image Editor, or in any other way, we can view its dimensions through the size property.

We can refer to the image by name through the structure.

To resize the image, let’s call the scale method, with the required width and height in its parameters.

For example, to reduce the existing image by half:

We can verify that the size of an image has changed by recalling its size property.

To save the resized image, just press the alt + shift + s key combination in the Image Editor area.

0 0 votes
Article Rating
Notify of
0 Comment
Inline Feedbacks
View all comments