RPSImage

© Copyright 2006 MCoP
vahid_you2004@yahoo.com



Contents


Installation

  1. Run Delphi.
  2. Choose "Install Packages..." from "Component" menu.
  3. Click "Add" button.
  4. Select "RPSImg.bpl"
  5. Click OK.

Top


Using

Just add "RPSImage" to uses.
After installation RPS extension will be added to TPicture(TImage Control), TOpenPictureDialog, and TSavePictureDialog automatically.

Top


Convert RPS to other formats

To convert an rps to bitmap use following code:

procedure TForm1.LoadClick(Sender: TObject);
var
 r:TRPSImage;
 b:TBitmap;
begin
b:=TBitmap.Create;
r:=TRPSImage.Create;
r.LoadFromFile('RPSImage.rps');
b.Assign(r);
b.SaveToFile('Bitmap.bmp');
r.Free;
b.Free;
end;

To convert other formats to rps replace TBitmap with their image class for example (b:TJpegImage).

Top


Convert other formats to RPS

To convert a bitmap to rps use following code:

procedure TForm1.SaveClick(Sender: TObject);
var
 r:TRPSImage;
 b:TBitmap;
begin
b:=TBitmap.Create;
r:=TRPSImage.Create;
b.LoadFromFile('Bitmap.bmp');
r.Assign(b);
r.SaveToFile('RPSImage.rps');
r.Free;
b.Free;
end;

To convert other formats to rps replace TBitmap with their image class for example (b:TJpegImage).

Top


RPSImage and Clipboard

Add "ClipBrd" to uses in order to use the clipboard then use following codes:

procedure TForm1.CopyClick(Sender: TObject);
var r:TRPSImage;
begin
r:=TRPSImage.Create;
r.LoadFromFile('RPSImage.rps');
ClipBoard.Assign(r);
r.Free;
end;

procedure TForm1.PasteClick(Sender: TObject);
var r:TRPSImage;
begin
r:=TRPSImage.Create;
r.Assign(ClipBoard);
r.SaveToFile('RPSImage.rps');
r.Free;
end;

Top


Source Code

You can buy RPSImage Source Code from http://mcop.netfirms.com/order.html?id=8

Top


Visit MCoP website: Delphi programs, components, and web scripts with source code.