Jump to content

  • Log In with Google      Sign In   
  • Create Account


trouble flipping bitmap


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 lshadow   Members   -  Reputation: 123

Like
Likes
Like

Posted 07 December 1999 - 03:03 AM

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(&image[((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).]


Sponsor:

#2 lshadow   Members   -  Reputation: 123

Like
Likes
Like

Posted 07 December 1999 - 03:03 AM

Well I figured it out. I had to change the unsigned short WORD to unsigned char BYTE. That's it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS