[FEATURE REQUEST] FastFoto scanned image stack option
Hey it would be lovely to have the script stack Epson's FastFoto scanned output files. Currently if you scan a photo it can output 3 files, the original scan, a "corrected" scan, and the backside of the photo if it has writing on it. Its structure looks like this: specified-image-name.jpg Original specified-image-name_a.jpg Corrected specified-image-name_b.jpg Back of Photo
Would it be possible to have the script make the original the top photo and stack the _a/_b files behind it?
I played around with codespace and chatgpt and got something similar to what you have that would stack photos that ended in _a and _b, but I really don't know much about programming, but thought I'd paste it here incase it helps, but I know chatgpt is rarely useful for these kind of tasks.
var fastFotoRE = regexp.MustCompile(`^(.*)(_a|_b)(\..*)$`)
func fastFoto(name string) (bool, string, bool) {
parts := fastFotoRE.FindStringSubmatch(name)
if len(parts) == 0 {
return false, "", false
}
base := strings.TrimSuffix(parts[1], "_a")
base = strings.TrimSuffix(base, "_b")
return true, base, false // Assume fastFoto files are not cover
}
var stackMatchers = []stackMatcher{nexusBurst, huaweiBurst, pixelBurst, samsungBurst, fastFoto}
Thanks for the suggestion. Added to the todo list
Awesome, thank you so much!
Hey Simulot, first thanks for all the awesome work you've put into this! I just wanted to follow up and see if this was still on your radar?
I'm focused on fixing bugs at the moment
Hey! Sorry to bug about this again, but saw you asking about feature requests in the latest release comments. So I thought I'd ping this again. Tha ka for the awesome work you do!
That's the right moment to pop up your request!
Could provide a non personal scan to illustrate the case? I would like to check what are EXIF fields Thnks
Yes, I had to do a google drive link because I didn't have any scans small enough to upload here. Here is the link: https://drive.google.com/drive/folders/1RGZl8f1Yxg7uOFfux_V3DEXmevBuvktN?usp=sharing
Received, thank you. Which one you want as cover for the stack?
The _a version
👀
That looks absolutely amazing! Thank you so much!! That will save me hours of manually stacking!!
The feature is available in the alpha 4 release https://github.com/simulot/immich-go/releases/tag/v0.23.0-alpha4
Hey, first off want to thank you for this feature!! It has saved me DAYs of work! I did notice a slight bug though. It works flawlessly except it seems on files with parentheses in the name. Example: Stack fine: 1992-xx-xx - Easter_Arizona_0069.jpg 1992-xx-xx - Easter_Arizona_0069_a.jpg 1992-xx-xx - Easter_Arizona_0069_b.jpg
Don't stack (but do upload): 1992-xx-xx - Easter_Arizona - 0069.jpg 1992-xx-xx - Easter_Arizona - 0069_a.jpg 1992-xx-xx - Easter_Arizona - 0069_b.jpg
Don't stack (but do upload): 1992-xx-xx - Easter_Arizona (FF-680W-1200-PR) - 0069.jpg 1992-xx-xx - Easter_Arizona (FF-680W-1200-PR) - 0069_a.jpg 1992-xx-xx - Easter_Arizona (FF-680W-1200-PR) - 0069_b.jpg
That's my fate: there is always one more bug ;-)
I did see that RC release and felt bad throwing this one up :P I did a bit more digging and it seems to be less the parentheses and more the space before the 0000 numbers at the end
The name pattern recognition is a little bit too strict, requiring a _ followed by digits then a or b and the extension.
I'm interesting in how the files are generated, which part is given by the user, and which is given by the scan software.
Can I relax the rule, and simply say that file names always finish by 4 digits then the extension or _a or _b and the extension?