I'm using TBitmap to load 8-bit bitmaps, rotate them and display windowed parts of the rotated bitmap. My problem is that the following lines raise an "stream read error" exception when the size of the bitmap is too big (e.g. 2048x3072):
- Code: Select all
ImageToRotate := TBitmap.Create;
ImageToRotate.Width := 2048; ImageToRotate.Height := 3072;
try
ImageToRotate.LoadFromFile(FBitmapFileName); //This line raises the exception
except
on E: Exception do
begin
ShowMessage(E.Message);
Exit;
end;
end;
Smaller files generated from the same bitmap using photoshop or cropping with Paint load without any problems.
Any Suggestions?