trouble flipping bitmap

Started by
0 comments, last by lshadow 24 years, 4 months ago
Ok, I'm trying to flip a bitmap after I've already loaded the data, but the program keeps freezing up. Here is the code.

typedef unsigned short WORD;
WORD image;
WORD buffer;
int height;
int bytes_line;

buffer = (WORD*)malloc(height*bytes_line);

memcpy(buffer, image, height*bytes_line);

// this is where it freezes
for (int i=0; i< height; i++)
memcpy(ℑ[((height-1)-i)*bytes_line],
&buffer[bytes_line*i],
bytes_line);

Thanks for any help...I need all I can get.

[This message has been edited by lshadow (edited December 01, 1999).]

Working on: DoP
Advertisement
Well I figured it out. I had to change the unsigned short WORD to unsigned char BYTE. That's it.
Working on: DoP

This topic is closed to new replies.

Advertisement