Search found 3 matches

by jkoops
Mon Nov 05, 2012 10:00 am
Forum: Python
Topic: Access to Image.pixels very slow
Replies: 2
Views: 1393

Thanks, that helps!

For those reading this thread later, the solution is writing the pixels out like this:

Code: Select all

f.write(bytes([int(pix*255) for pix in img.pixels]))
where f is your output-file.
by jkoops
Mon Nov 05, 2012 9:57 am
Forum: Python
Topic: Expose tangent space for export script in Python
Replies: 7
Views: 8727

Hi Andy, Just wanted to say that this is something I would very much appreciate too. On the other hand, are you sure that tangent space definition is implementation dependent? It seems to me that two of the axis can be calculated from the UV mapping, and the third axis is a simple cross-product. Fro...
by jkoops
Fri Nov 02, 2012 4:24 pm
Forum: Python
Topic: Access to Image.pixels very slow
Replies: 2
Views: 1393

Access to Image.pixels very slow

Hi, As part of a custom exporter, I'm trying to copy the pixels of a texture image to a file. However, it seems that accessing the Image.pixel array is very slow. If I read every pixel of a 128x128 image and write it to a file, it takes around 10 seconds. For a 1024x1024 image, it seems to take fore...