Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change JPG size

Status
Not open for further replies.

Regany

Programmer
Aug 27, 2004
72
LV
How to change JPG size with delphi and put it in DB?


I was trying with something like this:
////////////////////////
var
jpg: TJpegImage;


......

if openpicturedialog1.Execute then
begin
jpg:= TJpegImage.Create;
try
jpg.Loadfromfile( openpicturedialog1.filename );
if jpg.Height>jpg.Width then
begin
jpg.Height:=round(jpg.Height/20);
jpg.Width:=round(jpg.Width/20);
end;
EDBImage1.Picture.LoadFromFile(openpicturedialog1.FileName);
finally
jpg.Free;
end;


////////////////////////
but error accrue - cannot change size of JPEG image!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top