ofImage ofxOpenCV
//--------------------------------------------------------------
void ofApp::setup(){
image1.load("D:/2.bmp");
image1.mirror(FALSE, TRUE);
image1.resize(512, 512);
image1.crop(10, 10, 256, 256);
image1.saveImage("D:/after.png", OF_IMAGE_QUALITY_BEST);
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
image1.draw(0, 0);
}
void ofApp::setup(){
image1.load("D:/2.bmp");
image1.mirror(FALSE, TRUE);
image1.resize(512, 512);
image1.crop(10, 10, 256, 256);
image1.saveImage("D:/after.png", OF_IMAGE_QUALITY_BEST);
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
image1.draw(0, 0);
}
#pragma once
답글삭제#include "ofMain.h"
#include "ofxOpenCV.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
ofImage image1;
};