[DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Capture_Signal_Get")]
public static extern IntPtr Get(HandleRef jarg1);
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Capture_GetImageUrl")]
+ public static extern IntPtr GetImageUrl(HandleRef capture);
+
[DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Capture_GetNativeImageSource")]
public static extern IntPtr GetNativeImageSourcePtr(HandleRef jarg1);
}
/// <summary>
+ /// Gets ImageUrl that is saved captured image.
+ /// </summary>
+ /// <returns>ImageUrl that is saved captured image.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ImageUrl GetImageUrl()
+ {
+ IntPtr cPtr = Interop.Capture.GetImageUrl(SwigCPtr);
+ ImageUrl ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as ImageUrl;
+ if (ret != null)
+ {
+ Interop.BaseHandle.DeleteBaseHandle(new HandleRef(this, cPtr));
+ }
+ else
+ {
+ ret = new ImageUrl(cPtr, true);
+ }
+ NDalicPINVOKE.ThrowExceptionIfExists();
+ return ret;
+ }
+
+ /// <summary>
/// Get NativeImageSource that is saved captured image.
/// </summary>
/// <returns>NativeImageSource that is saved captured image.</returns>
if (sender is Capture)
{
log.Debug(tag, $"sender is Capture \n");
- PixelBuffer pixelBuffer = capture.GetCapturedBuffer();
- PixelData pixelData = PixelBuffer.Convert(pixelBuffer);
- //var imageUrl = pixelData.GenerateUrl();//capture.GetNativeImageSource().Url;
- //capturedImage = new ImageView(imageUrl.ToString());
- var url = pixelData.GenerateUrl();
- capturedImage = new ImageView(url.ToString());
- log.Debug(tag, $"url={url} \n");
+ ImageUrl imageUrl = capture.GetImageUrl();
+ capturedImage = new ImageView(imageUrl.ToString());
+ log.Debug(tag, $"url={imageUrl.ToString()} \n");
capturedImage.Size = new Size(510, 510);
capturedImage.Position = new Position(10, 10);
{
done = true;
capture = new Capture();
- capture.Start(root, new Size(510, 510), @"/opt/usr/nui_captured.jpg");
+ capture.Start(root, new Size(510, 510), "");
capture.Finished += onCaptureFinished;
log.Debug(tag, $"capture done \n");
}