run("pip")

orig = load_image("{data}/img/img2.png")

#orig.show()

#Resize
resized = resize(orig, 300,300)

#Sub-image
crop=sub_image(orig,10,20,50,30)
    
bin_im = bin_image(orig,2)
new_im = new_image(256, 256, "color")
pad_im = pad_image(orig, 1, 2, 3, 4, Color.RED)



stack=create_stack([orig,resized,crop, bin_im, new_im, pad_im])
save_image(stack,context.setup.expandPath("{data}/img/out.tiff") ,"tiff")
stack.show()

