Re: NEIL HELP NEEDED!
- Posted by mic _ <stabmaster_ at HOTMAIL.COM> Nov 29, 2000
- 426 views
>This does give me a clue, however, as he says when creating a virtual >screen (which load_bitmap does), it is just a memory address and the >graphic is linear... meaning stored in sequence, one bit after the other... >right? So, I could grab that memory, put it into a sequence, rotate it >using your function, then spit it back out to that memory location. Right? Right. A bitmap-grabber could be done something like this: (bitmap_width/height/pointer should be filled out by you) sequence s procedure grab() integer src_index, row s = repeat(0, bitmap_width*bitmap_height) src_index = 0 row = 0 for i = 1 to bitmap_height do for j = 1 to bitmap_width do if bytes_per_pixel=1 then s[row + j] = peek(bitmap_pointer + src_index) src_index += 1 elsif bytes_per_pixel=2 then s[row + j] = peek(bitmap_pointer + src_index)+ (peek(bitmap_pointer + src_index+1)*256) src_index += 2 elsif bytes_per_pixel=3 then s[row + j] = peek(bitmap_pointer + src_index)+ (peek(bitmap_pointer + src_index+1)*256)+ (peek(bitmap_pointer + src_index+2)*65536) src_index += 3 end if end for row += bitmap_width end for end procedure _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com