secile / UsbCamera

C# source code for using usb camera and web camera in WinForms/WPF. With only single CSharp source code. No external library required.
MIT License
179 stars 55 forks source link

provide nuget package #23

Open djonasdev opened 1 year ago

djonasdev commented 1 year ago

First of all I would like to thank you for the library! Really impressive and kept simple 👍

Finally, to use your code, I added the UsbCamera.cs to my project. It would be nice if you could also provide us with a nuget package (taking versioning into account; see https://github.com/GitTools/GitVersion).

secile commented 1 year ago

Hello, Thank you for your suggestion. I will try it.

wxharry commented 3 months ago

Hi secile, I would like to help if you haven't worked on the nuget packging. 😄

secile commented 2 months ago

Thank you. This issue is currently stopped because I felt some difficulties when creating DLL. The library change behavior if it is defined 'USBCAMERA_WPF' symbol that makes GetBitmap() returns image of BitmapSource. To release the library as nuget package, I have to create DLL, but it is not able to do same behavior with DLL.

Maybe I have to create two kind of DLL like UsbCameraWinForms and UsbCameraWpf. and I have to provide 2 kind of nuget package. (Is my idea correct?)

Could you give me more time to think it over.

wxharry commented 2 months ago

Thank you. This issue is currently stopped because I felt some difficulties when creating DLL. The library change behavior if it is defined 'USBCAMERA_WPF' symbol that makes GetBitmap() returns image of BitmapSource. To release the library as nuget package, I have to create DLL, but it is not able to do same behavior with DLL.

Maybe I have to create two kind of DLL like UsbCameraWinForms and UsbCameraWpf. and I have to provide 2 kind of nuget package. (Is my idea correct?)

Could you give me more time to think it over.

Hi, thank you for the reply. I think we can have adapters for wpf and winforms that implement the GitBitmap() differently and resue the other codes. To use the dll(let's say it is named as Secile.UsbCamera), developers can use base methods by using Secile.UsbCamera, and import wpf related methods by using Secile.UsbCamera.Wpf and the same for the winforms using Secile.UsbCamera.Winforms. What do you think?