Page Menu
Home
Search
Configure Global Search
Log In
Files
F2492
test.py
Public
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Austin Benesh (abtrumpet)
Nov 13 2013, 1:04 PM
Size
442 B
Subscribers
None
test.py
View Options
import
Blender
from
Blender
import
Image
img
=
Image
.
Load
(
"sample.tga"
)
pix
=
img
.
getPixelI
(
0
,
0
)
pix2
=
img
.
getPixelF
(
1
,
1
)
print
(
img
.
getMinXY
())
print
(
img
.
getMaxXY
())
print
(
pix
)
print
(
pix2
)
pix
[
0
]
=
0
pix
[
1
]
=
255
pix
[
2
]
=
0
pix
[
3
]
=
255
img
.
setPixelI
(
0
,
0
,
pix
)
pix3
=
img
.
getPixelI
(
0
,
0
)
print
(
pix3
)
pix2
[
0
]
=
0.0
pix2
[
1
]
=
1.0
pix2
[
2
]
=
0.0
pix2
[
3
]
=
1.0
img
.
setPixelF
(
1
,
1
,
pix2
)
pix4
=
img
.
getPixelF
(
1
,
1
)
print
(
pix4
)
img
.
save
()
File Metadata
Details
Mime Type
text/x-python
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
97/68/09d9e2d24f6684121be8ef1a1bd4
Event Timeline
Log In to Comment