Hi All,
I am using the code below to crop an image and then to resize the image. This is working fine. The only issue I have is it doesn't seem to update the thumbnail. I ran the code and then checked the images in windows explorer. At first I didn't think it had worked, as all the images were the same. But when I opened the image, it was cropped and resized correctly.
How do I make sure the thumbnail is also updated?
Thanks,
Paul
// imgDest is a TImageEnView
//crop and resize file
Crop_Margin := eSize.Value;
imgRect := imgDest.Proc.AutoCrop( 0, clWhite, False );
imgDest.Proc.Crop( max( imgRect.Left - Crop_Margin, 0 ),
max( imgRect.Top - Crop_Margin, 0 ),
min( imgRect.Right + Crop_Margin, imgDest.IEBitmap.Width ),
min( imgRect.Bottom + Crop_Margin, imgDest.IEBitmap.Height ) );
w := FltToInt(eWidth.Value);
h := FltToInt(eHeight.Value);
if eFilter.Itemindex <> -1 then begin
if (w > 0) and (h > 0) then begin
imgDest.Proc.Resample(w, h, TResampleFilter(eFilter.Itemindex));
end;
end;
// save destination file
imgDest.IO.SaveToFile(outFile);