On 7/31/15 4:24 PM, Jim Graham wrote:
I'm guessing that you are trying to change the alpha of all colors to
0xff?  Then this is the proper loop:

     int alpha = 0xff << 24;
     for (int cy=0; cy < dst.getHeight(); cy++) {
         for (int cx=0; cx < dst.getWidth(); cx++) {
             int color = dst.getRGB(cx, cy);
             dst.setRGB(cx, cy, color | (0xff << 24));
         }
     }

Make that:

              dst.setRGB(cx, cy, color | alpha);

                        ...jim

Reply via email to