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

fix major BUG : changeOrder can bump inferior photo to head. Plus: added... #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SamSamFR
Copy link

@SamSamFR SamSamFR commented Aug 6, 2013

... MPixel to the size comparison

the comparison between head and new, based on a sequence of parameters, should be lexicographical.
Only proceed to next if current parameters are found equal !
As it was, an inferior new photo could be bumped to head.
eg : image A is raw, but not rated. image B is a jpg export, rated 4 stars, and the rating option is set.
When this function analyses B, it does not enter the RAW comparison block, goes on, then compares superior to A in the RATING block.
Result : photo A (the RAW) is flagged for deletion, while B (the jpg duplicate) is kept.
Dangerous behaviour, this could lead to lose user's RAW masters !

more elegant solution would be to build a function (like act) from the activated options, which is then used to map photos to tuple (RAW, MPixels, size, ...), then use lexicographical order on that tuple.
But I've just started using Lua today to fix that plugin and I don't know how to do it that way, so I just added a plain boolean "continueOrder" ...

About MPixels : exporting a jpg to a smaller res can very well result in larger fileSize. On the other hand, one never upsamples a file when exporting. So using MPixels before fileSize is a good idea.

…ded MPixel to the size comparison

the comparison between head and new, based on a sequence of parameters, should be lexicographical. 
Only proceed to next if current parameters are found equal !
As it was, an inferior new photo could be bumped to head. 
eg : image A is raw, but not rated. image B is a jpg export, rated 4 stars, and the rating option is set.
When this function analyses B, it does not enter the RAW comparison block, goes on, then compares superior to A in the RATING block.

more elegant solution would be to build a function (like act) from the activated options, which is then used to map photos to tuple (RAW, MPixels, size, ...), then use lexicographical order on that tuple. 
But I've just started using Lua today to fix that plugin and I don't know how to do it that way, so I just added a plain boolean "continueOrder" ...

About MPixels : exporting a jpg to a smaller res can very well result in larger fileSize. On the other hand, one never upsamples a file when exporting. So using MPixels before fileSize is a good idea.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant