CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    detecting a digital image on the monitor

    Hi All..

    I am developing an application that dispays cirtain information about digital camera images. It would be very useful for me if I could detect weather the application (or window) that currently has the focus is displaying a file based digital camera image, and beable to get a file path for that image.
    The user may be viewing digital camera images in "Windows Explorer" or "photoshop" or "psp" or any other application.

    Can anyone think how I might detect if the user is looking at such an image and derive the file path.

    Any ideas would be Very greatfully recieved !
    Many thanks for your time

    Phill

  2. #2
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: detecting a digital image on the monitor

    I don't think there is any general way of doing that - which works with any application. But there are ways to detect if an application has open 'handles' to a file. From there you can get the file path test if the file is an image file. Although, even if there is an open image file, it doesn't mean that the image is currently showing. And, even if there is an image showing, it doesn't mean that there is an open file...

    Another 'brute force' and much more advanced way may be to index any image file on a drive (hdd or cdd etc) then check to see if the displayed 'image' matches any of the indexed files. Much like a search engine. This would probably require 3. party algorithms/libraries or lots of research papers to read.

    - petter

  3. #3
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Re: detecting a digital image on the monitor

    Hi Peter..
    Thanks for your reply..
    I didn't think it would be an easy one.
    Perhaps it would be easier if I set my sights lower and coded for an individual application. would it be easier for instance if I focused on just "Windows Explorer" or "Picassa" and used hooks to work out what the user was currently looking at so that I can display additional information about the file that currently has the mouse pointer hoveringover it ???, or would this also be a particulally hard thing to do. Does microsoft supply an API for this sort of thing?

    Thanks
    Phil

  4. #4
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: detecting a digital image on the monitor

    Just out of curiosity, why are you trying to do this? What is the underlying requirement for your application?
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  5. #5
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Re: detecting a digital image on the monitor

    Hi ..
    The Idea is to display user defined EXIF data for any file that contains it, so that the user can quickly and easily compare camera settings for digital images.

    Phil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured