Re: [AD] getpixel error

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Thank you so.

I'm trying this:
for(x = 0; x < imagem->w; x++)
   for(y = 0; y < imagem->h; y++){
      matrizRgb[x][y].r = 0.299 * getr(matrizPixel[x][y]);
      matrizRgb[x][y].g = 0.587 * getg(matrizPixel[x][y]);
      matrizRgb[x][y].b = 0.114 * getb(matrizPixel[x][y]);
      matrizPixel[x][y] = makecol(matrizRgb[x][y].r, matrizRgb[x][y].g, matrizRgb[x][y].b);
}

and after save the new picture in gray scale, but it isn't in gray scale...    


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/