I'm currently trying to extract textures from a binary file, and ideally I'd like to save each texture to a file or embed in the .blend file. However, before saving an image, I need to be able to create an image in memory from an array of pixel data.
The PIL library contains the kinds of functions I need to use, but it is not included with Blender. Is there anything similar to PIL in Blender? bpy.ops.image seems to be close to what I need, but lacks necessary pixel set/manipulation functions.


chanfor in the linepixels = [chan for px in pixels for chan in px]- the line is an equivalent topixels = [] \n for chan in px: \n\t for px in pixels: \n\t\t pixels.append(px)where\nand\tmean a newline and a tab. – Markus von Broady Feb 13 '22 at 20:03