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
mipmap : fix if embedded preview size is too small #2397
Conversation
This looks impressive. One quick thought is if I want to look more carefully at the |
I've just mimic the other "boolean" present in the structure...
This is clearly the sensible area of change (that with all the cache get/release) |
I tested this a bit and it looks good. Not only does It not crash, but it behaves just as I'd expect/hope, without having to think about any subtleties.
My one regret about the |
One question: it looks like even for mipmaps < mip8, it looks like now the pixelpipe results appear rather than embedded JPEG. Is this expected/right? |
What is expected, is that the computed mipmap appears for all mipmap levels where the embedded thumbnail is too small. In the case of the fuji example, the embedded thumbnail should be used for mipmap <= 4 and computed after (if I remember correctly the mipmap sizes). Is that what you see ? Sadly, I can't test anything : I've broken my system with a tentative of upgrading gtk :), so it's time to a clean reinstall of a more recent OS version. Anyway, I'm leaving for holidays tomorrow, so I'll come back to dev in 10-15 days. |
@AlicVB : since you won't be around for some days I'll wait for your come back to merge this. Ping me when merging can be done. Thanks. |
Ok, I've just added some refactoring around the image "final size" computation. Now final size are stored in dt_image_t and compute if needed (first need / after image changes) Note :
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested yet. Just some minor comments. Also, please make sure rawspeed is not changed here. Thanks.
src/views/lighttable.c
Outdated
@@ -353,7 +353,7 @@ static inline void _destroy_preview_surface(dt_preview_surface_t *fp_surf) | |||
fp_surf->imgid = -1; | |||
fp_surf->w_lock = 0; | |||
|
|||
fp_surf->zoom_100 = 40.0f; | |||
fp_surf->zoom_100 = 1001.0f; // dummy vaule to say it need recompute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: vaule -> value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
// the orientation for this camera is not read correctly from exiv2, so we need | ||
// to go the full path (as the thumbnail will be flipped the wrong way round) | ||
const int incompatible = !strncmp(img.exif_maker, "Phase One", 9); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not look like refactoring. The orientation is wrong with current version? Note that I have recently fixed lot of orientation issues. Have you tested with current version? Just to be sure this is still needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, this is copy/paste from mipmap_cache.c line 1187. Git blame says it's a commit from @hanatos 7 years ago, and it's a problem for Phase One h25 models (raw pixls didn't seems to have this raw...)
58106a3
to
45ed1a2
Compare
for the rawspeed files, I don't know where they come from, git show doesn't seems to have them here, certainly some subtilities of the submodules... |
Working fine on my side. Thanks. |
this fix #2377
There's 2 problem with some raw with small embedded preview images (https://raw.pixls.us/getfile.php/1942/nice/Fujifilm%20-%20X100F%20-%2014bit%20uncompressed%20(3:2).RAF) :
In fact the main problem is that exiv2 read the embedded preview size in place of the image size... So I've added a way to run minimal rawspeed pass, just to get the real dimension of images with embedded preview.