How to capture google earth desktop program to bmp file? - winapi

How to capture google earth desktop program window to bmp file? I used printwindow function, but it only captures controls, region with planet is empty. Google earth can be minimized, or hidden with other windows.

You may also want to have a look at Google Earth APIs, if you want to do that programmatically
http://code.google.com/apis/earth/

On the menu in Google Earth, use:
File -> Save -> Save image

Related

How to make a live camera with Microsoft.media.ocr with bounding box overlay so that user can touch and have text to speech in UWP?

I have implemented live camera and using Android text recognition and when I touch the bounding box overlay, text to speech works but in Universal windows, app cant get any documentation can anyone help how to implement in live camera OCR?
APIs from Windows.Media.Ocr namespace can extract text and text layout information from images. It’s designed to handle various types of images. For camera, you could capture images from the camera for recognition. You could get VideoFrame from camera and convert to image.
More details about how to implement OCR in UWP app please reference this sample. The scenario 2 provides how to capture image from camera and extract text.
More details about MediaCapture in UWP app please reference this tutorial.
For text to speech feature please try to reference this article and this sample.
If you want more additional features than Windows.Media.Ocr namespace, I recommend you to use Microsoft Cognitive Services. Check the Analyze video in near real-time section for more details.

Animated placemark icon in kml Google Earth?

How can I have animated icons for placemark in Google Earth?
I tried using network link and changing the icon in the networked kml file but that creates a flicker in the placemark. Google Earth also does not support Animated gif's which would be my best option.
Is there a way to show animated gifs or something similar in Google Earth. Maybe I am working in the wrong direction with the placemarks and I should use something else?
My use case is that I want to create animated weather icons like cloud icon with rain drops moving as shown on news channels.
Google Earth doesn't support animated gifs so that is a non-starter, sorry.
The only other option you have is via KML, either using NetworkLinks (as you have tried) or via the various time and animation elements. See the <TimeStamp> element in the KML 2.2 Reference for examples.

DirectShow Filter to grab a specific window

I saw another question that sounds almost the same but the answers seem to be about whole desktop screen capture: DirectShow Source filter using Dekstop window as source.
I have looked at the PushSource and yes it does what it is meant to do, however I want the virtual webcam to grab a specific window (similar to how you can select to share a window in Skype's share screen).
How would I go about selecting a specific window as a capture for the virtual webcam? is there a specific method already in the DirectShow API that I don't know about that does this?
There is no specific method. Moreover the part of the sample that grabs from screen is already outside of DirectShow API, it is GDI instead.
So the solution is pretty simple, you GetWindowRect position of your window, and then grab from screen only this rectangle, not the whole desktop. Or instead, you can send WM_PAINT or WM_PRINTCLIENT to the window in order to request its paint into provided device context.

How do I do 3d manipulations on live windows 7 window contents?

This is basically a scoping question, where would I look for the facility to render window contents to 3d surfaces and manipulate them? I mean can I have a program like a shell that composites live windows in 3d like the Vista DWM's 3d Task Switcher and can translate UI interactions back into 2d interactions for each window?
I've seen mention of DWM extensions here and there on the web but can't find any resources as to how that would work. Also there are guides to implementing DWM Thumbnails by relating two windows' HWNDs but that doesn't allow me to do arbitrary transforms on the window and is display only (you can't click on stuff in the thumbnail.)
Any ideas?
There is no interface for manipulating the DWM's 3D visuals. They are internal to the DWM.

Is it possible to capture a window with windows 7 DWM thumbnail in it?

I am starting to believe that you can do nothing with Windows API.
I have two windows. One has a DWM thumbnail in it. What I want to do is, I want to be able to capture the screen of the window with the thumbnail into the other one.
When I do this, using bitblt, everything is copied except the thumbnail. It just isn't there in the bitmap.
So how does the DWM rendering work? I mean, if DWM renders thumbnails directly onto the DC of the registered window, then my approach should work. I'm confused.
Thanks a bunch.
That's not how DWM works: the contents of the thumbnail are never blitted onto the DC of your window. Instead, the DWM composition engine will render the thumbnail directly over the contents of your window when the desktop is presented.
There's no (official) way to access the image data of a DWM thumbnail unfortunately (there is however a hack on the net that tries to access the underlying vertex data and render it in DirectX 9).
You cannot expect a thumbnail to be place in a window's device context, because the thumbnail is not placed in a window's device context. So your approach will not work.
But if you're trying to steal the thumbnail of an application, just ask the Dwm to give you it's thumbnail. That will allow you to present to the user the exact thumbnail you want.
If, on the other hand, you want to access the pixels in the thumbnail of another process, then you have a problem.

Resources