-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DlibDotNet.Extensionsの依存パッケージについて #263
Comments
@LightWings-GameProject こちらはSystem.Drawingを外しておきます。 |
* Remove System.Drawing from DlibDotNet.Extensions
ご確認と修正ありがとうございます!
これは「Bitmap.ToMatrix(Bitmap → Matrix)」も同様でしょうか? Matrix<RgbPixel>などに対して画像を任意の矩形、色で塗りつぶすような機能はございますでしょうか? |
https:/takuya-takeuchi/DlibDotNet/blob/master/src/DlibDotNet/Extensions/BitmapExtensions.cs に ToMatrix がありますので、そちらを使ってください。
これはどう言う意味ですか?
DlibDotNet/src/DlibDotNet/ImageTransforms/Draw.cs Line 1119 in 8c1cbab
Dlib.DrawRectangle を使ってください。 |
@LightWings-GameProject 失礼、上の関数は塗りつぶしではないですね。 |
ご返信ありがとうございます!
当方もRectangleに対して勘違いがあるかもしれませんので、最新版の適用をしてもう一度確認します。 |
既にクローズしていますが、件のRectangleの識別がうまくいかなかった原因が分かりました。 Rectangleが識別できなかった直接の原因はUnityのターゲットを.NET Standard 2.0にする必要があったにもかかわらず4.0に設定してしまっていたことでした。 ひとまずこれでビルドは通ったのですが、そもそもUnityはmonoで動かしていましたのでSystem.Drawing.Commonを動かすのは困難でした。 なので結果的にSystem.Drawing.Commonに依存していないDLibDotNet+DLibDotNetExtensionのSystem.Drawingに依存した修正前の旧バージョンを使って動作させることにしました。 ゆくゆくはUnityでの実装を辞めて、通常のWindowsアプリとして実装しなおしたいと思います。 |
Windowsです。
DlibDotNet.Extensionsの依存パッケージがSystem.Drawing.Common.dllになっていますが、実際はSystem.Drawing.dllで動いているようです。
System.Drawing.Common.dllを入れたのですが、実際のアセンブリの要求がSystem.Drawing.dllになっており、そちらを入れなおして動きました。
Bitmap.ToMatrixなどの変換で使用しました。
ところが、DlibDotNetの方の要求するアセンブリはきちんとSystem.Drawing.Common.dllになっており、System.Drawing.Common.dllを要求するようになったバージョンのパッケージからこの二つのDlibDotNetとDlibDotNet.Extensionsのパッケージは競合状態にあるようです。
現在DlibDotNet(19.21.0.20210230)+DlibDotNet.Extensions(最新)+普通のSystem.Drawingで動くようです。
正直Windowsは普通のSystem.Drawing.dllで動けばいいと思います。
当方がUnityで動作させているため、想定の環境と異なっているだけが原因でしたら申し訳ありません。
The text was updated successfully, but these errors were encountered: