Hi Harry
Rather than the undocumented GetFitValue, use the new methods, GetIdealZoom.
TImageEnView.GetIdealZoom
Declaration
function GetIdealZoom(): Double; overload;
procedure GetIdealZoom(out x, y: double); overload;
Description
Returns the best zoom value to stretch the image to fit within the component. If second overload is used, independent Zoom values are given for x and y.
Note: If the image is empty, result will be zero.
Example
// Both the following code snippets will have the same result
ImageEnView.Zoom := ImageEnView.GetIdealZoom;
// or
ImageEnView.Fit;
// Zoom to fit width
ImageEnView.GetIdealZoom( ZoomX, ZoomY );
ImageEnView.Zoom := ZoomX;
Nigel
Xequte Software
www.xequte.com
nigel@xequte.com