This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
# User-specific files | |
*.suo | |
*.user | |
*.sln.docstates | |
# Build results | |
[Dd]ebug/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.58.tar.gz | |
tar xvfz bcm2835-1.58.tar.gz; | |
cd bcm2835-1.58; | |
./configure; | |
make; | |
sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static BitmapSource ConvertBitmap(Bitmap source) | |
{ | |
return System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( | |
source.GetHbitmap(), | |
IntPtr.Zero, | |
Int32Rect.Empty, | |
BitmapSizeOptions.FromEmptyOptions()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Bitmap GetBitmap(BitmapSource source) | |
{ | |
Bitmap bmp = new Bitmap | |
( | |
source.PixelWidth, | |
source.PixelHeight, | |
System.Drawing.Imaging.PixelFormat.Format32bppPArgb | |
); | |
BitmapData data = bmp.LockBits |