Lo único que se me ocurre, es que no hayas creado el memoryStream en el constructor de tu objeto, y por tanto obtengas access violations. Tal y como lo veo sería algo así:
Código Delphi
[-]
Type TDatos = class
private
FStream:TMemoryStream;
procedure SetFStream(const Value:TMemoryStream);
function GetFStream:TMemoryStream;
public
constructor Create;
codigo,
marca,
rubro,
producto : string;
property imagen : TMemoryStream read GetFStream write SetFStream; end;
implementation
constructor TDatos.Create;
begin
FStream := TmemoryStream.Create;
end;
procedure TDatos.SetFStream(const Value:TMemoryStream);
begin
if not Assigned(Value) then
raise Exception.Create('no se ha suministrado un Flujo de datos válido');
Value.SaveToStream(FStream);
function TDatos.GetFStream:TMemoryStream;
begin
Result := TMemoryStream.Create;
FStream.SavetoStream(Result);
end;