<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C# GetPixel and SetPixel</title>
	<atom:link href="http://www.csharp411.com/c-getpixel-and-setpixel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com/c-getpixel-and-setpixel/</link>
	<description>C# Information, Code, Tips and News</description>
	<lastBuildDate>Sat, 24 Jul 2010 01:26:51 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kevin</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5565</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sun, 04 Jul 2010 17:56:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5565</guid>
		<description>PictureBox is a Control that is nothing but an image. You change it&#039;s image property which is of type Image. Image is an abstract class that Bitmap inherits from. 
myPictureBox.Image = yourBitmap</description>
		<content:encoded><![CDATA[<p>PictureBox is a Control that is nothing but an image. You change it's image property which is of type Image. Image is an abstract class that Bitmap inherits from.<br />
myPictureBox.Image = yourBitmap</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manikandan</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5560</link>
		<dc:creator>manikandan</dc:creator>
		<pubDate>Sat, 03 Jul 2010 09:24:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5560</guid>
		<description>hi all, i have error for calling bitmap.getpixel(x,y) when using thread;

how to convert bitmap to control ;

reply soon plz.</description>
		<content:encoded><![CDATA[<p>hi all, i have error for calling bitmap.getpixel(x,y) when using thread;</p>
<p>how to convert bitmap to control ;</p>
<p>reply soon plz.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5536</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sun, 20 Jun 2010 15:52:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5536</guid>
		<description>Has anyone found a better way of doing this? I can&#039;t believe it&#039;s not very simple.</description>
		<content:encoded><![CDATA[<p>Has anyone found a better way of doing this? I can't believe it's not very simple.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mio</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5497</link>
		<dc:creator>mio</dc:creator>
		<pubDate>Sat, 22 May 2010 12:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5497</guid>
		<description>Hi ! Can you help me how to get color of any pixel (at specific position) of any part of monitor while my apllication will be minimized. Thank you</description>
		<content:encoded><![CDATA[<p>Hi ! Can you help me how to get color of any pixel (at specific position) of any part of monitor while my apllication will be minimized. Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rcolonel</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5422</link>
		<dc:creator>rcolonel</dc:creator>
		<pubDate>Wed, 07 Apr 2010 11:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5422</guid>
		<description>Thank you, this is very cognitive!
For a Windows Mobile (Compact Framework) I did as follows:

[DllImport(&quot;CoreDll.dll&quot;)]
static extern int GetPixel(IntPtr hDC, int x, int y);

static public Color GetPixelColor(IntPtr hDC, int x, int y)
{
  Color color = Color.Empty;
  int colorRef = GetPixel(hDC, x, y);
  color = Color.FromArgb(
    (int)(colorRef &amp; 0x000000FF),
    (int)(colorRef &amp; 0x0000FF00) &gt;&gt; 8,
    (int)(colorRef &amp; 0x00FF0000) &gt;&gt; 16);
  return color;
}
...
brsh = new SolidBrush(GetPixelColor(e.Graphics.GetHdc(), 0, 0));
...</description>
		<content:encoded><![CDATA[<p>Thank you, this is very cognitive!<br />
For a Windows Mobile (Compact Framework) I did as follows:</p>
<p>[DllImport("CoreDll.dll")]<br />
static extern int GetPixel(IntPtr hDC, int x, int y);</p>
<p>static public Color GetPixelColor(IntPtr hDC, int x, int y)<br />
{<br />
  Color color = Color.Empty;<br />
  int colorRef = GetPixel(hDC, x, y);<br />
  color = Color.FromArgb(<br />
    (int)(colorRef &amp; 0&#215;000000FF),<br />
    (int)(colorRef &amp; 0&#215;0000FF00) &gt;&gt; 8,<br />
    (int)(colorRef &amp; 0&#215;00FF0000) &gt;&gt; 16);<br />
  return color;<br />
}<br />
&#8230;<br />
brsh = new SolidBrush(GetPixelColor(e.Graphics.GetHdc(), 0, 0));<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5411</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Mon, 22 Mar 2010 13:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5411</guid>
		<description>@VampireSilence:  Make sure you have this:

using System.Runtime.InteropServices;</description>
		<content:encoded><![CDATA[<p>@VampireSilence:  Make sure you have this:</p>
<p>using System.Runtime.InteropServices;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: VampireSilence</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5410</link>
		<dc:creator>VampireSilence</dc:creator>
		<pubDate>Mon, 22 Mar 2010 01:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5410</guid>
		<description>On each appearance of &quot;DllImport&quot; i get an error. It says: type- or namespace wasnt found. What can i do ?

regards
 - VampireSilence</description>
		<content:encoded><![CDATA[<p>On each appearance of "DllImport" i get an error. It says: type- or namespace wasnt found. What can i do ?</p>
<p>regards<br />
 &#8211; VampireSilence</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Kerr</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-5299</link>
		<dc:creator>Joe Kerr</dc:creator>
		<pubDate>Wed, 07 Oct 2009 08:25:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-5299</guid>
		<description>timm
In support of Alan I have to say that I am highlighy disappointed, you failed to write an article that doea not take reader&#039;s stupidity into account.

Seriously tim, where is you catch( e IdiotReader ) handler?</description>
		<content:encoded><![CDATA[<p>timm<br />
In support of Alan I have to say that I am highlighy disappointed, you failed to write an article that doea not take reader's stupidity into account.</p>
<p>Seriously tim, where is you catch( e IdiotReader ) handler?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kingsly</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-4130</link>
		<dc:creator>kingsly</dc:creator>
		<pubDate>Mon, 19 Jan 2009 12:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-4130</guid>
		<description>this worked fine for my application... thanks...</description>
		<content:encoded><![CDATA[<p>this worked fine for my application&#8230; thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/comment-page-1/#comment-2929</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Tue, 02 Sep 2008 01:00:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/#comment-2929</guid>
		<description>Alan, you are not reading my article closely.  My code is to change the color of a pixel on a CONTROL, not on a bitmap.  And the very last line of my article says:

&quot;In that case, you will have to create a Bitmap from the control, then use the Bitmap&#039;s GetPixel method.&quot;</description>
		<content:encoded><![CDATA[<p>Alan, you are not reading my article closely.  My code is to change the color of a pixel on a CONTROL, not on a bitmap.  And the very last line of my article says:</p>
<p>"In that case, you will have to create a Bitmap from the control, then use the Bitmap's GetPixel method."</p>
]]></content:encoded>
	</item>
</channel>
</rss>
