home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-15 | 35.7 KB | 1,086 lines |
- Borland Pascal and Delphi Users' Guide
-
- Image Lite DLL /VCL version 2.0 (c) Copyright 1995 by:
- Kevin Adams (CIS) 74742,1444 and Jan Dekkers (CIS) 72130,353
-
- Technical support for C, C++, VB applications:
- Kevin Adams: CIS) 74742,1444
-
- Technical support for Delphi, Pascal and VB applications:
- Jan Dekkers CIS) 72130,353
-
- Other means of technical support are currently not provided.
- ____________________________________________________________________________
-
- What is ImageLib DLL/VCL?
-
- The ImageLib VCL'S\DLL is an inexpensive way to add Jpeg, Gif and Pcx to your
- applications. Yes, there are image libraries supporting many more formats
- than ImageLib, but those libraries are more expensive and add more overhead
- to your applications.
-
- ImageLib is a enhanced Timage and TDBImage VCL/DLL with the following
- added features:
-
- * Enables the reading and writing of JPEG images to/from a file or a TBlobfield;
- * Jpeg 4, 8 and 24 bit dithering;
- * Jpeg 0 to 100% save quality;
- * Jpeg 0 to 100% smoothing;
- * enables the reading of GIF images from a file or a TBlobfield;
- * enables the reading of PCX images from a file or a TBlobfield;
- * enables the reading and writing of BMP images to/from a file or a TBlobfield;
- * Enables the reading and writing of AVI images to/from TBlobfield;
- * Enables the reading and writing of MOV images to/from TBlobfield;
- * Enables the reading and writing of WAV images to/from TBlobfield;
- * Enables the reading and writing of RMI images to/from TBlobfield;
- * Enables the reading and writing of MID images to/from TBlobfield;
- * enables the reading and writing of ICO images to/from a file(Delphi inherited);
- * enables the reading and writing of WMF images to/from a file (Delphi inherited);
- * DLL Callback funtion shows a progress bar and processes windows messages;
- * 1 line of code displays all image formats on the same canvas;
- * no code necessary (VCL) to display all image formats from a TBlobfield;
- * Loads/Saves all Tblobfield images to/from file;
- * converts all Tblobfield images to Jpeg/Bmp file;
- * pastes images from Clipboard and stores as a Jpeg/Bmp file/Blob;and
- * retrieves File/Blob info without actually opening the file.
-
- ____________________________________________________________________________
-
-
- Installation Instructions
-
- BACKUP YOUR \DELPHI\BIN\COMPLIB.DCL Better safe than ;-(
-
- Copy the IMGLIB20.dll to a directory on your path or to the
- windows\system directory (best choice). THIS IS A DISTRIBUTABLE FILE.
-
- If you have installed an earlier version of TMultiImage, you must
- remove the old TMultiImage component. Execute Delphi. In Delphi select
- Options\Install components (select reg_image or reg_im20) and remove.
- Press OK. Delete reg_image.pas and/or reg_im20.pas from your system.
-
- Unzip MIMAGE.ZIP into a new directory. Copy the following files into a
- directory containing your 3rd party added VCL's: (If you don't have a
- directory yet please make one)
-
- MULTIREG.PAS, TMULTI.PAS, TDBMULTI.PAS and DLL20LIN.DCU
-
- Execute Delphi. In Delphi select Options\Install components\ Add and
- browse your 3rd party added VCL's directory. Select MULTIREG and press
- the OK button.
-
- After the library is rebuilt, you will notice 4 new icons on your Delphi
- toolbar under images called: MultiImage, DBMultiImage, DBMultiMedia and
- DBMediaPlayer.
-
-
- Installation Instructions for the Examples
-
- In delphi select Open\Project and open one of the projects in the
- newly created directory. Select rebuild. Run the program.
- ______________________________________________________________________________
-
- IMPORTANT: IF YOU INSTALLED THE OLD MULTIIMAGE or DBMultiImage
-
- What to do with your existing programs using the old MultiImage VCL:
-
- Incase of OLD MULTIIMAGE:
-
- Change the uses clause of your programs from REG_IMAG or REG_IM20 to TMULTI.
- When you startup your existing programs using the MultiImage VCL you might
- notice a complain (Property JPegSaveSmooh doesnÆt exist.) This is because we
- forgot the T in smooth in the old vcl. To fix this, load the FORM (the *.DFM)
- file complaining about this and replace JPegSaveSmooh with JPegSaveSmooTh.
- Property JPegSaveFileName is renamed to DefSaveFileName.
-
- ______________________________________________________________________________
-
- Incase of OLD TDBMULTIIMAGE:
-
- Change the uses clause of your programs from REG_IM20 to TDBMULTI.
- ______________________________________________________________________________
-
-
- The new VCL objects added to your toolbar are called MultiImage, DBMultiImage,
- DBMultiMedia and DBMediaPlayer.
-
-
- TMULTIIMAGE: JPEG, BMP, GIF, WMF, ICO and PCX.
- ------------
- Mutltimage is derived from TGraphicsControl. It has the same properties as
- Delphi's TImage with the following additions:
-
- property JPegSaveQuality 0...100
- 0 is poor and 100 excellent. We normally
- use 25 to have a reasonable quality with
- 1/10 savings in size.
-
-
- (Changed property was JPegSaveSmooh}
-
- property JPegSaveSmooth 0..100
- 0 is no smoothing and 100 is full
- smoothing.
-
- procedure SaveAsJpg(FN : TFilename); save jpeg
-
-
-
- (Changed property was JPGSaveFileName}
-
- property DefSaveFileName The filename of the image being saved.
-
- Example:
- --------
- procedure TForm1.SaveButtonClick(Sender: TObject);
- begin
-
- {Open save dialog}
- if SaveDialog1.execute then begin
- MultiImage1.JPegSaveQuality:=25;
- MultiImage1.JPegSaveSmooth:=5;
- MultiImage1.DefSaveFileName:=SaveDialog1.FileName;
- MultiImage1.SaveAsJpg('');
- end;
- end;
- (or you can use)
-
- procedure TForm1.SaveButtonClick(Sender: TObject);
- begin
- {Open save dialog}
- if SaveDialog1.execute then begin
- MultiImage1.SaveAsJpg(SaveDialog1.FileName);
- end;
- end;
- ___________________________________________________________
-
- procedure SaveAsBMP(FN : TFilename); save jpeg
-
- Example:
- --------
- procedure TForm1.SaveButtonClick(Sender: TObject);
- begin
- {Open save dialog}
- if SaveDialog1.execute then begin
- MultiImage1.DefSaveFileName:=SaveDialog1.FileName;
- MultiImage1.SaveAsBMP('');
- end;
- end;
-
- (or you can use)
-
- procedure TForm1.SaveButtonClick(Sender: TObject);
- begin
- {Open save dialog}
- if SaveDialog1.execute then begin
- MultiImage1.SaveAsBMP(SaveDialog1.FileName);
- end;
- end;
- ______________________________________________________________________________
-
- property JPegDither 0: No dithering 24 bit
- 1: One Pass No dither
- 2: One Pass dither
- 3: Two Pass No dither
- 4: Two Pass dither
-
- property JPegResolution 4 bit (16 colors)
- 8 bit (256 colors)
- 24 bit (16 Million colors)
-
- property ImageName Procedure to load an image and the
- filename of the image being loaded.
-
-
- Example:
- ---------
- procedure TForm1.OpenFileClick(Sender: TObject);
- begin
- if OpenDialog1.execute then begin
- {set hourglass cursor}
- screen.cursor:=crHourGlass;
- {set dither}
- MultiImage1.JPegDither:=4;
- {set resolution}
- MultiImage1.JPegResolution:=8;
- {display an image using the vcl}
- MultiImage1.imagename:=OpenDialog1.filename;
- {set default cursor}
- screen.cursor:=crDefault;
- end;
- end;
- ______________________________________________________________________________
-
-
-
- function GetInfoAndType(filename : TFilename) : Boolean;
-
- GetInfoAndType is a very fast dll function which retrieves image information
- without actually loading the image. GetInfoAndType will return true, if
- successful, and will store the following information:
-
- BFiletype : String; JPEG, BMP, GIF, PCX, ICO, WMF
- Bwidth : Integer; Width of the image
- BHeight : Integer; Height of the image
- BSize : Longint; File size in bytes
- Bbitspixel : Integer; Bits per Pixel (If available)
- Bplanes : Integer; Planes (If available)
- Bnumcolors : Integer; Number of colors (If available)
- Bcompression : String; Compression method (If available)
-
- for ICO and WMF the image must be displayed to return the following:
- Bwidth : Integer; Width of the image
- BHeight : Integer; Height of the image
-
- for ICO and WMF the following return is always 0
- Bbitspixel : Integer; Bits per Pixel (If available)
- Bplanes : Integer; Planes (If available)
- Bnumcolors : Integer; Number of colors (If available)
-
- Note: GetInfoAndType is called automatically by the VCL while an Image
- is being displayed. If no Image is displayed you can call this function
- manually.
-
-
- Example:
- -------
- procedure TForm1.DisPlayInfo(filename : TFilename);
- begin
- if GetInfoAndType(filename) then begin
- Edit1.Text:=IntToStr(MultiImage1.Bwidth);
- Edit2.Text:=IntToStr(MultiImage1.BHeight);
- Edit3.Text:=IntToStr(MultiImage1.Bbitspixel);
- Edit4.Text:=IntToStr(MultiImage1.Bplanes);
- Edit5.Text:=IntToStr(MultiImage1.Bnumcolors);
- Edit6.Text:=MultiImage1.BFileType;
- Edit7.Text:=MultiImage1.Bcompression;
- Edit8.Text:=IntToStr(MultiImage1.BSize);
- end else begin
- Edit1.Text:='';
- Edit2.Text:='';
- Edit3.Text:='';
- Edit4.Text:='';
- Edit5.Text:='';
- Edit6.Text:='';
- Edit7.Text:='';
- Edit8.Text:='';
- end;
- end;
-
- ______________________________________________________________________________
-
- DLL Image CallBack Procedure
-
- The callback procedure is generated by the DLL and has 2 main goals:
-
- 1: To show a progress bar to the user
- 2: To process windows messages to give other windows programs the
- chance to do what they have to do.
-
- It's up to you, the application developer, to process the application's
- messageloop. You can do this by adding APPLICATION.PROCESSMESSAGES in the
- callback procedure.
-
- The Dll expects a callback procedure of the following type:
-
- type
- TCallBackFunction = procedure(i:integer);
-
- var (pointer to the callback type)
- TMultiImageCallBack : TCallBackFunction;
-
-
- There are two things you MUST do to add a callback to your app:
-
- 1: You need to declare a Procedure of the type above with the EXPORT clause:
-
- procedure MyCallBack(i : integer); export;
- begin
- Form1.Gauge1.Progress:=i;
- Application.ProcessMessages;
- end;
-
- 2: You need to register the callback to the VCL. The best place to do that
- is in the FormCreate function:
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- TMultiImageCallBack:=MyCallBack;
- end;
-
- ____________________________________________________________________________________________________________________________________________________________
-
- TDBMULTIIMAGE: JPEG, BMP, GIF and PCX from a TBLOBField.
-
- TDBMutltimage is the data-aware VCL version of TMultiImage. DBMutltimage is
- derived from TCustomControl. It has the same properties as Delphi's TDBImage
- with the following additions:
-
- property JPegSaveQuality 0...100
- 0 is poor and 100 excellent. We normally
- use 25 to have a reasonable quality with
- 1/10 savings in size.
-
- property JPegSaveSmooth 0..100
- 0 is no smoothing and 100 is full
- smoothing.
-
- procedure SaveToFileAsJpg(FN : TFilename); saves the Image displayed
- on the screen as a Jpeg file.
-
- Example:
- -------
- procedure TForm1.BitBtn8Click(Sender: TObject);
- {save or convert the blob to a Jpeg file}
- {make sure that the blob is displayed before saving to file}
- begin
- {set SaveDialog filter to display jpeg's only}
- SaveDialog2.filter:='Jpeg files|*.JPG';
-
- {set SaveDialog Default extension}
- SaveDialog2.DefaultExt:='JPG';
-
- TDBMultiImage1.JPegSaveQuality:=25;
-
- TDBMultiImage1.JPegSaveSmooth:=5;
-
- if SaveDialog2.Execute then
- {Save it}
- TDBMultiImage1.SaveToFileAsJpeg(SaveDialog2.Filename);
-
- {reset the gauge to 0}
- Gauge1.Progress:=0;
- end;
- ------------------------------------------------------------------
-
- procedure SaveToFileAsBMP(FN : TFilename); save the Image displayed on
- the screen as a BMP file.
-
- Example:
- -------
- procedure TForm1.BitBtn7Click(Sender: TObject);
- {save or convert the blob to a BMP file}
- {make sure that the blob is displayed before saving to file}
- begin
- {set SaveDialog filter to display bmp's only}
- SaveDialog2.filter:='BMP files|*.BMP';
-
- {set SaveDialog Default extension}
- SaveDialog2.DefaultExt:='BMP';
-
-
- if SaveDialog2.Execute then
- {Save it}
- TDBMultiImage1.SaveToFileAsBMP(SaveDialog2.Filename);
-
- {reset the gauge to 0}
- Gauge1.Progress:=0;
- end;
-
- -----------------------------------------------------------------------
-
- function GetInfoAndType : String; {return extension type}
-
- GetInfoAndType is a very fast dll function which retrieves image info.
- GetInfoAndType will return the file extension and will store the
- following information:
-
- BFiletype : String; JPEG, BMP, GIF, PCX
- Bwidth : Integer; Width of the image
- BHeight : Integer; Height of the image
- BSize : Longint; File size in bytes
- Bbitspixel : Integer; Bits per Pixel (If available)
- Bplanes : Integer; Planes (If available)
- Bnumcolors : Integer; Number of colors (If available)
- Bcompression : String; Compression method (If available)
-
- Note that GetInfoAndType is called automatically by the VCL if autodisplay is
- true by browsing through the open database. If autodisplay = false then to get
- the blob info you need to make the call by yourself.
-
- example
- --------
- procedure TForm1.DataSource1DataChange(Sender: TObject; Field: TField);
- begin
- {Reset the Gauge}
- Gauge1.Progress:=0;
- {If TDBMultiImage1.autodisplay = false then get the blob info
- manually or else the vcl will do it automatically}
-
- If not TDBMultiImage1.autodisplay then TDBMultiImage1.GetInfoAndType;
-
- {Show the user the blob info}
- Edit1.text:='This blob image is a '+TDBMultiImage1.BFiletype;
- Edit2.text:=IntToStr(TDBMultiImage1.Bwidth);
- Edit3.text:=IntToStr(TDBMultiImage1.BHeight);
- Edit4.text:=IntToStr(TDBMultiImage1.Bbitspixel);
- Edit5.text:=IntToStr(TDBMultiImage1.Bplanes);
- Edit6.text:=IntToStr(TDBMultiImage1.Bnumcolors);
- Edit7.text:=TDBMultiImage1.Bcompression;
- Edit8.text:=IntToStr(TDBMultiImage1.BSize);
- end;
-
- -----------------------------------------------------------------------
-
- Procedure SaveToFile(SaveDialog1.FileName); The SaveToFile will save the
- blob to a file without any
- conversion.
-
- Example
- -------
- procedure TForm1.BitBtn2Click(Sender: TObject);
- var temp : string;
- begin
-
- {Save the current blob to a jpeg, pcx, gif or Bmp file. The SaveToFile
- will save it as stored in the blob. No conversion is done here)
- ( Use SaveToFileAsBMP or SaveToFileAsJpeg to Convert to one another}
-
- {get the extension (filetype) of the stored blob}
- {GetInfoAndType returns the extension of the blob stored}
-
- if not table1.active then exit;
-
- temp:=TDBMultiImage1.GetInfoAndType;
-
- if temp = 'GIF' then begin
- {set SaveDialog filter to display gif's only}
- SaveDialog1.filter:='GIF files|*.GIF';
-
- {set SaveDialog Default extension}
- SaveDialog1.DefaultExt:='GIF';
- end else
-
- if temp = 'PCX' then begin
- {set SaveDialog filter to display pcx's only}
- SaveDialog1.filter:='PCX files|*.PCX';
-
- {set SaveDialog Default extension}
- SaveDialog1.DefaultExt:='PCX';
- end else
-
- if temp = 'JPG' then begin
- {set SaveDialog filter to display jpeg's only}
- SaveDialog1.filter:='Jpeg files|*.JPG';
-
- {set SaveDialog Default extension}
- SaveDialog1.DefaultExt:='JPG';
- end else
-
- if temp = 'BMP' then begin
- {set SaveDialog filter to display bmp's only}
- SaveDialog1.filter:='BMP files|*.BMP';
- {set SaveDialog Default extension}
- SaveDialog1.DefaultExt:='BMP';
- end;
-
- {save it to file as stored in blob}
- If SaveDialog1.Execute Then
- TDBMultiImage1.SaveToFile(SaveDialog1.FileName);
-
- {reset the gauge to 0}
- Gauge1.Progress:=0;
- end;
- -----------------------------------------------------------------------
-
- property JPegDither 0: No dithering 24 bit
- 1: One Pass No dither
- 2: One Pass dither
- 3: Two Pass No dither
- 4: Two Pass dither
-
- property JPegResolution 4 bit (16 colors)
- 8 bit (256 colors)
- 24 bit (16 Million colors)
-
-
- Example
- ---------
- procedure TForm1.ResolutionClick(Sender: TObject);
- {Set resolution and dither the image}
- begin
-
- if RadioButton1.Checked then begin {Set resolution to 16 colors}
- TDBMultiImage1.JpegResolution:=4;
- {Set dither 1 pass ordered}
- TDBMultiImage1.JpegDither:=2;
- end else
-
- if RadioButton2.Checked then begin {Set resolution to 256 colors}
- TDBMultiImage1.JpegResolution:=8;
- {Set dither 2 pass FS}
- TDBMultiImage1.JpegDither:=4;
- end else
-
- if RadioButton3.Checked then begin {Set resolution to true color}
- TDBMultiImage1.JpegResolution:=24;
- {Set No dither (True color images don't have a palette)}
- TDBMultiImage1.JpegDither:=0;
- end;
-
- {Reload the image }
- Table1.Refresh;
-
- {reset the gauge to 0}
- Gauge1.Progress:=0;
- end;
- -----------------------------------------------------------------------
- property UPdateBlobAsJpeg
-
- If True then the Blob Image will be updated to a Jpeg Blob.
-
- If False then the Blob Image will be updated to a BMP Blob.
-
- example
- --------
- procedure TForm1.UpdateAsJpeg(Sender: TObject);
- {Paste image from clipboard}
- begin
- {does the clipboard have the right format?}
- if not Clipboard.HasFormat(CF_PICTURE) then exit;
- {Yep it does. Paste image from clipboard}
-
- TDBMultiImage1.UpdateBlobAsJpeg:=True;
-
- TDBMultiImage1.PastefromClipboard;
-
- {post the blob to the database in jpeg format}
- Table1.Post;
- {reset the gauge to 0}
- Gauge1.Progress:=0;
- end;
-
- procedure TForm1.UpdateAsBMP(Sender: TObject);
- {Paste image from clipboard}
- begin
- {does the clipboard have the right format?}
- if not Clipboard.HasFormat(CF_PICTURE) then exit
- {Yep it does. Paste image from clipboard}
-
- TDBMultiImage1.UpdateBlobAsJpeg:=False;
-
- TDBMultiImage1.PastefromClipboard;
-
- {post the blob to the database in jpeg format}
- Table1.Post;
- {reset the gauge to 0}
- Gauge1.Progress:=0;
- end;
-
- -----------------------------------------------------------------------
-
- DLL Image CallBack procedure
-
- The callback procedure is generated by the DLL and has 2 main goals:
-
- 1: To show a progress bar to the user.
-
- 2: To process windows messages to give other windows programs the
- chance to do what they have to do.
-
- It's up to you, the application developer, to process the application's
- messageloop. You can do this by adding APPLICATION.PROCESSMESSAGES in the callback
- procedure.
-
-
- The Dll expects a callback procedure of the following type:
-
- type
- TCallBackFunction = procedure(i:integer);
-
- var (pointer to the callback type)
- TDBMultiImageCallBack : TCallBackFunction;
-
-
- The are two things you MUST do to add a callback to your app:
-
- 1: You need to declare a Procedure of the type above with the EXPORT clause:
-
- procedure MyCallBack(i : integer); export;
- begin
- Form1.Gauge1.Progress:=i;
- Application.ProcessMessages;
- end;
-
- 2: You need to register the callback to the VCL. The best place to do that
- is in the FormCreate function:
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- TDBMultiImageCallBack:=MyCallBack;
- end;
- -----------------------------------------------------------------------
-
- Bonus VCL
- -----------
-
- Sample project: MMBLOB
-
- TDBMULTIMEDIA and TDBMEDIAPLAYER:
- AVI, MOV, MID, WAV, RMI, JPEG, BMP, GIF and PCX from a TBLOBField.
-
- TDBMULTIMEDIA has the same functions as the data-aware TDBMultiImage with
- the following additions:
-
- TDBMULTIMEDIA will automatically enable/disable the playback of
-
- AVI: If video for windows isn't installed;
- MOV: If quicktime for windows isn't installed;
- WAV: If no soundsupport is installed;
- RMI: If no midi playback drivers are installed;
- MID: If no midi playback drivers are installed.
-
- -----------------------------------------------------------------------
-
- function GetMultiMediaExtensions : String;
-
- This function will return all multimedia extensions from the computer
- which running your app. supports in the filedialog filter format.
-
- Example
- ----------
- procedure TBtnBottomDlg.BitBtn1Click(Sender: TObject);
- begin
- {fill the OpenDialog filter with the MM extensions as found in the win.ini
- (This means that the appropriate drivers are installed)}
- OpenDialog1.filter:=DBMultiMedia1.GetMultiMediaExtensions;
-
- {Execute the open dialog box}
- if OpenDialog1.Execute then begin
-
- {Place the Database in append mode}
- Table1.Append;
-
- {Load the Multimedia into the Blob}
- DBMultiMedia1.LoadfromFile(OpenDialog1.FileName);
-
- {Post that thing}
- Table1.Post;
- end;
-
- For instance on my computer it returns:
-
- 'All MultiMedia|*.bmp;*.gif;*.pcx;*.jpg;*.wav;*.mid;*.rmi;*.avi;*.mov;|
- BMP Files|*.bmp|
- GIF Files|*.gif|
- JPG Files|*.jpg|
- PCX Files|*.pcx|
- Wave Files|*.wav|
- Midi Files|*.mid|
- RMI Files|*.rmi|
- AVI Files|*.avi|
- Movie Files|*.mov'
-
- If you run the example file incuded in the zip; MMBLOB you will notice the
- append MM dialogbox contains all the Multimedia supported by the VCL and
- your PC.
- -----------------------------------------------------------------------
-
- property PathForTempFile
-
- If directory or drive doesn't exists it defaults to C:\
-
- TDBMULTIMEDIA saves its blobs first to a temporary file before it is
- being played and then deletes the temporary file. The reason is that in
- average multimedia blobs are too large in size to be played from memory.
-
- Your application might be distributed and executed from a CD. In order
- to write a temporary file you need the supply a directory and drive.
-
- Example
- ---------
- procedure TBtnBottomDlg.FormCreate(Sender: TObject);
- begin
-
- DBMultiMedia1.PathForTempFile:='C:\TEMP';
-
- end;
-
- -----------------------------------------------------------------------
- property AutoPlayMultiMedia
-
- If AutoDisplay is true then the multimedia is played automatically;
-
- Example
- ---------
- procedure TBtnBottomDlg.FormCreate(Sender: TObject);
- begin
-
- DBMultiMedia1.AutoPlayMultiMedia:=true;
-
- end;
-
- -----------------------------------------------------------------------
- property AutoRePlayMultiMedia
-
- If AutoDisplay is true then the multimedia is replayed automatically;
-
- Example
- ---------
- procedure TBtnBottomDlg.FormCreate(Sender: TObject);
- begin
-
- DBMultiMedia1.AutoRePlayMultiMedia:=true;
-
- end;
- -----------------------------------------------------------------------
-
- property AutoHideMediaPlayer
-
- If the blobfield doesn't contains multimedia it will hide the attached
- MediaPlayer automatically.
-
- Example
- ---------
- procedure TBtnBottomDlg.FormCreate(Sender: TObject);
- begin
-
- DBMultiMedia1.AutoHideMediaPlayer:=true;
-
- end;
-
- -----------------------------------------------------------------------
- property MediaPlayer:
-
- The ImageLib comes with its own DBmediaplayer directly derived from
- Tmediaplayer. You need to drom one on your form and set the property
- MediaPlayer to for instance: DBmediaplayer1.
-
- DON'T ATTACH ANY FILENAME TO IT AND SET AUTOOPEN TO FALSE, DBMultiMedia
- will take care of opening and closing the meiaplayer.
-
- In order to display the video in the exact retangle of your DBMultiMedia
- you'll need to supply a display and rect to the DBMediaPlayer.
-
- EXAMPLE
- ---------
-
- Set the Video display rectangle to the rectangle of the blob window}
- BMediaPlayer1.DisplayRect:=Rect(0,0,DBMultiMedia1.Width,DBMultiMedia1.Height);
-
- {Set the Video display to the the display of the blob window}
- DBMediaPlayer1.Display:=DBMultiMedia1;
-
- -----------------------------------------------------------------------
-
-
-
-
-
-
-
- -----------------------------------------------------------------------
- Image Read Formats Supported:
-
- JPEG
- GIF
- PCX
- BMP
- WMF (Delphi Inherited)
- ICO (Delphi Inherited)
-
- Image Write Formats Supported:
-
- JPEG
- BMP
- WMF (Delphi Inherited)
- ICO (Delphi Inherited)
-
- PASCAL AND DELPHI DLL Calls
-
- No enhanced documentation provided with the shareware version.
-
- PASCAL AND DELPHI LIBRARY INTERFACE Calls
-
- The dll functions above are translated using DLL20LIN.PAS:
-
- ----------------------------------------------------------------------
-
- Unit DLL20LIN;
-
- {Copyright Jan Dekkers / Kevin Adams}
-
- interface
-
- uses
- WinTypes, Graphics, SYSUtils, Dialogs;
-
- type
- TCallBackFunction = procedure(i:integer);
-
-
- {Interface call. GetMultiBitmap, for usage example}
- Function jpgfile(filename : String;
- resolution : integer;
- option : integer;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
- {Interface call. SaveAsJpg, for usage example}
- Function putjpgfile(filename : String;
- quality : integer;
- smooth : integer;
- Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
-
- {Interface call. SaveAsBMP, for usage example}
- Function putbmpfile(filename : String;
- Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
-
- {Interface call. GetMultiBitmap, for usage example}
- Function giffile(filename : string;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
-
- {Interface call. GetMultiBitmap, for usage example}
- Function bmpfile(filename : string;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
-
- {Interface call. GetMultiBitmap, for usage example}
- Function pcxfile(filename : string;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
-
- {Interface call. LoadPicture, for usage example}
- Function jpgblob(filePoint : Pointer;
- Size : LongInt;
- resolution : integer;
- option : integer;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction): Boolean;
-
- {Interface call. LoadPicture, for usage example}
- Function gifblob(filePoint : Pointer;
- Size : LongInt;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction): Boolean;
-
- {Interface call. LoadPicture, for usage example}
- Function pcxblob(filePoint : Pointer;
- Size : LongInt;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction): Boolean;
-
- {Interface call. LoadPicture, for usage example}
- Function bmpblob(filePoint : Pointer;
- Size : LongInt;
- var Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction): Boolean;
-
- {Interface call. UpdateData, for usage example}
- Function putjpgblob(filePoint : Pointer;
- var Size : LongInt;
- quality : integer;
- smooth : integer;
- Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
- {Interface call. UpdateData, for usage example}
- Function putbmpblob(filePoint : Pointer;
- var Size : LongInt;
- Bitmap : TBitmap;
- CallBackFunction : TCallBackFunction) : Boolean;
-
- {Interface call. GetInfoAndType, for usage example}
- Function GetBlobInfo(filePoint : Pointer;
- Size : LongInt;
- var FileType : String;
- var Fwidth : Integer;
- var FHeight : Integer;
- var Fbitspixel : Integer;
- var Fplanes : Integer;
- var Fnumcolors : Integer;
- var Fcompression : String) : Boolean;
-
- {Interface call. GetInfoAndType, for usage example}
- Function GetFileInfo(fileName : String;
- var FileType : String;
- var Fwidth : Integer;
- var FHeight : Integer;
- var Fbitspixel : Integer;
- var Fplanes : Integer;
- var Fnumcolors : Integer;
- var Fcompression : String) : Boolean;
-
- {DLL call}
- Function readjpgstream(filePoint : Pointer;
- Size : LongInt;
- resolution : integer;
- scale : integer;
- option : integer;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction: TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function readjpgfile(filename : pchar;
- resolution : integer;
- scale : integer;
- option : integer;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function writejpgfile(filename : pchar;
- quality : integer;
- smooth : integer;
- password : integer;
- hBmp : HBitmap;
- hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
-
- {DLL call}
- Function writebmpfile(filename : pchar;
- password : integer;
- hBmp : HBitmap;
- hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function readgiffile(filename : pchar;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function readbmpfile(filename : pchar;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function readpcxfile(filename : pchar;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function readpcxstream(filePoint : Pointer;
- Size : LongInt;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction: TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function readbmpstream(filePoint : Pointer;
- Size : LongInt;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction: TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function readgifstream(filePoint : Pointer;
- Size : LongInt;
- password : integer;
- var hBmp : HBitmap;
- var hPal : HPalette;
- CallBackFunction: TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function streaminfo(filePoint : Pointer;
- Size : LongInt;
- FileType : PChar;
- var Fwidth : Integer;
- var FHeight : Integer;
- var Fbitspixel : Integer;
- var Fplanes : Integer;
- var Fnumcolors : Integer;
- Fcompression : PChar) : byte; Far;
-
- {DLL call}
- Function fileinfo(filename : PChar;
- FileType : PChar;
- var Fwidth : Integer;
- var FHeight : Integer;
- var Fbitspixel : Integer;
- var Fplanes : Integer;
- var Fnumcolors : Integer;
- Fcompression : PChar) : byte; Far;
-
- {DLL call}
- Function writejpegstream(filePoint : Pointer;
- var Size : LongInt;
- quality : integer;
- smooth : integer;
- password : integer;
- hBmp : HBitmap;
- hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
- {DLL call}
- Function writebmpstream(filePoint : Pointer;
- var Size : LongInt;
- password : integer;
- hBmp : HBitmap;
- hPal : HPalette;
- CallBackFunction : TCallBackFunction) : byte; Far;
-
-
- implementation
- {The implementation part of DLL20LIN.PAS which includes the password
- will be supplied to you upon registration.
-
- -----------------------------------------------------------------------
-
- How to register
-
- GO SWREG. ID = 6791. Registration using SWREG is $69.-.
-
- To register by mail send a check or moneyorder of $65.- to :
-
- Jan Dekkers
- 11956 Riverside Drive, 206
- North Hollywood CA 91607
-
- You will receive the DLL20LIN.PAS and a password to access the DLL.
- This will eliminate the shareware messages.
-
- -----------------------------------------------------------------------
-
- I just would like to say a few nice words about Turbopower. I've used
- Turbopowers' products for over 4 years now and am very impressed with their
- state of the art development libraries. Their technical support is the best
- I have ever experienced. They provide a good example for Kevin and me of how
- to do business and how to treat customers.
-
- Turbopower's products:
-
- Async Professional, B-Tree Filer, Object Professional, TSRs
- Turbo Analyst, Turbo Professional, Data Entry Workshop
- Win/Sys Library, and their latest great Delphi product, Orpheus
-
- on CompuServe, Go PCVENB to download their free trial libraries.
-
- Contacting TurboPower Sales
- ----------------------------
- Telephone : 800-333-4160 (sales in the U.S. & Canada)
- 719-260-9136 (international sales)
- 719-260-7151 (fax)
- CompuServe : 76004,2611
- Internet : 76004.2611@compuserve.com
- Postal mail : TurboPower Software
- P.O. Box 49009
- Colorado Springs, CO 80949-9009
-
- _________________________________________________________________________
-
- Gif and Tiff uses LZW compression which is patented by Unisys. On CompuServe
- GO PICS to obtain information about the Unisys patents. This work "jpeg file
- i/o" is based in part on the Independent JPEG Group
-