Diese Funktion hat bisher unter Delphi 10.2.2 wunderbar funktioniert, in Rio 10.3 kracht es beim Assign mit Code=1285 GL_OUT_OF_MEMORY
Was hat sich in Rio bzw. im
SDK geändert ? Jemand eine Idee ?
Delphi-Quellcode:
function SaveToJPEGStream(aStream: tStream; SourceBitmap: Tbitmap): boolean;
var
SurfBMP : TBitmapSurface;
saveParams: TBitmapCodecSaveParams;
begin
result := false;
SurfBMP := TBitmapSurface.Create;
try
SurfBMP.Assign(SourceBitmap);
saveParams.Quality := 85;
Result := TBitmapCodecManager.SaveToStream(aStream, SurfBMP, 'JPG', @saveParams);
finally
SurfBMP.Free;
end;
end;