Hola.
Una opcion para obtener los valores del ancho y alto de la imágen almacenada en el campo 'FOTO' es:
Código Delphi
[-]
function ImageFieldWidthHeight(aField: TField): TPoint;
var
BF: TBlobField;
GR: TGraphic;
FS: Word;
st: string;
begin
BF := TBlobField(aField);
CopyMemory(@FS, @BF.Value[1], SizeOf(FS));
st := IntToHex(FS, 4);
GR := TGraphic.Create;
try
if st = '4D42' then GR := TBitmap.Create
else if st = 'D8FF' then GR := TJPEGImage.Create
else if st = '0000' then GR := TIcon.Create
else raise Exception.Create('Formato de imágen no soportado');
GR.Assign(BF);
Result := Point(GR.Width, GR.Height);
finally
GR.Free;
end;
end;
Uso:
Código Delphi
[-]
...
var
p: TPoint;
begin
p := ImageFieldWidthHeight(Query.FieldByName('FOTO'));
ShowMessageFmt('Width:%5d%sHeight:%5d', [p.X, #10, p.Y]);
...
Saludos