I've used getimage() and putimage() and its much much faster than putpixel();
To use putimage, you can't use bmp files and that kind of stuff. It can only display an image saved with getimage(). You can write the memory block saved by getimage() to a file and then print it back using putimage() by reading it into a buffer.
If you're trying getimage() or putimage() on an empty screen, then obviously you won't notice anything!
It's better if you go through the TC++ 3.0 Help's examples.
If you choose a large area, then the total memory required to save it becomes huge and easily exceeds the program's memory segment or heap. So I wouldn't recommend saving areas greater than 200/200 pixels, even that's quite high. For this reason, both fns use far pointers
To create a far pointer, use
void far *buffer;
To find out the amt. of memory needed to save the area between a region, use imagesize().
If I'm right, you should allocate the required memory to the pointer by using farmalloc() or new, before using those functions.
Code:
size=imagesize(x1, y1, x2, y2);
void far *buffer=farmalloc(size);
getimage(x1, y1, x2, y2, buffer);
....
putimage(x1, y1, buffer, COPY_PUT);
See the TC++ help for more info
Bookmarks