PImage img; void setup(){ size(345, 567); // The image file must be in the data folder of the current sketch // to load successfully img = loadImage("buzz3.jpg"); // Load the image into the program } void draw(){ // display the image at its actual size at point(0,0) image(img, 0, 0); // Displays the image at point(0, height/2) at half of its size // image(img, 0, height/2, img.width/2, img.height/2); }
openCV
here you can download
http://opencv.org/releases.html
http://opencv.jp/
in python-openCV
import cv2 img = cv2.imread('input.png') cv2.imwrite('output.png', img)
img = imread('input.png') imwrite('output.png', img) imshow(img) imageinfo('input.png') help images