Hi,
I'm using TFileUpload to upload a image from phone. Is there a way to resize image on client side before upload it to server?
Thanks in advance,
Omar Zelaya
procedure SomeEvent;
var Jpeg : TJpegImageEx; (uses ccr.exif)
ratio : double;
newwidth : integer;
begin
Jpeg := TJpegImageEx.Create;
try
jpeg.LoadFromFile(your file name);
ratio := Jpeg.Height/Jpeg.Width;
newwidth := ???; //this could be a constant value, or the width of the form...
IWImageFile1.Width := newwidth;
IWImageFile1.Height := Trunc(newwidth*ratio);
finally
Jpeg.Free;
end;
end;