Esempio n. 1
0
//----------------------------------------------------------
bool ofImage::loadImage(string fileName){
	bool bLoadedOk = false;
	bLoadedOk = loadImageIntoPixels(fileName, myPixels);
	if (bLoadedOk && myPixels.isAllocated() && bUseTexture){
		tex.allocate(myPixels.getWidth(), myPixels.getHeight(), myPixels.getGlDataType());
	}
	update();
	return bLoadedOk;
}
Esempio n. 2
0
//----------------------------------------------------------
bool ofImage::loadImage(string fileName){
	bool bLoadedOk = false;
	bLoadedOk = loadImageIntoPixels(fileName, myPixels);

	if (bLoadedOk == true){
	if (myPixels.bAllocated == true && bUseTexture == true){
		tex.allocate(myPixels.width, myPixels.height, myPixels.glDataType);
	}
	update();
}

	return bLoadedOk;
}