Is there a way to capture the whole screen using GetImage?
Right now I can only use GetImage to capture a 350 X 350
area. If I try to capture 400 X 400 then the compuer
crashes. My compiler directive is: {$M 20384,0,640360}.
Is there a way to make sure I can access extended memory?
Thanx.
Comments
GetImage is not made for more than 64 kB. I have testing making BMP files in Paint Shop Pro and 350x350x16 colors results in 60 kB but 400x400x16 colors in 78 kB
If you are using Windows it would be good to download Free Pascal. You can use PrtScr to save any graphics to other programs.
Staying with TP you should save the graphics in files of type BMP with GetPixel
I will show you saving of an image to a BMP-file.
This is an image in size 1024x768 with 16 colors from TP7.
procedure bmp1024;
var x,y,w1,w2,w3: word;
col,r,r1,g,g1,b,b1: byte;
c1,c2,c3,c4,c5,c6,c7,c8: string;
f: text;
begin
assign(f,'graf01.bmp');
rewrite(f);
c1:= chr($42) + chr($4d) + chr($36) + chr($0) ;
c1:= c1 + chr($24) + chr($0) + chr($0) + chr($0);
c1:= c1 + chr($0) + chr($0) + chr($36) + chr($0);
c1:= c1 + chr($0) + chr($0) + chr($28) + chr($0) ;
c2:= chr($0) + chr($0) + chr($0) + chr($4) ;
c2:= c2 + chr($0) + chr($0) + chr($0) + chr($3) ;
c2:= c2 + chr($0) + chr($0) + chr($1) + chr($0) ;
c2:= c2 + chr($18) + chr($0) + chr($0) + chr($0) ;
c3:= chr($0) + chr($0) + chr($0) + chr($0) ;
c3:= c3 + chr($24) + chr($0) + chr($12) + chr($0b) ;
c3:= c3 + chr($0) + chr($0) + chr($12) + chr($b) ;
c3:= c3 + chr($0) + chr($0) + chr($0) + chr($0) ;
c4:= chr($0) + chr($0) + chr($0) + chr($0) + chr($0) + chr($0) ;
c5:=c1 + c2 + c3 + c4;
write(f,c5);
For y:=0 to MaxY do
begin
For x:=0 to MaxX do
begin
col:=GetPixel(x,y);
case col of
15: begin
r:=0;
g:=0;
b:=0;
end;
10: begin
r:=0;
g:=255;
b:=0;
end;
else begin
r:=255;
g:=255;
b:=255;
end;
end;
write(f,chr(b));
write(f,chr(g));
write(f,chr(r));
end;
end;
close(f);
end;
The start of the BMP is depending of the size of the image. I have been using a program called fileview.exe to read files and find out. Any hexview reader can do it. What image size can you have with TP7? Graphic cards made today are not very good. The best card I have found was Tseng Lab 6000 giving 1280x1024x16 colors
Say, I know where you guys can really help me out: My tp7 package includes a supurb source code for a unit that's called editors.pas (editors.tpu) but I can't find or figure out the 'launch' point in that code. I really need this unit for my current project but I just don't know what procedure in it to call from my program. This unit is a very nice text editor.
I'm familiar with pointers, arrays, objects, units, graphics and stuff but I could really use some advice and help here. Do you want me to post this code? I haven't done much with records and such. Thanks Pelle-48 and
Yes I have the files editors.pas and editors.tpu but I don't know anything about them. If you run graphics with TP7 what resolution can you get?
640x480 (VGA), 800x600, 1024x768 or 1280x1024?
I could send a BMP saver for the right one (the first I have shown is only for 1024x768)
I've have some good results accessing extended memory so it could be done fast. I recall the code that you posted about bmps and so I'm going to make it a priority to give this some thought. I have a million things to do (fortunately) but this will be at the top of the list. I hope you'll forgive me if I again call upon your help in the future but if so, I will certainly mention your name in the acknowledgement section of my program. PS: I found a program called tvdemo.pas in my TP7 package and it's an even better editor than the one I was going to use!