Con el permiso de
dec voy a añadir un poco de codigo a la explicacion que te dio.
Código Delphi
[-]
uses JPEG;
procedure Redimensionar(Imagen: TJPEGIMage; Ancho, Alto: Integer);
var
Bitmap: TBitmap;
begin
Bitmap:= TBitmap.Create;
try
Bitmap.Width:= Ancho;
Bitmap.Height:= Alto;
Bitmap.Canvas.StretchDraw(Bitmap.Canvas.ClipRect,Imagen);
Imagen.Assign(Bitmap);
finally
Bitmap.Free;
end;
end;
Para usar esta funcion solo tienes que pasarle como parametros la imagen y las nuevas dimensiones. Algo asi:
Código Delphi
[-]
var
Jpg: TJPEGImage;
begin
Jpg:= TJPEGImage.Create;
try
Jpg.LoadFromFile('C:\Original.jpg');
Redimensionar(Jpg,100,100);
Jpg.SaveToFile('C:\Copia.jpg');
finally
Jpg.Free;
end;
end;
O como en tu caso algo asi:
Código Delphi
[-]
var
Jpg: TJPEGImage;
begin
Jpg:= TJPEGImage.Create;
try
Jpg.LoadFromFile('loquesea.xxx');
Redimensionar(Jpg,100,100);
jvdbimage1.picture.Assign(Jpg);
finally
Jpg.Free;
end;
end;