-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Bug: Export produce empty files of 0 byte #362
Comments
This is what I get with [dt_imageio_export_with_flags] rawprepare temperature demosaic denoiseprofile lens flip crop colorin channelmixerrgb negadoctor colorout finalscale dither gamma (14)
30.785576 [dt_imageio_export] (direct) imgid 3090, hq 0, pipe 7182x4920, range 0x0 --> size 0x0 / 0x0 - ratio 1.45976
[pixelpipe_process_on_CPU] Warning: processes `dither' even if memory requirements are not met
[pixelpipe_process_on_CPU] Warning: processes `gamma' even if memory requirements are not met
Empty JPEG image (DNL not supported)
[imageio_storage_disk] could not export to file: `/home/jiyone/Images/Ansel/2024/2024.08 Diapo surex/_DSC1898_01.jpg'!
|
This happens in 85f2b8b, let me try to find the reason. |
This only happens if you use scaling factor to export an image. |
The reason is when using scaling factor to export, it will also ensure the final size won't exceed max size (which is wired because those settings in UI looks independent), and if your max_width/height is 0, you'll get 0... |
This is based on those 2 rules: - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user set value <= 0, this means don't resize and use the original image size. 2. If user set value > original image size, this also means don't resize and use the original image size. 3. For max size, if user does not set the value according to image ratio, we will recalculate the value to keep image ratio and make sure the calculated size is smaller than user's max size. 4. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 5. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <aurelienpierreeng#362>.
Please try #368 to see whether it fixes this bug and help find bugs in it. |
This is based on those 2 rules: - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user set value <= 0, this means don't resize and use the original image size. 2. If user set value > original image size, this also means don't resize and use the original image size. 3. For max size, if user does not set the value according to image ratio, we will recalculate the value to keep image ratio and make sure the calculated size is smaller than user's max size. 4. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 5. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <aurelienpierreeng#362>.
This is based on those 2 rules: - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user set value <= 0, this means don't resize and use the original image size. 2. If user set value > original image size, this also means don't resize and use the original image size. 3. For max size, if user does not set the value according to image ratio, we will recalculate the value to keep image ratio and make sure the calculated size is smaller than user's max size. 4. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 5. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <aurelienpierreeng#362>.
This is based on those 2 rules: - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user set value <= 0, this means don't resize and use the original image size. 2. If user set value > original image size, this also means don't resize and use the original image size. 3. For max size, if user does not set the value according to image ratio, we will recalculate the value to keep image ratio and make sure the calculated size is smaller than user's max size. 4. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 5. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <aurelienpierreeng#362>.
This is based on those 2 rules: - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user set value <= 0, this means don't resize and use the original image size. 2. If user set value > original image size, this also means don't resize and use the original image size. 3. For max size, if user does not set the value according to image ratio, we will recalculate the value to keep image ratio and make sure the calculated size is smaller than user's max size. 4. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 5. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <aurelienpierreeng#362>.
This is based on those 3 rules: - Max size is not "max" size acutally but more like "requested" size. - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user sets both dimensions <= 0 (setting scaling factor is also setting both dimensions), this means don't resize and use the original image size. 2. For max size, if user sets one dimension <= 0, this means calculate the other dimension via image ratio. 3. For max size, if user does not set dimensions according to image ratio, we match the longest dimension, and calculate the other dimension via image ratio. 4. If user sets value > original image size, this also means don't resize and use the original image size. 5. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 6. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <aurelienpierreeng#362>.
This is based on those 3 rules: - Max size is not "max" size acutally but more like "requested" size. - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user sets both dimensions <= 0 (setting scaling factor is also setting both dimensions), this means don't resize and use the original image size. 2. For max size, if user sets one dimension <= 0, this means calculate the other dimension via image ratio. 3. For max size, if user does not set dimensions according to image ratio, we match the longest dimension, and calculate the other dimension via image ratio. 4. If user sets value > original image size, this also means don't resize and use the original image size. 5. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 6. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <aurelienpierreeng#362>.
Code of Conduct
Search previous report
Computer's operating system
Linux
What GPU do you have ?
I don't know
Ansel version
85f2b8b
Type of binary
Self-Compiled
What happened?
When exporting as jpg, a file of 0 byte is created and there is an error message showing:
It seems to produce error to all type of files, Tiff files contains only 11.7 Kb, this might be because of initialization of the exporting image at a 0 size.
Bisecting shows that the first bad commit is 85f2b8b.
Does your problem occur with OpenCL enabled ?
No
Does your problem occur with OpenCL disabled ?
No
Previous Ansel version that use to work
8dca913
Output of ansel -d all
Backtrace
Ansel doesn't crash.
The text was updated successfully, but these errors were encountered: