Description: const
maxWidth = 200
maxHeight = 150
var
thumbnail : TBitmap
thumbRect : TRect
begin
thumbnail := Form1.GetFormImage
try
thumbRect.Left := 0
thumbRect.Top := 0
//proportional resize
if thumbnail.Width > thumbnail.Height then
begin
thumbRect.Right := maxWidth
thumbRect.Bottom := (maxWidth * thumbnail.Height) div thumbnail.Width
end
else
begin
thumbRect.Bottom := maxHeight
thumbRect.Right := (maxHeight * thumbnail.Width) div thumbnail.Height
end
thumbnail.Canvas.StretchDraw(thumbRect, thumbnail)
//resize image
thumbnail.Width := thumbRect.Right
thumbnail.Height := thumbRect.Bottom
//display in a TImage control
Image1.Picture.Assign(thumbnail)
finally
thumbnail.Free
end
end
To Search:
File list (Check if you may need any files):
ColorLines.cfg
ScreenColorLines.dfm
ColorLines.dpr
BresenhamLibrary.PAS
ScreenColorLines.pas
SpectraLibrary.pas
ColorLines.dof
ColorLines.res