[digikam] [Bug 508104] Add Fujifilm focus-point extractor support to digiKam

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Mon Aug 11 13:51:37 BST 2025


https://bugs.kde.org/show_bug.cgi?id=508104

--- Comment #2 from focus-point at mailinator.com ---
Thank you for quick reply Gilles!

I went through their LR code and only ~30 lines between 74-115 are relevant for
digikam. Rest of the code is about extracting face frames, crop frames etc. as
you can see here:
https://github.com/musselwhizzle/Focus-Points/blob/dcb392eb3c70696e48b67ddf4500076d9c5d7ea4/focuspoints.lrplugin/FujifilmDelegates.lua#L74-L115

Fujifilm metadata only provides single absolute pixel location for focus (like
Panasonic and Sony in your codebase). It doesn't provide width or height of
focus areas or multiple focus frames. 

So already very short panasonic focus point extractor code
(focuspoints_extractor_panasonic.cpp) can be copied and adapted to fujifilm
without much changes. 

---

My attempted pseudo code of focuspoints_extractor_panasonic.cpp adapted from
FujifilmDelegates.lua#L74-L115:

width, height = get image width and height from exif

x, y = get focus pixel position from MakerNote "Focus Point" or ExifTool
"FocusPixel". Two integers absolute positions split by a space.

// Scale x, y positions with regard to how much original image is scaled 
// (? I don't know we need this since I don't see we are doing any scaling of
positions anywhere)
orgWidth, orgHeight = get original width and height 
x, y = x*(orgWidth / width), y*(orgHeight / height)

RATIO_POINT_IMAGE = 1/120 // (since af point doesn't have width and height, we
assume it's 1/120 of the image size like we did in panasonic)
af_width, af_height = width*RATIO_POINT_IMAGE, height*RATIO_POINT_IMAGE

return a focus point (x, y, af_width, af_height)

I did my best to help you on this issue of missing focus points of fujifilm I
hope it's useful! Thank you!

-- 
You are receiving this mail because:
You are watching all bug changes.



More information about the kde-mac mailing list