The R Project SVN R

Rev

Rev 55647 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 55647 Rev 55671
Line 196... Line 196...
196
    byte *data = (byte *) (&bmi->bmiColors[palsize]);
196
    byte *data = (byte *) (&bmi->bmiColors[palsize]);
197
 
197
 
198
    if (depth == 8)
198
    if (depth == 8)
199
	for (unsigned y = 0; y < height; y++) {
199
	for (unsigned y = 0; y < height; y++) {
200
	    // memcpy(data + y * row_bytes, pixel8 + y * width, width);
200
	    // memcpy(data + y * row_bytes, pixel8 + y * width, width);
201
	    for (unsigned x = 0; x < width; x++) {
201
	    for (unsigned x = 0; x < width; x++)
202
		int i = y * row_bytes + x;
-
 
203
		data[y * row_bytes + x] = pixel8[y * width + x];
202
		data[y * row_bytes + x] = pixel8[y * width + x];
204
	    }
-
 
205
	}
203
	}
206
    else if (depth == 24)
204
    else if (depth == 24)
207
	for (unsigned y = 0; y < height; y++) {
205
	for (unsigned y = 0; y < height; y++) {
208
	    for (unsigned x = 0; x < width; x++) {
206
	    for (unsigned x = 0; x < width; x++) {
209
		rgb colour = pixel32[y * width + x];
207
		rgb colour = pixel32[y * width + x];