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 WriteInt(File, len(bpy.data.images)) for i, Image in enumerate(bpy.data.images): # Write width WriteInt(File, Image.size) # Write height WriteInt(File, Image.size) # Write size WriteInt(File, len(Image.pixels)) # Write pixels Pixels = array('f', Image.pixels) Pixels.tofile(File)