Mike Chaney's Tech Corner

Mike's Software => Qimage Ultimate => Topic started by: Just_user on March 15, 2022, 09:23:08 AM



Title: Qimage cannot display the preview images for some files
Post by: Just_user on March 15, 2022, 09:23:08 AM
Hi all,

On version 2022.120, I encountered a problem that Qimage in the image preview window (on the left side of the program interface window) cannot display the preview image for some files.

Specifically, problems arise in the following cases:
 1. SOME .png format files that were created in Adobe Lightroom 6.14,
 2. SOME .tif files exported from Affinity Photo (1.10.5 build 1342 - latest up to date)
In the 1st case, the inscription "Loading" or "Image Read Error" hangs on the file image.
In the 2nd case - instead of an image, just a mixture of black and white dots is shown.


With what it can be connected ?


Title: Re: Qimage cannot display the preview images for some files
Post by: Fred A on March 15, 2022, 10:09:04 AM
Quote
Specifically, problems arise in the following cases:
 1. SOME .png format files that were created in Adobe Lightroom 6.14,
 2. SOME .tif files exported from Affinity Photo (1.10.5 build 1342 - latest up to date)
In the 1st case, the inscription "Loading" or "Image Read Error" hangs on the file image.
In the 2nd case - instead of an image, just a mixture of black and white dots is shown.

Good morning.
This sounds like a file header problem which only Mike can sort out.
We will have to wait for Mike to get to the office.
In the meantime, is there any chance of either file being under 20 MB so it can be emailed to Mike?
If the file is larger than that, can you use a file transfer service like We Transfer and send the link to Mike?
That is a free service.
Fred


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 15, 2022, 01:39:32 PM
My initial guess would be that the PNG is in some unsupported format and some of your TIFFs may be too large.  I see a lot of panoramas in your thumbnails and many times people will make those much larger than they need to be for the size being printed.  QU has an upper limit of about 2GB for image size which is measured by X res * Y res * 3 for 8 bit images or X res * Y res * 6 for 16 bit images.

When using many photos stitched together, my advice would be to save at a resolution that is appropriate for the print size.  For example, if you are printing a panorama that is 24 inches tall, you could save at 300 PPI, 8 bits/channel and have a 24 inch by 150 inch (12.5 foot) panorama and still be under 1GB in file size.

Regards,
Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 15, 2022, 02:24:28 PM
Thank you for an answers....

I immediately wanted to make an amendment - the problem is not with the .png format, but with the .DNG format

Yes, unfortunately, the files are very large - they are stitched panoramas ~ 250 MB.

Here are the dimensions of panoramic shots:
 - displayed in Qimage preview
    DNG, 9491 x 3647, 240 DPI, 125 MB (exported from Adobe Lightroom)

 - displayed in Qimage preview
    TIF, 9491 x 3647, 240 DPI, 16 bit 164 MB (exported from Adobe Lightroom)

 - displayed in Qimage preview
   JPG, 12280 x 3647, 240 DPI, 16 bit, 29.6 MB (exported from Adobe Lightroom)

 - not shown in Qimage preview
    TIF, 12280 x 3647, 240 DPI, 32 bit, 239 MB (exported from Affinity Photo)

 - not shown in Qimage preview
    DNG, 17176 x 3631, 240 DPI, 226 MB (exported from Adobe Lightroom)

How many bits / channel contains a dng-file - I find it difficult to say, because Windows Explorer gives incorrect information.
But according to my calculations, the files do not exceed the size of 2 GB....


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 15, 2022, 04:39:28 PM
Those are all relatively small so they should pose no problem WRT size.  The DNG is a raw format, usually 16 bits/channel but I've not found a DNG that won't load.  If you could provide a link to a sample I can take a look.

Regards,
Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 16, 2022, 02:04:50 PM
Here are the download links (I uploaded files to 2 file sharing sites). On 2 sites - in order to duplicate just in case. And so, the files are the same on both sites ...

https://gofile.io/d/T0KMax
 or
https://www.mediafire.com/folder/h9kyab8o399ut/Qimage


There are 2 files - with the extension DNG and TIF.
PLEASE - check both of them,  - why isn't Qimage preview available for them?


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 16, 2022, 02:51:31 PM
Thanks for the samples.  The DNG loads and previews fine for me.  The TIFF does not and I think it's because it is saved with Adobe "deflate" compression which is not supported.  Try to use a non-proprietary compression type like LZW when saving your TIFFs.  As for the DNG, try putting that DNG in a folder by itself and let it build the thumbnail with only that one image in the folder.  If that works, it could be another image in the folder that is causing a memory issue or some other problem that affects subsequent thumbnail builds.

