Skip to content

FCL-image, decompression very large tiff results in heap error 203

Summary

The attached sample application can display TIFF images up to at least 40000x40000 pixels. However when a TIFF file is compressed it gives an heap error (203) for images with dimensions above 10000x10000 pixels. Can this be fixed in FCL-image? Loading of a uncompressed tiff image of 40000x40000 is no problem. Saving an uncompressed image as compressed is also no problem.

The problem becomes apparent for images with dimensions above 10000x10000 pixels. The following images are included with the sample project:

Loads with NO ERROR:

test 10000x10000 grayscale 16bit zip compression.tif

test 20000x20000 grayscale 16bit uncompressed.tif

Result in heap ERROR:

test 20000x20000 grayscale 16bit zip compression.tif

Mozart 20000x20000 grayscale 16bit zip compressed.tif

System Information

I have 32 gbyte memory installed

  • Operating system:

  • Processor architecture:

    X86_64

  • Compiler version:

    Lazarus 4.0 (rev lazarus_4_0) FPC 3.2.2 x86_64-win64-win32/win64

  • Device:

    Computer

Steps to reproduce

Use attached sample program

Example Project

fcl-image_test_application.zip

What is the current bug behavior?

Heap error 203 during decompression TIFF

What is the expected (correct) behavior?

No error

Relevant logs and/or screenshots

Possible fixes

Edited by han k
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information