Skip to main content
2 of 6
added 238 characters in body
JPHarford
  • 133
  • 1
  • 8

Is it possible to edit images programmatically with the Blender API?

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

JPHarford
  • 133
  • 1
  • 8