Regards,
Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 17, 2022, 07:04:38 AM
Thank you for an advice...
I did everything according to your advice.
Indeed, if a "problematic" DNG file is placed alone in a test folder, then a preview for it is created without problems.

But for TIF files found out the following:
 - if you select ZIP or LZW compression when saving in Affinity Photo - then in both cases the Qimage-U program cannot build a preview for them - more precisely, instead of a picture, a chaotic set of points is shown. It does not depend on whether 1 such file is in the test folder or not...
The only option when the program normally builds a preview is when the TIF file is saved WITHOUT compression. But this almost 1.5 times increases its size ...

Why can't Qimage understand files compressed using the ZIP or LZW methods in Affinity Photo?


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 17, 2022, 06:38:10 PM
See attached.  Zero problems with Affinity saved TIFF files.  I saved the pictured image four ways:

- 8 bit/channel LZW compressed rgb TIFF
- 8 bit/channel ZIP compressed rgb TIFF
- 16 bit/channel LZW compressed rgb TIFF
- 16 bit/channel ZIP compressed rgb TIFF

No problems with any of them, so it must be something else.  Are you creating layers or alpha channels?  I'm not able to find a way to export a TIFF from Affinity that Qimage can't read!  It reads them all.

Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 17, 2022, 07:09:19 PM
I may have found the problem.  In Affinity Photo, open your TIFF and then click "Document" from the top menu and UNcheck "Transparent Background", then resave.  Apparently if you have "Transparent Background" selected on a TIFF, Affinity saves some sort of incompatible alpha channel in the TIFF.  Never seen that before.

Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 18, 2022, 06:01:56 AM
You are absolutely right, Mike !

When saving a TIF file in Affinity Photo - with the "Transparent Background" option turned off - Qimage "sees" these files perfectly.
No matter what compression method is used when exporting.
I will use this method for the time being so that Qimage "does not experience difficulties" about reviewing such TIF files.

If you can deal with this problem in Qimage - it will just be just great.

