Skip to main content
added 128 characters in body
Source Link
Val
  • 395
  • 1
  • 6
  • 14

How do I crop an image loaded from a file in Blender (using a Python script). The standard Python's Image.crop() function doesn't seem to be available in the Image class.

UPDATE:

I wrote some code by myself, which copies specified pixels of the original image but the output image is somehow screwed up.

This is the original image (some gfx from deviantart): http://postimg.org/image/xegpwy0ur

This is the image after processing - i took a 100x100 fragment (first 10000 pixels of the original image): http://postimg.org/image/c57j2vvjp

And this is the code: http://pastecode.org/index.php/view/5045500

How do I crop an image loaded from a file in Blender (using a Python script). The standard Python's Image.crop() function doesn't seem to be available in the Image class.

UPDATE:

This is the original image (some gfx from deviantart): http://postimg.org/image/xegpwy0ur

This is the image after processing - i took a 100x100 fragment (first 10000 pixels of the original image): http://postimg.org/image/c57j2vvjp

And this is the code: http://pastecode.org/index.php/view/5045500

How do I crop an image loaded from a file in Blender (using a Python script). The standard Python's Image.crop() function doesn't seem to be available in the Image class.

UPDATE:

I wrote some code by myself, which copies specified pixels of the original image but the output image is somehow screwed up.

This is the original image (some gfx from deviantart): http://postimg.org/image/xegpwy0ur

This is the image after processing - i took a 100x100 fragment (first 10000 pixels of the original image): http://postimg.org/image/c57j2vvjp

And this is the code: http://pastecode.org/index.php/view/5045500

added links to resources
Source Link
Val
  • 395
  • 1
  • 6
  • 14

How do I crop an image loaded from a file in Blender (using a Python script). The standard Python's Image.crop() function doesn't seem to be available in the Image class.

UPDATE:

This is the original image (some gfx from deviantart): http://postimg.org/image/xegpwy0ur

This is the image after processing - i took a 100x100 fragment (first 10000 pixels of the original image): http://postimg.org/image/c57j2vvjp

And this is the code: http://pastecode.org/index.php/view/5045500

How do I crop an image loaded from a file in Blender (using a Python script). The standard Python's Image.crop() function doesn't seem to be available in the Image class.

How do I crop an image loaded from a file in Blender (using a Python script). The standard Python's Image.crop() function doesn't seem to be available in the Image class.

UPDATE:

This is the original image (some gfx from deviantart): http://postimg.org/image/xegpwy0ur

This is the image after processing - i took a 100x100 fragment (first 10000 pixels of the original image): http://postimg.org/image/c57j2vvjp

And this is the code: http://pastecode.org/index.php/view/5045500

Tweeted twitter.com/#!/StackBlender/status/481392475068985345
Source Link
Val
  • 395
  • 1
  • 6
  • 14

Crop image with Python script

How do I crop an image loaded from a file in Blender (using a Python script). The standard Python's Image.crop() function doesn't seem to be available in the Image class.