All pastes #536808 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-04 14:50 UTC
rendered paste body
   for (int y = 0; y < height_; y++) {
      for (int x = 0; x < width_; x++) {
         int i = (x + y * image->rowstride()) * image->pixelstride();
         int j = (x + y * width_) * image->pixelstride();

         data[j]   = (image->data())[i+3];
         data[j+1] = (image->data())[i+2];
         data[j+2] = (image->data())[i+1];
         data[j+3] = (image->data())[i];
      }
   }