title: How to obtain the pixel coordinates of a QR code recognized by the Windows UWP ClaimedBarcodeScanner
body: <p>I'm building a Windows UWP app that includes a QR code scanner based on a built-in camera of the device that is running the app. There is a <a href="https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BarcodeScanner" rel="nofollow noreferrer">sample</a> that explains how to do this hosted on GitHub.</p>
  
  <p>So far, my scanner is running properly and I'm able to extract the information contained within QR codes. The sample does a decent job explaining how to do that.</p>
  
  <p>However, as a next step I would like to be able to draw a shape around the recognized QR code. To be able to do so I'd need to obtain the pixel coordinates of the recognized QR code.</p>
  
  <p>If a QR code is recognized the <code>ClaimedBarcodeScanner.DataReceived</code> event gets <a href="https://docs.microsoft.com/en-us/uwp/api/windows.devices.pointofservice.claimedbarcodescanner.datareceived" rel="nofollow noreferrer">fired</a>. The callback then receives a  BarcodeScannerDataReceivedEventArgs which in terms contains a <a href="https://docs.microsoft.com/en-us/uwp/api/windows.devices.pointofservice.barcodescannerreport" rel="nofollow noreferrer">BarcodeScannerReport</a> object. This object has the three properties <a href="https://docs.microsoft.com/en-us/uwp/api/windows.devices.pointofservice.barcodescannerreport.scandata#Windows_Devices_PointOfService_BarcodeScannerReport_ScanData" rel="nofollow noreferrer">ScanData</a>, <a href="https://docs.microsoft.com/en-us/uwp/api/windows.devices.pointofservice.barcodescannerreport.scandatalabel#Windows_Devices_PointOfService_BarcodeScannerReport_ScanDataLabel" rel="nofollow noreferrer">ScanDataLabel</a> and <a href="https://docs.microsoft.com/en-us/uwp/api/windows.devices.pointofservice.barcodescannerreport.scandatatype#Windows_Devices_PointOfService_BarcodeScannerReport_ScanDataType" rel="nofollow noreferrer">ScanDataType</a>.</p>
  
  <p>I suspect that the coordinates <em>might</em> be stored in the <code>ScanData</code> property but this is essentially a junk of raw data and neither the documentation nor the sample code explain in what format data is stored within that property.</p>
  
  <p>There is a GitHub <a href="https://github.com/MicrosoftDocs/winrt-api/issues/437" rel="nofollow noreferrer">issue</a> open that requests clarification in the documentation but that issue has been opened around 10 months ago and nothing has happened.</p>
  
  <p>Does anyone have an idea whether the barcode scanner reveals the pixel coordinates and if so, how to access those?</p>