BitmapPropertiesView.GetPropertiesAsync(IIterable<String>) 메서드

정의

하나 이상의 비트맵 속성을 비동기적으로 검색합니다.

public:
 virtual IAsyncOperation<BitmapPropertySet ^> ^ GetPropertiesAsync(IIterable<Platform::String ^> ^ propertiesToRetrieve) = GetPropertiesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<BitmapPropertySet> GetPropertiesAsync(IIterable<winrt::hstring> const& propertiesToRetrieve);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<BitmapPropertySet> GetPropertiesAsync(IEnumerable<string> propertiesToRetrieve);
function getPropertiesAsync(propertiesToRetrieve)
Public Function GetPropertiesAsync (propertiesToRetrieve As IEnumerable(Of String)) As IAsyncOperation(Of BitmapPropertySet)

매개 변수

propertiesToRetrieve

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

요청되는 속성 키 또는 쿼리를 나타내는 문자열의 컬렉션입니다. 유효한 문자열에는 Windows 속성Windows 이미징 구성 요소 메타데이터 쿼리가 포함됩니다.

반환

비트맵 속성의 비동기 검색을 관리하는 개체입니다.

구현

M:Windows.Graphics.Imaging.IBitmapPropertiesView.GetPropertiesAsync(System.Collections.Generic.IEnumerable{System.String}) M:Windows.Graphics.Imaging.IBitmapPropertiesView.GetPropertiesAsync(System.Collections.Generic.IEnumerable{Platform::String}) M:Windows.Graphics.Imaging.IBitmapPropertiesView.GetPropertiesAsync(System.Collections.Generic.IEnumerable{winrt::hstring})
특성

설명

비동기 작업은 요청된 이미지 속성 키와 해당 값을 나타내는 컬렉션을 생성합니다. 값은 실제 데이터와 데이터의 PropertyType을 모두 포함하는 BitmapTypedValue로 저장됩니다.

특정 이미지에는 요청된 속성의 일부(또는 없음)만 포함될 수 있습니다. 이 경우 컬렉션에는 이미지에 있는 속성에 대한 키-값 쌍만 포함됩니다. 데이터 가져오기를 시도하기 전에 속성이 있는지 검사 합니다.

bitmapPropertiesView.getPropertiesAsync(["System.Title"]).done(function (retrievedProperties) {
  if (retrievedProperties.hasKey("System.Title")) {
	  	var titleProperty = retrievedProperties.lookup("System.Title");
	  	var title = titleProperty.value;
	 }
});

메타데이터 블록 쿼리

메타데이터 쿼리 언어를 사용하여 속성 대신 메타데이터 블록을 요청하는 경우 반환된 값은 해당 블록 내의 메타데이터를 나타내는 BitmapPropertiesView 입니다. BitmapPropertiesView에서 블록 내에 포함된 메타데이터를 요청할 수 있습니다.

// this is equivalent to directly requesting "/app1/ifd/{ushort=274}" from bitmapPropertiesView
bitmapPropertiesView.getPropertiesAsync(["/app1/ifd"]).done(function (retrievedProperties) {
	  // var ifdBlock is a BitmapPropertiesView
	  var ifdBlock = retrievedProperties.lookup("/app1/ifd").value;
	  return ifdBlock.getPropertiesAsync(["/{ushort=274}");
}).then(function (retrievedProperties) {
	  var orientation = retrievedProperties.lookup("/{ushort=274}").value;
});

프레임 내의 모든 메타데이터 열거

빈(길이가 0인) 문자열 컬렉션을 전달하여 하위 블록 및 속성을 포함하여 메타데이터 블록의 모든 콘텐츠를 요청할 수 있습니다. 그러면 BitmapPropertiesView의 scope 내의 모든 하위 블록 및 속성이 포함된 컬렉션이 생성됩니다. 이러한 방식으로 이미지 프레임 내에 포함된 모든 메타데이터를 반복적으로 검색할 수 있습니다.

bitmapPropertiesView.getPropertiesAsync([]).done(function (retrievedProperties) {
	  var iterator = retrievedProps.first();
	  while (iterator.hasCurrent) {
		  // iterator.current gives a key-value pair of string, BitmapTypedValue
		  // nextMetadataBlock is a BitmapPropertiesView containing the sub-block
		  var nextMetadataBlock = iterator.current.value.value;
		  iterator.moveNext();
	}
});

이미지 형식이 메타데이터를 지원하지 않으면 HRESULT WINCODEC_ERR_UNSUPPORTEDOPERATION 실패합니다.

적용 대상

추가 정보