Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Recent Topics
Advanced Search
picture programming problems im new  
Forum Index -> Java Questions
Author Message
Anonymous

public void doSetAlpha( @ParamDescrip("alpha value (0-255)") int value )
{
PixelColour alpha = new PixelColour( red, green, blue, value );
Pixel nextPixel;

for( int y = 100; y < myPic.getImgHeight(); y++ )
{
for( int x = 100; x < myPic.getImgWidth(); x++ )
{

nextPixel = myPic.getPixel( x, y );
nextPixel.setColour( alpha );
}
}
}

basically im setting the transparency in a picture and in the loop i cant figure out how to set it to scan the red green and blue levels so it will look proper
 
 
   Forum Index -> Java Questions
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil