@@ -0,0 +1,416 @@
+from pgmagick import Image, Blob%0A%0Ablob = Blob(open('X.jpg').read())%0Aimg = Image(blob)%0Asize = img.size()%0Apixels = img.getPixels(0, 0, size.width()/2, size.height()/2)%0A%0Afor cnt, pixel in enumerate(pixels):%0A    if False:%0A        print(pixel.red, pixel.blue, pixel.green, pixel.opacity)%0A    pixel.blue = pixel.blue / 2%0A    pixel.green = pixel.green / 2%0A    pixel.red = pixel.red / 2%0Aimg.syncPixels()%0Aimg.write(%22Xo.jpg%22)%0A

add get/setPixels example