home *** CD-ROM | disk | FTP | other *** search
- ***********************************************************
- * *
- * Save icon in Borland Graphical Interface (BGI) format *
- * *
- ***********************************************************
-
-
- Hit Alt+F for File in main menu, then hit S for Save
- and F for Format. Choose Borland graphic image in the
- button menu. Any decent file name may be used here.
-
-
- The Save Format normally defaults to the type of icon
- loaded into VICON. Icons that are not externally loaded
- automatically defaults to VICON's Native File Format.
-
-
-
-
-
- ****************************************************************
- * *
- * Import and export icons in Borland Graphical Interface (BGI) *
- * using TURBO PASCAL, C and C++ *
- * *
- ****************************************************************
-
- Procedure RetrieveImage(FileName : PathStr; var P : Pointer);
-
- { This routine retrieves an image stored in a disk file within
- your own application. Call PutImage(X, Y, P^, COPYput) later
- to show the image at (X, Y) on screen.
-
- Turbo C and C++ user should have no problem in translating this.}
-
- var
- F : File;
- Size : Word;
-
- begin
- Assign(F, FileName);
- Reset(F);
- Size := FileSize(F);
- Reset(F, Size);
- GetMem(P, Size);
- BlockRead(F, P^, 1)
- Close(F)
- end; {RetrieveImage}
-
-
-
- Procedure SaveImage(FileName: PathStr; X1, Y1, X2, Y2 : Word);
-
- { This routine saves an image in a disk file within your own
- application. If you later run VICON and see only part of the
- image, select Resize in the main menu to clip the image to the
- size you desire.
-
- If the image is larger than 64 X 64 pixels, VICON will truncate
- it automatically when it is read from the file. However, this
- file is not altered until you choose to overwrite it later,
- so that you are free to retrieve and edit any BGI-compatible
- images with VICON. }
-
- var
- F : File;
- P : Pointer;
- Size : Word;
-
- begin
- Size := ImageSize(X1, Y1, X2, Y2);
- GetMem(P, Size);
- GetImage(X1, Y1, X2, Y2, P^);
- Assign(F, FileName);
- Rewrite(F, Size);
- BlockWrite(F, P^, 1);
- Close(F)
- end; {SaveImage}
-
-
-
- P.S. Vicon is capable of extracting icons from those files
- containing multiple BGI images.
-
-
-
- +++++++++++++++++++++++++++++++++++++++++++++++++++++
- + Please read ReadMe.DOC, Register.DOC, Licence.DOC +
- +++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-