Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
F# を介して .png ファイルのピクセルにアクセスする必要があります。
メソッドで画像に読み込むことはできFromFileますが、そのピクセルにアクセスできません。イメージをビットマップに変換する方法がわかりません。どこでGetPixelメソッドを使用できますか?
FromFile
GetPixel
画像を Bitmap オブジェクトに直接ロードできます。
let img = "C:\\MyImages\\MyImage.png" let bitmap = new System.Drawing.Bitmap(img)
そこから、イメージで Bitmap のメソッドとプロパティを使用できます。
ImageをBitmapに変換できます
Image
Bitmap
System.Drawing.Bitmap(loadedimage)