Recent

Author Topic: FortesReport image rendering problems  (Read 2246 times)

JD

  • Hero Member
  • *****
  • Posts: 1848
FortesReport image rendering problems
« on: January 17, 2019, 02:03:10 pm »
Hi there everyone,

I have a report that I created using FortesReport running perfectly for about 7 years now.

However now whenever I try to run the report, it shows a blank page. When I debug the application, I get an error saying Bitmap with unknown compression. See attached image.

The report runs fine if I remove the image which is a company logo but that is not an ideal solution.

Can anyone help me resolve this problem?

Thanks,

JD



Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: FortesReport image rendering problems
« Reply #1 on: January 17, 2019, 03:24:46 pm »
There have been added some defines lately for conditionaly compiling in supported image formats. Can't find documentation atm.
Maybe there is something missing in your executable now.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: FortesReport image rendering problems
« Reply #2 on: January 17, 2019, 03:29:56 pm »
Found it: http://wiki.freepascal.org/Lazarus_2.0.0_release_notes

Compiler defines to exclude some graphics support

Added flags to exclude support for some graphics formats to create smaller applications:

    -dDisableLCLGIF
    -dDisableLCLJPEG
    -dDisableLCLPNM
    -dDisableLCLTIFF
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: FortesReport image rendering problems
« Reply #3 on: January 18, 2019, 07:38:37 am »
@Pascal

Thanks for the info. Do you know how I can solve the problem or must I recompile Lazarus with those flags enabled?

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: FortesReport image rendering problems
« Reply #4 on: January 18, 2019, 08:43:43 am »
After analysing the source (lcl\intfgraphics.pas), which raise the exception, i could think of an endianess problem
inside the bitmap info header. It reports 8192 which is 2 if you swap endianess and that is an valid compression format.

Maybe you can send the image by pm to me.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: FortesReport image rendering problems
« Reply #5 on: January 19, 2019, 03:12:37 pm »
After analysing the source (lcl\intfgraphics.pas), which raise the exception, i could think of an endianess problem
inside the bitmap info header. It reports 8192 which is 2 if you swap endianess and that is an valid compression format.

Maybe you can send the image by pm to me.

Thanks Pascal. I cannot send the image due to confidentiality restrictions in the contract I have with the company.

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

 

TinyPortal © 2005-2018