2012-05-31 3 views
0

Excel VBA에서 Google 어스 API를 사용하고 있습니다. 스크린 샷은 색상 대신 흑백으로 표시됩니다. 내가 잘못하고있는 곳에 나에게 제안 해주세요.Google 어스 API를 사용하여 컬러 스크린 샷을 찍는 방법은 무엇입니까?

Dim ge As earthlib.ApplicationGE 

Set ge = New ApplicationGE 

Dim kmlString As Variant 

kmlString = "C:\temp\test.kmz" 

ge.OpenKmlFile (kmlString, 1) 

Dim tPlace As earthlib.FeatureGE 

Set tPlace = ge.GetTemporaryPlaces 

Dim fldrPath As String, jpgName as String 

fldrPath = "C:\temp\" 

jpgName = fldrPath & "outJpg1.JPG" 

ge.SaveScreenShot (jpgName, 100) 
+0

나는 누군가가 당신을 돕기 위해 위해 거의 충분한 정보가 여기이없는 두려워. API를 호출하는 데 사용하는 코드를 게시하는 것이 좋습니다. – JimmyPena

답변

0

내가 in this documentation을 발견 의견이으로 설계된 것이 좋습니다. 나는 대신 무엇을해야 할지를 제시하는 것을 찾지 못했습니다.

/// \brief Takes low quality black and white screen shot 
/// of the current camera view. 
/// 
/// This image is not meant to be used for rapid capture and degrades 
/// in quality if used frequently. 
/// 
/// \param fileName Full path JPG filename of output screen shot. 
/// \param quality Quality factor of output image. Lowest quality is 
/// \c 0 and highest quality is \c 100. Input quality is always clamped 
/// to (\c 0, \c 100) inclusive. 
/// 
/// \retval S_OK Successfully saved screen shot. 
/// \retval (other) Appropriate error code. 
[id(5), helpstring("method SaveScreenShot")] 
HRESULT SaveScreenShot([in] BSTR fileName, [in] long quality); 
+0

감사합니다. Akash는 코드를 사용하여 컬러 이미지를 캡처 할 수 없다는 것을 의미합니다. 옳은? – Pugazh

+0

댓글을 주셔서 감사합니다. VBA application.sendkey 메서드를 사용하여이 작업을 수행했습니다. – Pugazh

관련 문제