openframeworks/openFrameworks — pull request #3413 by yty (2014-11-14 03:27:28+00:00)
Title: Bugfix ofImageTypeFromPixelFormat()& swapRgb()

If not repaired, will not achieve the following example:

```

ofImage img;
ofImage imgEx;

//--------------------------------------------------------------
void ofApp::setup(){

ofSetDataPathRoot("E:/GitHubFiles/openFrameworks/examples/graphics/imageLoaderExample/bin/data/images/");

img.loadImage("transparency.png");
}

//--------------------------------------------------------------
void ofApp::update(){
imgEx.setFromPixels(img.getPixelsRef(),img.width,img.height,OF_IMAGE_COLOR_ALPHA,ofGetMousePressed()); //使用img
}

//--------------------------------------------------------------
void ofApp::draw(){
img.draw(0,0);
imgEx.draw(0,img.getHeight());
}
```