Skip to content

Comments

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

Open
SamSamFR wants to merge 1 commit intofuxs:masterfrom
SamSamFR:patch-1
Open

fix major BUG : changeOrder can bump inferior photo to head. Plus: added...#2
SamSamFR wants to merge 1 commit intofuxs:masterfrom
SamSamFR:patch-1

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