mirror of
https://github.com/love2d/megasource.git
synced 2026-08-15 15:51:13 +02:00
16 lines
226 B
Python
16 lines
226 B
Python
from DevIL import *
|
|
|
|
ilInit()
|
|
image = ilGenImages(1)
|
|
ilBindImage(image)
|
|
|
|
ilLoadImage('devil.gif')
|
|
|
|
data = ilGetData()
|
|
for i in range(len(data)):
|
|
if data[i] == 255:
|
|
data[i] = 0
|
|
ilSetData(data)
|
|
|
|
ilSaveImage('test.tga')
|