GaryM
06-23-2007, 12:10 AM
Just wondering if anyone has any source code for reading each pixel in a jpg gif bmp ect? Any help would be appreciated!!
Gary
Gary
|
View Full Version : Reading a Graphics File in VB 2005 GaryM 06-23-2007, 12:10 AM Just wondering if anyone has any source code for reading each pixel in a jpg gif bmp ect? Any help would be appreciated!! Gary Switcher 06-23-2007, 09:50 PM This should get you started. The code is in VB.NET 2005, it may not be the fastest way to plot pixels, maybe it will help you out? Open one of the bmp, that I included in the zip, then click "Start Plot". I attached a screenshot of the project in the zip, & a screenshot of the generated g-code, plotted in NcPlot ( www.ncplot.com ) . . Switcher 06-23-2007, 10:17 PM Also try a search inside the VB.NET 2005 "Help/Search" for "GetPixel". . Switcher 06-23-2007, 11:12 PM Another way to go about this is with "Bitmap.LockBits". I've read it is much faster than "Getpixel" (I havn't tried "Bitmap.LockBits", yet). Example: 1) http://msdn2.microsoft.com/en-us/library/5ey6h79d.aspx 2) http://www.devx.com/vb2themax/Tip/18776?type=kbArticle&trk=MSCP . GaryM 06-23-2007, 11:35 PM Switcher, Thanks alot man I will check this stuff out! Gary Switcher 06-23-2007, 11:51 PM Let me know If you get "Bitmap.LockBits", working. :) . |