Width and Height of image too large

Post Reply
R. Eisenkolb
Posts: 2
Joined: Fri May 14, 2021 8:13 am

Width and Height of image too large

Post by R. Eisenkolb »

Hi Salvador,
we use chromium/cef4d to display HTML emails. We never had problems with this.
But now we got a customer email. The special is an referred image "Mockup Raumtrenner.png" whose width x height is 11220 x 11220.

<img apple-inline="yes" id="5311BFB4-D5CF-429E-9499-1A03E37A878F" src=".\.\Mockup Raumtrenner.png" class="">

Chromium starts loading the HTML file but it stays blank. No OnLoadEnd event is fired. No error appears.

The image file is about 10 MB big, but this is not the problem.
If I downscale the PNG with "Microsoft Photos" to 4000 x 4000 then the browser loads correctly an the PNG-image is shown.
The process of downscales results in a file size about 12 MB. This means it became larger, nevertheless then everything is ok.

Seems that only the large width and height prevent chromium from loading but not he large file size.

IMAGE_FILE_LARGE_ADDRESS_AWARE is already set.

I activated the logging of Chromium and attached two files:
chromium_err.txt -> original image 11220 x 11220, file size 10 MB
chromium_ok.txt -> downscaled image 4000 x 4000, file size 12 MB

Maybe you can see anything in the logfiles.
if neccessary I will ask the customer for publishing his email and add it here.

Thanks in advance
Reinhard
You do not have the required permissions to view the files attached to this post.
User avatar
salvadordf
Posts: 3067
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Width and Height of image too large

Post by salvadordf »

R. Eisenkolb wrote: Wed Jun 09, 2021 1:01 pm The special is an referred image "Mockup Raumtrenner.png" whose width x height is 11220 x 11220.
That image is huge! :shock:

A decompressed 32 bits bitmap with that size would use more than 480 MB of RAM.

Try to load that image in the same version of Chrome but I guess it will also remain blank.

I can't find a definitive answer about the maximum image size supported by Chromium but I wouldn't be surprised if that PNG surpassed it.
R. Eisenkolb
Posts: 2
Joined: Fri May 14, 2021 8:13 am

Re: Width and Height of image too large

Post by R. Eisenkolb »

Hello Salvador,
thanks for your answer.

The problem here is, that the whole page is not displayed.
Other than showing a placeholder for the image when blocking external content.
And it takes some time until Chromium has finished loading.

In Chrome the same html code is loaded fast and the image is shown.
Since we have this behaviour in an email environment the email with this html content is displayed with image in Thunderbird and in Outlook.

I don't know if the PNG compression is the only reason for the image size of 10 MB or if the image is upscaled because of the hight height and width values.
The customer who notified the problem checks for an email we can publish.
I will recall if he got one.

Thanks for the moment.
Regards
Reinhard
User avatar
salvadordf
Posts: 3067
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Width and Height of image too large

Post by salvadordf »

Try the official CEF sample application with the same CEF version and OS that you used in your application. Use the 32 bits version for Windows if your application was built as a 32 bits app.

https://cef-builds.spotifycdn.com/index.html

Download the sample application, decompress it and run cefclient.exe
Then try to load that image with cefclient.

If cefclient can show the image contents then I would need a lot more details about the CEF configuration in your application and a sample image to reproduce this issue in my computer.
Post Reply