In any case, thanks and... wish you success.


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 18, 2022, 08:05:52 AM
I resaved all the "problematic" TIF files, with the "Transparent Background" option disabled.
I copied them all into one folder with DNG files, then deleted all the "problem" TIF files from this folder.
Those. only DNG files and "correct" TIF files remained in the folder. However - when starting Qimage and opening this folder - previews for MANY DNG files - are not built.
The inscription "Image Read Error" or "Loading" is displayed.
I kill the Qimage process through the Task Manager (because the program just freezes with a yellow rectangle and the inscription "Please wait ..."
I move 1 problematic DNG file to a test folder (only him). At the same time, Qimage _ is running. And then it crashes again....
I just don't know - what is the reason for this behavior - when there are a lot of DNG and TIF files in the folder
......
After long trials, I found out that there are 3 DNG files in the folder with different behavior:
1. 2 files behave the same - in the shared folder they show the inscription "Image Read Error" instead of a preview. But being placed in a separate folder - the preview for them is built normally
2. 1 file - no matter what folder it is in - whether in a shared folder or only 1 in a separate folder - always shows the inscription "Image Read Error".
I posted these 3 files on file sharing with the names: 1, 2, 3_Error.
File 3_Error is the same 3rd problematic file.

https://gofile.io/d/s3K7Wk
   or
https://www.mediafire.com/folder/lfykjibky6n0w/Problem_DNG

Would it make it difficult for you to check them yourself, please?
   (the catch is that the 1.2 files are visible with an "Image Read Error" - only when there are several more DNG and TIF files in the folder with them)


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 18, 2022, 12:26:36 PM
With the DNG files you posted, I am able to see the problem.  It took me some time to figure out what was causing it but it appears to be a limitation of the DNG format with respect to the particular LibRaw utility that is used to read raw photos.  Since DNG is supposed to be a digital negative, the raw module is expecting a digital negative from one of the 300+ digital camera models that are supported.  As such, it is not expecting many stitched-together photos as they are not really "digital negatives" anymore at that point.  Simply put, I don't think the raw developer module was designed to handle DNG files from multiple frames and it has memory allocation issues in that instance.  Stitched files saved as DNG are a particular type of DNG called linear DNG and it appears those only have limited support: smaller sizes.

My suggestion would be to use the TIFF format when you save stitched panos: the DNG format offers no benefit over the TIFF format.  DNG is primarily used when converting single raw photos that are in a proprietary format (such as CR3) to a more standardized format so that others can read them.

Regards,
Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 18, 2022, 02:11:44 PM
Thanks for the answer and clarification.

I will take note of your advice not to use DNG.
The problem is that it is in DNG that Adobe Lightroom saves the stitched panorama, and I inevitably have to save it. Although after further editing I save the file as a TIF.
Unfortunately, the DNG and TIF files are forced to be in the same folder.

I hope this can be fixed in some way....

Wishing you success...


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 18, 2022, 02:45:22 PM
The default save format for Lightroom is TIFF, so it is likely you changed the file preferences to DNG.  Either that or it is just remembering the last format you chose and that happens to be DNG.  It doesn't make a lot of sense to save a stitched panorama as a DNG as that is normally reserved for unmodified/raw digital negatives.  By the time you stitch together multiple frames and they are modified to match in contrast and color, it is no longer a "negative".

Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 19, 2022, 08:22:17 AM
I'm sorry, but I don't agree that Lightroom can save a stitched panorama as a TIF.
Firstly, when saving a panorama, there are no options, as well as no dialog itself.
I myself always save from Lightroom - either to TIF or JPG (using presets only) and have never used DNG - and therefore Lightroom - didn't "remember" anything about DNG.

I can quote a link from the Adobe online help, where it says that when a panorama is saved, it is given the suffix -- Pano.dng :
 - source -- https://helpx.adobe.com/lightroom-cc/using/hdr-panorama.html
"Once you've finished making your choices, click Merge to create the panorama photo.
By default, a stack containing your source files and the merged photo is created, with the merged panorama visible on the top of the stack.
A suffix Pano. dng is appended to the filename of the merged photo."

Those. when saving a panorama in Lightroom - there is no choice of file format, alas
At least for Lightroom 6.14 (last stanadalone version)


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 19, 2022, 01:28:06 PM
I always looked at the DNG as an intermediate step: an intermediate storage unit where Lightroom stores the panorama for later editing (hence why it's called a "stack").  In other words, the result of the panorama function is stored in a DNG file so that you have LR's raw developing capabilities for the panorama.  In most cases, people will then open the resulting panorama (the DNG file) in LR and edit it for final printing.  You usually need to check/edit it for exposure, highlights, shadows, etc. once all the frames have been put together and crop out the "wobbly" edges on the top and bottom.  At that point, you save a final TIFF of your panorama.  I would say it is uncommon for people to take the raw output from the panorama command and try to print it.

Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 19, 2022, 02:35:34 PM
Totally agree with you.

I actually do just that - I use DNG only for intermediate storage, as the 1st panorama source file.
But I have to keep it for the same reason. It is stored in the folder with subsequent panorama options in TIF format.
But thus, being in the folder with TIF files, as I wrote above - some DNG files - are not displayed in the Qimage program,
I'm afraid that they can therefore cause the program itself to work incorrectly ... And when you can't see their preview - it's somehow "annoying".

Therefore, if it is possible to eliminate this behavior of some DNG files - that would be very cool and big thanks to you!


Title: Re: Qimage cannot display the preview images for some files
Post by: admin on March 19, 2022, 10:27:58 PM
Agree.  I've been working on the DNG problem behind the scenes.  So far, it looks like the LibRaw module that I'm using is just not designed to handle DNG files with that many pixels.  When I trace the loading of your ~24,000 x 5,000 pixel DNG files, LibRaw eats 1.6 GB of RAM on the load which (in a 32 bit process) leaves not much left to decode it.  A 24,000 x 5,000 pixel image should only use about HALF that amount of memory even with a 16 bit/channel full color linear DNG.  The strange thing is, it doesn't seem to run out of memory even at 1.6 GB of RAM used, but it returns an null image (0x0 resolution).  My only conclusion is that the DNG module wasn't designed for anything other than single raw shots.

I've emailed the company who makes the DNG support module and will see if they can find anything.  In the mean time, maybe you could just save your TIFFs in a folder separate from the DNG's so Qimage won't try to read those large DNG's along with the TIFFs.

Regards,
Mike


Title: Re: Qimage cannot display the preview images for some files
Post by: Just_user on March 20, 2022, 11:41:54 AM
Clear.
Thank you for your clarification and for not disregarding my request..
I agree that the DNG and TIF files will have to be "spaced" into different folders so as not to create problems for Qimage.

Thanks again...
I hope this problem can be solved.