Alpha Blend and PNG problem

Hi,

I am drawing a png with transparency, the image is white and it has some transparent spots, but the image is coming out black, with the transparent spots, in the draw method I have the following:

  
  
glEnable(GL_BLEND);  
glBlendEquationOES(GL_ADD);  
glBlendFunc(GL_DST_COLOR, GL_ZERO);  
glEnable(GL_LINE_SMOOTH);  
  
// drawing ofCircles here  
  
glDisable(GL_LINE_SMOOTH);  
glDisable(GL_BLEND);  
  
ofEnableAlphaBlending();  
headerImg.draw(10, ofGetHeight() - headerImg.height - 10);  
ofDisableAlphaBlending();  

Any ideas?

Cheers
rS

can you check your draw color? it tints the image being drawn, ie,

ofSetColor(0,0,0) means that anything white will be black
ofSetColor(255,0,0) means that anything white will be red

if that’s the problem, set the draw color to be white before you draw any images.

hope that helps!
zach

BULLSEYE!

that was the problem, I completely overlook a call to ofSetColor(0, 0, 0); before the image.draw()

Cheers
rS