Search code examples
delphifastreport

Is there are any size limit of delphi load the image?


My program need to load some image by path. I have success load some image but i have a very large image, 7.24MB and 4080*4080.

When my program load this large image, it will get a error message:

Access violation at address 006629A9 in module 'myprogram.exe'. write of address XXXXXXXX

Is there are any size limit in delphi? If yes, could you tell me the maximum size of the image?

I have try to find the solution but not found.

Update:

Here is the code that loads the image:

Pic_item.Picture.LoadFromFile(<dsCompany."Image_path">); 

In dsCompany i have a full path of the image and only this one code to load the image, it is code at DetailBandBeforePrint. Other image also successfully load into my report, only this large image is fail.


Solution

  • No, there is no image size limit in Delphi other then limitations imposed by operating system or by available physical memory, and 7MB could not be such a limit.

    Access voilation error may have many reasons - (quite possible) bugs in your own code, (less possible) bug in fastreport code or even (least possible) bugs in Delphi runtime libraries.

    The only solution to your problem is to debug the source code. Good thing that AV is reproducible on large files though it may take time to find the bug.