Digikam does not preview large TIFF files in MacOS because of lack of enough memory. It is difficult to define a threshold because it fails with scanned images (Epson Photo Perfection hardware) of about 30MB but works with files of 55MB. Nevertheless, it always fails with files about 90MB of size. OS X console output shows: Jul 8 20:27:52 macbook [0x0-0x1d01d].digikam[221]: digikam(221)/digikam (core): Not enough memory to allocate buffer of size 147021488 Jul 8 20:27:52 macbook [0x0-0x1d01d].digikam[221]: digikam(221)/digikam (core) Digikam::PreviewLoadingTask::execute: Cannot extract preview for "/Users//img127.tif" Jul 8 20:27:53 macbook [0x0-0x1d01d].digikam[221]: digikam(221)/digikam (core): Not enough memory to allocate buffer of size 135233008 Jul 8 20:27:53 macbook [0x0-0x1d01d].digikam[221]: digikam(221)/digikam (core) Digikam::PreviewLoadingTask::execute: Cannot extract preview for "/Users/img126.tif" Reproducible: Always Steps to Reproduce: 1. Go to an album with large TIFF files (about 90 MB always fails) 2. Digikam does not show any preview 3. Try to open an image also fails. Actual Results: No preview available. Expected Results: Show the images preview.
Can you share your tiff image to test in local ? Gilles Caulier
I can share one of the files with problem. But where should I uploads them? Can I attach directly to the bug entry? The files may be as large as 90MB.
Please use a web share service. Bugzilla is limited to 1Mb of attachment
File upload to: http://www.2shared.com/photo/SlbRZJR8/img128.html? Password: digikam
File can be previewed properly under Linux... No memory allocation problem...
Yes, the problem appears to be only in OS X.
Version 2.7.0 still has the bug.
It also occures on OpenSuse 12.1 with DK 2.7.
I did some new tests now using the Digikam 2.9 version. Converted a problematic TIFF file to PNG and RAW with no success either. However, when converting to JPG, Digikam could show the image (thumbnail and larger image). Notes: - Conversion done using Photoshop. - The converted JPG has only 8 bits per channel, while the original file has 16. Therefore, one conclusion here is that the problem is not related to only TIFF files, but also PNG and RAW. Should we change the bug title?
Git commit b29bbdfd46df01dccac6058a7a2860cd84026caa by Gilles Caulier. Committed on 22/02/2013 at 14:07. Pushed by cgilles into branch 'master'. new behavor about KMemoryInfo: Check if memory info from current platform is supported or not (for ex, MacOSX is not support) If not, -1 is returned from memory parser. In this case, digiKam will try to continue to allocate memory. An error message is printed to the console as debug statement. If yes, we try to check memory info. If an error occur, 0 is returned, else 1. This will solve multiple issues from bugzilla about non show large images in preview or editor, if memory allocation to store decompressed pixels data is more than 100Mb Related: bug 314260 M +6 -6 libs/3rdparty/kmemoryinfo/kmemoryinfo.cpp M +5 -2 libs/3rdparty/kmemoryinfo/kmemoryinfo.h M +80 -44 libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp M +10 -3 libs/dimg/loaders/dimgloader.cpp M +15 -2 libs/dimg/loaders/dimgloader.h http://commits.kde.org/digikam/b29bbdfd46df01dccac6058a7a2860cd84026caa