Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cont. g1408e42 r64) Writing JPEG previews fails #192

Closed
LigH-de opened this issue Oct 5, 2019 · 9 comments · Fixed by #193
Closed

(cont. g1408e42 r64) Writing JPEG previews fails #192

LigH-de opened this issue Oct 5, 2019 · 9 comments · Fixed by #193
Labels
Milestone

Comments

@LigH-de
Copy link

LigH-de commented Oct 5, 2019

There is a warning at the end of the output of the CLI version when trying to convert a dual capture Fujifilm EXR-DR RAF:

E:\Programme\HDRMerge_master_continuous-64-g1408e42_release_64>hdrmerge-nogui.exe -a --single -b 24 --no-align -v -vv DSCF4758.RAF
Using LibRaw 0.19.3-Release
Number of frames : 2
[  0%] Loading DSCF4758.RAF
DSCF4758.RAF: 2824x2128 (2880x2128+28+0, by Fujifilm S200EXR, 100ISO 1/60sec f3.5 EV:-9.5216
b4b4b4b4 RGBG, sat 16383, black 512, flip 0, wb: 667 336 615 336, cblack: 512 512 512 512
[ 33%] Loading DSCF4758.RAF
DSCF4758.RAF: 2824x2128 (2880x2128+28+0, by Fujifilm S200EXR, 100ISO 1/60sec f3.5 EV:-9.5216
b4b4b4b4 RGBG, sat 16383, black 512, flip 0, wb: 667 336 615 336, cblack: 512 512 512 512
Load files: 0.122552 seconds
[ 66%] Processing stack
Using white level 15712
Compute response functions: 0.181556 seconds
Generate mask: 0.0798672 seconds
[100%] Done loading!
Writing result to E:/Programme/HDRMerge_master_continuous-64-g1408e42_release_64/DSCF4758-4758.dng
Writing E:/Programme/HDRMerge_master_continuous-64-g1408e42_release_64/DSCF4758-4758.dng, 24-bit, 2824x2128
[  0%] Rendering image
Adjusted white balance: 1.98512 1 1.83036 1
Fatten mask (SSE version): 0.0101068 seconds
Blur: 0.141727 seconds
Compose: 0.138151 seconds
[ 33%] Rendering preview
Render preview: 1.44369 seconds
[ 66%] Writing output
Error converting the preview to JPEG: Unsupported image format
Write output: 0.875338 seconds
[100%] Done writing!

The message Unsupported image format makes me wonder if you just omitted a JPEG encoder library.

Apart from that, I wonder if the current state might be a "nightly" release candidate. The last official release for Windows is still v0.5.

@ff2000
Copy link
Contributor

ff2000 commented Oct 5, 2019

Looks like a bug:

QImageWriter writer(&buffer, "JPEG");

https://doc.qt.io/qt-5/qimagewriter.html#supportedImageFormats
Should be "JPG" instead of "JPEG".
"JPEG" was OK with Qt4:
https://doc.qt.io/archives/qt-4.8/qimagewriter.html#supportedImageFormats

@LigH-de
Copy link
Author

LigH-de commented Oct 5, 2019

Hope for a new binary soon.

@LigH-de
Copy link
Author

LigH-de commented Oct 11, 2019

I tried to patch the EXE with a hex editor, turning the first separate appearance of JPEG into JPG{#0} – it did not work as expected.

@LigH-de
Copy link
Author

LigH-de commented Feb 24, 2020

Not fixed in HDRMerge_release-v0.6_continuous-71-gd7d8041_release_64 – please reopen.

I converted the same Fujifilm raw file (DSCF4758.RAF) containing two frames, created by a Finepix S200 EXR in Dynamic Range mode.

HDRMerge_master_continuous-64-g1408e42_release_64\hdrmerge.exe (2019-07-25, does not contain the string “JPG”) => DSCF4758-4758.dng (13056040 bytes, does not contain the string “JFIF”)

HDRMerge_release-v0.6_continuous-71-gd7d8041_release_64\hdrmerge.exe (2020-02-24, contains the string “JPG” once) => DSCF4758-4758.dng (13056040 bytes, does not contain the string “JFIF”)

Both DNG files are almost bit-exact the same (except for a creation timestamp in the header metadata).

@ff2000
Copy link
Contributor

ff2000 commented Feb 25, 2020

It's a packaging issue then.
Had a look at the zip and the imageformats plugins are missing:
from my linux installation: /usr/lib64/qt5/plugins/imageformats/libqjpeg.so
For the location in the zip:
https://doc.qt.io/qt-5/windows-deployment.html#qt-plugins

(I looked at the nightly build from here: https://keybase.pub/gaaned92/HDRMergeNightlyBuilds/)

@LigH-de
Copy link
Author

LigH-de commented Feb 25, 2020

Success:

I copied the qjpeg.dll from Luminance HDR to a subdirectory imageformats below the HDRMerge installation. It created a DNG file containign a JPEG preview. If you deploy it in new releases, you will use the current version of your Qt 5 installation.

@ff2000
Copy link
Contributor

ff2000 commented Feb 25, 2020

Thx for testing and the confirmation.

@akidee
Copy link

akidee commented Aug 30, 2020

Tested with v0.5. Consider reopening this issue:

I get this error for all images of my batch. The DNG is valid, but the preview is missing.

hdrmerge -B -g 5 -b 16 -p full -vv -a *_{0..3}.dng

[  0%] Loading IMG_20200811_153234_0.dng
IMG_20200811_153234_0.dng: 4032x3024 (4032x3024+0+0, by samsung SM-G930F, 64ISO 1/3200sec f1.7 EV:-13.8188
e1e1e1e1 RGBG, sat 1023, black 0, flip 0, wb: 1.77778 1 1.43619 0, cblack: 0 0 0 0
[ 25%] Loading IMG_20200811_153234_2.dng
IMG_20200811_153234_2.dng: 4032x3024 (4032x3024+0+0, by samsung SM-G930F, 64ISO 1/50sec f1.7 EV:-7.81878
e1e1e1e1 RGBG, sat 1023, black 0, flip 0, wb: 1.77778 1 1.43619 0, cblack: 0 0 0 0
[ 50%] Loading IMG_20200811_153234_1.dng
IMG_20200811_153234_1.dng: 4032x3024 (4032x3024+0+0, by samsung SM-G930F, 64ISO 1/400sec f1.7 EV:-10.8188
e1e1e1e1 RGBG, sat 1023, black 0, flip 0, wb: 1.77778 1 1.43619 0, cblack: 0 0 0 0
Load files: 0.364607 seconds
[ 75%] Aligning
Image 1 displaced to (4, -2) with error 251619
Image 0 displaced to (4, -8) with error 224756
Align: 0.19597 seconds
Compute response functions: 0.155091 seconds
Generate mask: 0.429508 seconds
[100%] Done loading!
Writing result to /Users/andi/Pictures/eigene/chronologisch/2020/2020-08-11/IMG_20200811_153234_0-2.dng
Writing /Users/andi/Pictures/eigene/chronologisch/2020/2020-08-11/IMG_20200811_153234_0-2.dng, 16-bit, 4028x3016 cropped
[  0%] Rendering image
Adjusted white balance: 1.77778 1 1.43619 1
Fatten mask: 0.216571 seconds
Blur: 1.08811 seconds
Compose: 0.659695 seconds
[ 33%] Rendering preview
Render preview: 3.30597 seconds
[ 66%] Writing output
Error converting the preview to JPEG: Unsupported image format
Write output: 2.66845 seconds
[100%] Done writing!

@LigH-de
Copy link
Author

LigH-de commented Aug 30, 2020

It was solved in a nightly build. Stable version 0.5 is "ancient".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants