Can Any one tell me why ofImage call update two times?

//----------------------------------------------------------
template
ofImage_& ofImage_::operator=(const ofImage_& mom) {
if(&mom==this) return *this;
clone(mom);
update();

#if defined(TARGET_ANDROID)
ofAddListener(ofxAndroidEvents().unloadGL,this,&ofImage_<PixelType>::unloadTexture);
ofAddListener(ofxAndroidEvents().reloadGL,this,&ofImage_<PixelType>::update);
#endif
return *this;

}


in clone

//------------------------------------
template
template
void ofImage_::clone(const ofImage_ &mom){
pixels = mom.getPixels();

tex.clear();
bUseTexture = mom.isUsingTexture();
if (bUseTexture == true && mom.getTexture().isAllocated()){
    tex.allocate(pixels.getWidth(), pixels.getHeight(), ofGetGlInternalFormat(pixels));
}

update();

}


I think second update is nouse…

I don’t quite understand your code, but maybe it’s the update() in Clone

this is ofImage source
in clone(mom); it calls update,and after this,it call update again

ofImage_& ofImage_::operator=(const ofImage_& mom) {
if(&mom==this) return *this;
clone(mom);
update();

this was a bug, thanks, i’ve just fixed it in master