Here is a competing answer for you, with less data juggling (remember, images can be large!)
type
TJPEGExposed = class(TJPEGImage);
procedure TForm1.FormClick(Sender: TObject);
var
JPEGImage: TJPEGImage;
const
jqCrappy = 1;
begin
Image1.Picture.Bitmap.LoadFromFile(GetDeskWallpaper);
Image2.Picture.Graphic := TJPEGImage.Create;
JPEGImage := Image2.Picture.Graphic as TJPEGImage;
JPEGImage.Assign(Image1.Picture.Bitmap);
JPEGImage.CompressionQuality := jqCrappy;
JPEGImage.Compress;
TJPEGExposed(JPEGImage).FreeBitmap; { confer: TBitmap.Dormant }
end;
TJPEGImage.FreeBitmap DIB, TJPEGImage. .Compress 'ed JPEG TImage .