Giter Site home page Giter Site logo

Comments (14)

rderimay avatar rderimay commented on June 11, 2024

from focus-points.

musselwhizzle avatar musselwhizzle commented on June 11, 2024

My guess was to write a temporary images parallel to the raw (like I was doing for the metadata) and have the viewFactory:picture read it from the uri. That could be easily tested with any current jpeg on the hard drive to see if that theory works.

In terms of embedding it with the plugin, I'm still new to LR plugins as well.

from focus-points.

rderimay avatar rderimay commented on June 11, 2024

I tried the following simple view struct based on one jpg and an icon, and it fails as well.

viewFactory:view {
      viewFactory:picture {
        value = _PLUGIN:resourceId("assets/imgs/_focus_point_red-fat_center.png"),
        background_color = LrColor(1, 1, 1, 0)
      }, 
      viewFactory:picture {
        width = 600, 
        height = 400,
          value = _PLUGIN:resourceId("assets/IMG_8576.jpg")
      }, 
      place = 'overlapping', 
    }

I tried without background_color and with background_color = LrColor() or LrColor(1, 1, 1, 0) which should be transparent. Result is the same.
The only thing that work is when background_color is a none transparent color. And this does not help us that much...

from focus-points.

musselwhizzle avatar musselwhizzle commented on June 11, 2024

RE: alpha color on windows.

It appears the heart of the problem is that windows doesn't support transparency as shown here;

local view = viewFactory:view {
    viewFactory:picture {
      value = _PLUGIN:resourceId(fileName)
    },
    margin_left = x - anchorX,
    margin_top = y - anchorY,
    background_color = LrColor(1, 0, 0, 1) -- change to LrColor(1, 0, 0, .99)
  }

With this code, the picture has a red background. Changing the alpha of LrColor to anything other than "1" such as ".99" isn't supported correctly and causes LR on windows to render as a solid white color, not even red like it was when alpha is 1.

from focus-points.

musselwhizzle avatar musselwhizzle commented on June 11, 2024

RE: instead of using margin_left/margin_top, R&D using a viewFactory:spacer.

Spacers have the same issue as the margin. LR for windows just can't have transparent backgrounds.

Conclusions: at this time, I see no other option than imagemagick to bypass the bugs in LR for windows.

from focus-points.

musselwhizzle avatar musselwhizzle commented on June 11, 2024

I tired 2 more things, both failed
Idea 1: instead of using padding, put a transparent image over the targetPhoto and let the transparency in the raster photo have the padding. Windows on LR would not render this either. Same issues, no transparency anywhere is supported. Not even PNGs. (see screen attached)

Idea 2: use targetPhoto:requestJpegThumbnail to generate a jpeg of the image and then just composite the focus points over it using mogrify. Again this would work in mac but on Windows, the image is horribly distorted. targetPhoto:requestJpegThumbnail is known to be buggy. (see attached)

local thumb = targetPhoto:requestJpegThumbnail(2000, 2000, function(data, errorMsg)
      if data == nil then
        logError("FocusPoint", "error getting jpegThumbnail: " .. errorMsg)
      else
        logError("FocusPoint", "Got jpegThumbnail! typeof " .. type(data) )
        local path = targetPhoto:getRawMetadata("path") .. "-thumb.jpeg"
        
        local f = io.open(path, "w+")
        f:write(data)
        f:close()
  
      end
    end)

At this point, I'm completely out of ideas and most likely will not attempt further progress. Outside help is welcomed.

Idea 1 Results:
screen shot 2017-03-12 at 1 11 09 pm

Idea 2 Results:
dsc_4596 nef-thumb

from focus-points.

capricorn8 avatar capricorn8 commented on June 11, 2024

Obviously also LR7 does not change anything, the plugin still shows the mentioned issue.
Or is there any silver lining on the horizon that this plugin may work also on Windows some day?
Unfortunately, my LUA expertise too limited to actively support.

from focus-points.

jrsforums avatar jrsforums commented on June 11, 2024

Perhaps you can get with this guy to get working on Windows...
http://www.lightroomfocuspointsplugin.com

from focus-points.

capricorn8 avatar capricorn8 commented on June 11, 2024

Another 18 months later, in which we have seen multiple updates to LR, its SDK and also Windows - but still this issue remains. I have spent a few hours to understand the code, tried this and that, but no success. I also haven't been able to figure out why the corners of the AF point are incomplete. Eg. for my Olympus files, I always get the two rightmost corners only:
Olympus_Example
Same for Canon, except the not selected AF points which miss only 1 corner ;-)
Canon_Example

Would be nice to find a way to at least fix this; I have started to use the plugin's output and overlay this with the photo in PS. Not straightforward, a bit tedious, but I find it worthwhile for selected use case every now and then.

Any idea how to tackle this one? The debug log shows that DefaultPointRenderer.createPointView is being called 5x (center + 4 corners) picking the proper imgs files but for some reason two of them don't show up in the created view.

Thanks for any suggestions.

from focus-points.

musselwhizzle avatar musselwhizzle commented on June 11, 2024

I doubt this is going to get any motion as it's already been several years now. You could always try learning LUA and seeing if you can tackle it. Or perhaps contact adobe and see if they'll fix the Windows bugs in Lightroom.

from focus-points.

ropma avatar ropma commented on June 11, 2024

I've build a small prototype (https://github.com/ropma/LrDisplayWithMogrify) using the mogrify approach. I think the problem for the distorted image was a missing binary flag in the file open.
With "w+b" it seems to work - at least in the prototype.

I'm currently a little bit busy, but after my vacation in September I can try to create a Focus point version using mogrify.

from focus-points.

capricorn8 avatar capricorn8 commented on June 11, 2024

I'm currently a little bit busy, but after my vacation in September I can try to create a Focus point version using mogrify.

This looks very promising! Prototype works here as well. Looking forward to seeing this integrated with the plug-in. And I'm curious about your findings regarding missing AF field corners.

from focus-points.

musselwhizzle avatar musselwhizzle commented on June 11, 2024

@capricorn8 - https://github.com/musselwhizzle/Focus-Points/tree/windows_support

give it a shot

from focus-points.

musselwhizzle avatar musselwhizzle commented on June 11, 2024

master now has support for windows. issue is closed

from focus-points.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.