def make_hatch(width, height, background='white', color='lightcyan2', sp=10): hatch = Numeric.ones((height, width,3)) * magick.MaxRGB val = magick.name2color(color) hatch[:,:,:] = magick.name2color(background)[:-1] hatch[sp::sp,:,:] = val[:-1] hatch[:,sp::sp,:] = val[:-1] img = magick.border(hatch, sp, sp, bordercolor=background) return img
def effects(): img = magick.image('testimages/original.jpg') new = magick.blur(img,3,1.5) new = magick.blur('testimages/original.jpg',3,1.5) #also works new = magick.rotate(img,20) new = img.copy() new.contrast(10) out = magick.border(img,6,6,bordercolor='red') out = magick.charcoal(img,1,0.5) out = magick.colorize(img, 'red', 0.30)