Closed hcort closed 2 years ago
Add this to the DPR file of your application :
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
https://github.com/salvadordf/CEF4Delphi/blob/44e61874dd81b5059ecfacd8c69c21ee10000c65/demos/Delphi_VCL/SimpleBrowser/SimpleBrowser.dpr#L53
CEF needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM. If you don't add this flag the rederer process will crash when you try to load large images.
IMAGE_FILE_LARGE_ADDRESS_AWARE is defined in Winapi.Windows and it has a value of $20. Some demos just use this line to avoid adding Winapi.Windows to the uses clause :
{$SetPEFlags $20}
https://github.com/salvadordf/CEF4Delphi/blob/44e61874dd81b5059ecfacd8c69c21ee10000c65/demos/Delphi_VCL/SubProcess/SimpleBrowser_sp.dpr#L47
I've found that trying to open large images results in a blank browser.
This is some image I'm using for test purposes: https://i.imgur.com/izXp9qR.jpg
This is a small sample code to reproduce the error:
The image renders ok in chromium.