Thursday, October 21, 2010

Superstar format -> BMP



Recently, I stumbled upon a Superstar -> BMP approach.
First of all, please download the latest "Superstar 3.4Beta 7", installation, operation Delphi5, select Component-> Import ActiveX Control, then, you will find "Import ActiveX" there is a choice for "Pdg2 Type Library (Version 1.0) "....., do the rest I do not say it.
My method:
procedure TMainForm.PdgToBmp (FPdgName, FBmpName: string); / / FPdgname - Superstar format file name FBmpName - to save the BMP file name.
var i: integer;
j: boolean;
begin
ClipBoard.Clear;
MyPdg.LoadPage (FPdgName, 0,0,10);
Mypdg.Refresh;
MyPdg.CopyToClipBoard (0,0, MyPdg.PageWidth, MyPdg.PageHeight); / / This operation will take some time
j: = false;
while j = false do
begin
MyPdg.CopyToClipBoard (0,0, MyPdg.PageWidth, MyPdg.PageHeight);
for i: = 0 to clipboard.FormatCount -1 do / / test whether there ClipBoard bitmap, because I sometimes found in debugging the implementation of MyPdg.CopyToClipBoard (0,0, MyPdg.PageWidth, MyPdg.PageHeight); to be wrong, only detect the presence of a bitmap, and then replicate.
if Clipboard.Formats [i] = 2 then j: = true;
end;
Bmp.LoadFromClipBoardFormat (cf_BitMap, ClipBoard.GetAsHandle (cf_Bitmap), 0);
bmp.PixelFormat: = pf1bit;
bmp.SaveToFile (FBmpName);
end;

In addition, if the entire directory to convert the file continuously, please insert the conversion process between two
Sleep (1000); / / to the Superstar a little time, otherwise she will have opinions, does not work friends!!!

And Mypdg.Visible must be set to True;







Recommended links:



WMV To MPEG



Firefox 3.7 will update the interface denies plagiarism Chrome



Simple Art - Screen Savers



AVI to 3GP



Fireworks produced way Back in effect



Blog You need to fundamentalism



Hdmi connections over long distance



Lightning FAST shortcut keys used to grasp Thunder 5.9



ASF to MPG



Delphi and mixed programming language FORTRAN



Richard stake in financial media reported Transactions with the letter in the normal



Lists Games Card



Violet red orange Huanglv Qing, who hold Coloured Ribbons in the sky dance



Numbers will be allocated to the concept of the sword the veil of players



STORAGE Active X



Top Help Tools



No comments:

Post a Comment