This is the image I have loaded in blender: http://localhostr.com/files/6WHyRnC/Crate.jpg
this is how it looks in my game engine when I load it: http://localhostr.com/files/l4oWGWF/Untitled.png
I know I can just load the texture file from my game but I want to have the images packed inside the model file along with the vertices, normals etc...
This is how I export the image data from blender, am I doing something completely wrong here?
Code: Select all
# Write number of images
for i, Image in enumerate(bpy.data.images):
# Write width
# Write height
# Write size
# Write pixels
Pixels = array('f', Image.pixels)