Skip to content

Instantly share code, notes, and snippets.

@Theverat
Created March 23, 2020 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Theverat/0e1ab00c63fc15618be81f12a4410b7c to your computer and use it in GitHub Desktop.
Save Theverat/0e1ab00c63fc15618be81f12a4410b7c to your computer and use it in GitHub Desktop.
import bpy
images = []
for image in bpy.data.images:
images.append((image.name, list(image.size), image.size[0] * image.size[1]))
images.sort(key=lambda elem: elem[2], reverse=True)
print("\nlargest images:")
for image in images:
print(image[1][0], "x", image[1][1], image[0])
if image[2] < 500 * 500:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment