<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CTRLALT313373.com</title>
    <link>http://weblog.ctrlalt313373.com/</link>
    <description>Codeine .Net</description>
    <language>en-us</language>
    <copyright>David A. Osborn</copyright>
    <lastBuildDate>Fri, 08 Dec 2017 03:29:57 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>davido@ctrlalt313373.com</managingEditor>
    <webMaster>davido@ctrlalt313373.com</webMaster>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=b204e843-e703-40d3-85fb-56561ca130bb</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,b204e843-e703-40d3-85fb-56561ca130bb.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,b204e843-e703-40d3-85fb-56561ca130bb.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b204e843-e703-40d3-85fb-56561ca130bb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I really really liked the HP MediaSmart
Windows Home Server that I bought years ago. It was one of the best Microsoft devices
that I have ever purchased and just sat in the corner doing its job quietly. Since
it was awesome, that means Microsoft created a new version that sucked and then discontinued
it. In Microsoft's defense they have baked a lot of the functionality directly into
Windows 10, but I wish they would have kept the Home Server platform alive. My Windows
Home Server is still chugging along, but I am slowly migrating its tasks to a Synology
RS816 NAS that I bought last year. I bought the RS816 specifically because it was
the cheapest rack mountable unit that Synology makes. So far I am enjoying having
it as an addition to my network and it has a host of features that just work, including
storing photos, security camera monitoring, and VPN access. The RS816 has built in
slots for 4 drives and I started out with two 4TB Western Digital Red drives in a
RAID 1 configuration, giving me a redundant 4TB of storage. I store movies on it in
an MKV format and Blue-ray movies in particular can be over 20GB in size so I quickly
started to fill up that 4TB of storage. Synology has made adding space a very easy
task and I put together a video that walks through installing new drives, from physically
putting the drives into the RS816 to configuring the drives in the DiskStation web
interface. I added two more 4TB Western Digital Red drives giving me a total of 12TB
(4 X 4TB drives in a Raid 5 configuration), using one of the drives for redundancy.
The one thing that stood out in the process is that it actually took 2 days for the
RAID to be reorganized onto the new drives. The original 4TB was still available for
read and write access during this time and after 2 days of the NAS working through
things the additional spaces was finally available. 
<br /><br /><iframe width="560" height="315" src="https://www.youtube.com/embed/dH3wM0DFUdQ" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen="allowfullscreen"></iframe><img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=b204e843-e703-40d3-85fb-56561ca130bb" /></body>
      <title>Adding Drives To A Synology NAS</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,b204e843-e703-40d3-85fb-56561ca130bb.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2017/12/08/AddingDrivesToASynologyNAS.aspx</link>
      <pubDate>Fri, 08 Dec 2017 03:29:57 GMT</pubDate>
      <description>I really really liked the HP MediaSmart Windows Home Server that I bought years ago.  It was one of the best Microsoft devices that I have ever purchased and just sat in the corner doing its job quietly.  Since it was awesome, that means Microsoft created a new version that sucked and then discontinued it.  In Microsoft's defense they have baked a lot of the functionality directly into Windows 10, but I wish they would have kept the Home Server platform alive.  My Windows Home Server is still chugging along, but I am slowly migrating its tasks to a Synology RS816 NAS that I bought last year.  I bought the RS816 specifically because it was the cheapest rack mountable unit that Synology makes.  So far I am enjoying having it as an addition to my network and it has a host of features that just work, including storing photos, security camera monitoring, and VPN access. 

The RS816 has built in slots for 4 drives and I started out with two 4TB Western Digital Red drives in a RAID 1 configuration, giving me a redundant 4TB of storage.  I store movies on it in an MKV format and Blue-ray movies in particular can be over 20GB in size so I quickly started to fill up that 4TB of storage.  Synology has made adding space a very easy task and I put together a video that walks through installing new drives, from physically putting the drives into the RS816 to configuring the drives in the DiskStation web interface. I added two more 4TB Western Digital Red drives giving me a total of 12TB (4 X 4TB drives in a Raid 5 configuration), using one of the drives for redundancy.  

The one thing that stood out in the process is that it actually took 2 days for the RAID to be reorganized onto the new drives.  The original 4TB was still available for read and write access during this time and after 2 days of the NAS working through things the additional spaces was finally available.
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/dH3wM0DFUdQ" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen&gt;
&lt;/iframe&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=b204e843-e703-40d3-85fb-56561ca130bb" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,b204e843-e703-40d3-85fb-56561ca130bb.aspx</comments>
      <category>Hardware</category>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=3a978076-a014-41d4-8b2f-82ade118bdce</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,3a978076-a014-41d4-8b2f-82ade118bdce.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,3a978076-a014-41d4-8b2f-82ade118bdce.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3a978076-a014-41d4-8b2f-82ade118bdce</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Well it has definitely been quite some
time since I wrote up a post. It even took me a while to remember the password to
log into my blog. Having three kids apparently really cuts down on the time to blog.
I'm hoping to start making more of an effort to post something on a regular basis.
I've gotten into several interesting hobbies and have been busy at work solving problems
so hopefully those things will unfold into some interesting blog posts. (Do people
even blog anymore?) I'm still an independent contractor and even though on my current
contract I was brought in as a .NET developer my job has really morphed into a problem
solver or MacGyver as I call it. I've had some interesting projects including figuring
out how to talk to some machinery via a canbus (and deciphering a lot of hex values)
along with a system of Raspberry Pis all across the globe running Windows 10 IOT.
I've also put together several Android apps for a client. Needless to say I work on
a variety of things which I like and find it hard to call myself solely a .NET Developer.
As for hobbies, I've been dabbling in a lot of different things that span the spectrum
of topics. I have always been very interested in hardware and electronics so after
building a respectable workbench, I have filled it with a soldering iron and drawers
of electronic components. I recently added to the workbench a 3D printer in order
to build respectable enclosures for my "research and development" department.<br /><br /><img src="http://weblog.ctrlalt313373.com/content/binary/IMG_2641.JPG" alt="IMG 2641" title="IMG_2641.JPG" border="0" width="600" height="450" /><br /><br /><p>
At the other end of the spectrum I have been working on my own aquaponics system in
order to grow a small amount of vegetables inside. It was a very interesting build
and I learned a lot about construction, plumbing, biology, and chemistry. 
</p><br /><br /><img src="http://weblog.ctrlalt313373.com/content/binary/IMG_2244.JPG" alt="IMG 2244" title="IMG_2244.JPG" border="0" width="600" height="450" /><br /><br />
I will have to admit that I am notorious for starting a project and not finishing
it so I was quite happy with myself when I completed this little functioning ecosystem.
Unfortunately, after several months I have yet to eat anything that has grown in it,
except 3 leaves of some random plant that definitely was not romaine lettuce. (As
a side note, pay attention to where the seed comes from that you are buying off Amazon.
Skip the stuff from China.). I'm still alive though and I hope to have the system
providing us with some lettuce and maybe even some cherry tomatoes this coming winter.
Until then at least the 4 goldfish are happily swimming around. Anyways, if anyone
is actually reading this blog or randomly comes across it then you can expect to see
any one of these upcoming topics appear in a post as this blog begins to evolve in
the coming months. <img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=3a978076-a014-41d4-8b2f-82ade118bdce" /></body>
      <title>What's Been Going On</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,3a978076-a014-41d4-8b2f-82ade118bdce.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2017/09/28/WhatsBeenGoingOn.aspx</link>
      <pubDate>Thu, 28 Sep 2017 03:21:27 GMT</pubDate>
      <description>Well it has definitely been quite some time since I wrote up a post.  It even took me a while to remember the password to log into my blog. Having three kids apparently really cuts down on the time to blog.  I'm hoping to start making more of an effort to post something on a regular basis.  I've gotten into several interesting hobbies and have been busy at work solving problems so hopefully those things will unfold into some interesting blog posts. (Do people even blog anymore?)

I'm still an independent contractor and even though on my current contract I was brought in as a .NET developer my job has really morphed into a problem solver or MacGyver as I call it.  I've had some interesting projects including figuring out how to talk to some machinery via a canbus (and deciphering a lot of hex values) along with a system of Raspberry Pis all across the globe running Windows 10 IOT.  I've also put together several Android apps for a client.  Needless to say I work on a variety of things which I like and find it hard to call myself solely a .NET Developer.

As for hobbies, I've been dabbling in a lot of different things that span the spectrum of topics.  I have always been very interested in hardware and electronics so after building a respectable workbench, I have filled it with a soldering iron and drawers of electronic components.  I recently added to the workbench a 3D printer in order to build respectable enclosures for my "research and development" department.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://weblog.ctrlalt313373.com/content/binary/IMG_2641.JPG" alt="IMG 2641" title="IMG_2641.JPG" border="0" width="600" height="450" /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
At the other end of the spectrum I have been working on my own aquaponics system in
order to grow a small amount of vegetables inside. It was a very interesting build
and I learned a lot about construction, plumbing, biology, and chemistry. 
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://weblog.ctrlalt313373.com/content/binary/IMG_2244.JPG" alt="IMG 2244" title="IMG_2244.JPG" border="0" width="600" height="450" /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will have to admit that I am notorious for starting a project and not finishing
it so I was quite happy with myself when I completed this little functioning ecosystem.
Unfortunately, after several months I have yet to eat anything that has grown in it,
except 3 leaves of some random plant that definitely was not romaine lettuce. (As
a side note, pay attention to where the seed comes from that you are buying off Amazon.
Skip the stuff from China.). I'm still alive though and I hope to have the system
providing us with some lettuce and maybe even some cherry tomatoes this coming winter.
Until then at least the 4 goldfish are happily swimming around. Anyways, if anyone
is actually reading this blog or randomly comes across it then you can expect to see
any one of these upcoming topics appear in a post as this blog begins to evolve in
the coming months. &lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=3a978076-a014-41d4-8b2f-82ade118bdce" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,3a978076-a014-41d4-8b2f-82ade118bdce.aspx</comments>
      <category>Ramblings</category>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=fe941c82-cbb2-4835-8412-daf53c75096b</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,fe941c82-cbb2-4835-8412-daf53c75096b.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,fe941c82-cbb2-4835-8412-daf53c75096b.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fe941c82-cbb2-4835-8412-daf53c75096b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">What does it mean???? Could some actual
content be forth coming????<img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=fe941c82-cbb2-4835-8412-daf53c75096b" /></body>
      <title>Whoa!! A Test Post After 4 Years Silient!</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,fe941c82-cbb2-4835-8412-daf53c75096b.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2017/09/21/WhoaATestPostAfter4YearsSilient.aspx</link>
      <pubDate>Thu, 21 Sep 2017 02:46:49 GMT</pubDate>
      <description>What does it mean????  Could some actual content be forth coming????&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=fe941c82-cbb2-4835-8412-daf53c75096b" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,fe941c82-cbb2-4835-8412-daf53c75096b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=ad97c434-0e6b-4346-8550-8688b0f651fa</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,ad97c434-0e6b-4346-8550-8688b0f651fa.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,ad97c434-0e6b-4346-8550-8688b0f651fa.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ad97c434-0e6b-4346-8550-8688b0f651fa</wfw:commentRss>
      <title>Connected Home – Garage Door</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,ad97c434-0e6b-4346-8550-8688b0f651fa.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2013/11/18/ConnectedHomeGarageDoor.aspx</link>
      <pubDate>Mon, 18 Nov 2013 02:10:23 GMT</pubDate>
      <description>&lt;p&gt;
If you haven't been living under a rock lately then you have probably heard the term
"The Internet of Things" getting thrown around to refer to non-computer items that
are getting hooked up to the Internet. Conceptually this seems great, but it made
me think about what items I can and what items I would even want to connect to the
internet. That's when I remembered this little thing from Liftmaster. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.amazon.com/gp/product/B005FT4N2M/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B005FT4N2M&amp;linkCode=as2&amp;tag=ctrlalt313373-20" target="_blank"&gt;Liftmaster
828LM Garage Door Opener Internet Gateway&lt;/a&gt;&lt;img src="http://ir-na.amazon-adsystem.com/e/ir?t=ctrlalt313373-20&amp;l=as2&amp;o=1&amp;a=B005FT4N2M" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; 
&lt;/p&gt;
&lt;p&gt;
For about $30 this little box allows you to never have to turn your car around again
to check if you left your garage door open. More specifically, it allows you to connect
your newer Liftmaster garage door opener(s) to the Internet and then check the status
of your garage door(s) from you IPhone or Android device. I had originally came across
this when we first moved into our house, when I was looking up the garage door opener
model that we had, but at the time Liftmaster wanted $1 a month for the service. Now
they have made it free once you buy the device. 
&lt;/p&gt;
&lt;p&gt;
Setup is pretty easy. It plugs into your network via a built in ethernet jack and
then links up to your opener(s) via Liftmaster's MyQ technology. You need to make
sure that your opener is compatible, but if it is then its a simple task to set it
up. I downloaded the IPhone app and it easily walked me through the setup. The most
annoying part was needing to pull out a ladder to press the button on my garage door
opener in order to link the two devices. Once all is setup you can now check whether
your garage door(s) are open or closed from anywhere with internet access along with
opening and closing them. You can also setup alerts to notify you of various states,
like if your garage door has been left open at night. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://weblog.ctrlalt313373.com/content/binary/111813_0214_ConnectedHo1.png" alt="" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Chamberlain, which is a sister brand of Liftmaster has what looks like the exact same
product for that line of openers (the CIGBU) and based on the screenshots I have seen
of the phone application and website it works exactly the same. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.amazon.com/gp/product/B00B7CDSQ8/ref=as_li_tf_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00B7CDSQ8&amp;linkCode=as2&amp;tag=ctrlalt313373-20" target="_blank"&gt;Chamberlain
CIGBU MYQ Internet Gateway&lt;/a&gt;&lt;img src="http://ir-na.amazon-adsystem.com/e/ir?t=ctrlalt313373-20&amp;l=as2&amp;o=1&amp;a=B00B7CDSQ8" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=ad97c434-0e6b-4346-8550-8688b0f651fa" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,ad97c434-0e6b-4346-8550-8688b0f651fa.aspx</comments>
      <category>Connected Home</category>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=26f4359f-145a-486c-966d-d44f044ab4e9</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,26f4359f-145a-486c-966d-d44f044ab4e9.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,26f4359f-145a-486c-966d-d44f044ab4e9.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=26f4359f-145a-486c-966d-d44f044ab4e9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have been doing a bit of work lately analyzing images from both video streams and
static pictures and apparently I have found the process interesting enough to write
about it. It's not very often that I can get away from the standard CRUD type application
and I really found it interesting to dig into the basics of image analysis. 
</p>
        <p>
For the tasks I have been working on I've needed to get down to the individual pixels
of an image. There are various ways to do this, some of them possibly easier than
what I am going to be walking through, but due to the circumstances of what I needed
to do this was then best method for me to accomplish it. 
</p>
        <p>
        </p>
        <p>
First you need to get the jpeg into a BitmapImage object. It's a pretty simple task,
especially if it is coming from a file. 
</p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:#2b91af">BitmapImage</span> sourceImage
= <span style="color:blue">new</span><span style="color:#2b91af">BitmapImage</span>(<span style="color:blue">new</span><span style="color:#2b91af">Uri</span>(<span style="color:#a31515">"TestImage.jpg"</span>));<span style="color:#a31515"></span></span>
        </p>
        <p>
        </p>
        <p>
Next we need to get the image into a byte array. This is a bit more complicated, but
really isn't that bad 
</p>
        <p>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:blue">int</span> stride
= (sourceImage.PixelWidth * sourceImage.Format.BitsPerPixel + 7) / 8; </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:blue">int</span> size
= sourceImage.PixelHeight * stride; </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:blue">byte</span>[]
pixelData = <span style="color:blue">new</span><span style="color:blue">byte</span>[size]; </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">sourceImage.CopyPixels(pixelData,
stride, 0); </span>
        </p>
        <p>
        </p>
        <p>
The most complex thing here is understanding what the stride is. Stride is the number
of bytes in each row of the image. We basically take the number of pixels wide and
multiple that by the number of bits per pixel which is a property off of the image.
Since there are 8 bits in a byte we divide by 8 to get the number of bytes. The next
key thing is the size of the byte array that we need which can be calculated by the
PixelHeight multiplied by the stride. Finally we copy this into an array. We now have
an array of bits that constitute the image. 
</p>
        <p>
        </p>
        <p>
Let's assume for explanation purposes that our image is a 32bit image. That means
that each pixel is "described" using 4 bytes. 1 byte is for the alpha channel, and
the other three are for the RGB values. To loop through each pixel we do the following: 
</p>
        <p>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:blue">for</span> (<span style="color:blue">int</span> i
= 0; i &lt; pixelData.Length; i += 4) </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt"> { </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:blue">byte</span> blue
= pixelData[i]; </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:blue">byte</span> green
= pixelData[i + 1]; </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:blue">byte</span> red
= pixelData[i + 2]; </span>
        </p>
        <p style="margin-left: 36pt">
} 
</p>
        <p>
It's basically your standard for loop except we add 4 on each iteration of the loop.
This is because we are looping though each pixel, but 1 pixel is represented by 4
bytes. Byte i is the blue channel, byte i + 1 is the green channel, byte i + 2 is
the red channel, and finally byte i + 3 is the alpha channel. The table below represents
the array for a 2 pixel wide by 8 pixel high image where each cell is a byte in the
array and every four cells in 1 pixel. Hopefully this helps to visualize the layout
of the data. 
</p>
        <p>
        </p>
        <div>
          <table style="border-collapse:collapse" border="0">
            <colgroup>
              <col style="width:80px" />
              <col style="width:80px" />
              <col style="width:80px" />
              <col style="width:80px" />
              <col style="width:80px" />
              <col style="width:80px" />
              <col style="width:80px" />
              <col style="width:80px" />
            </colgroup>
            <tbody valign="top">
              <tr>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
A
</p>
                </td>
              </tr>
              <tr>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
              </tr>
              <tr>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
A
</p>
                </td>
              </tr>
              <tr>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
              </tr>
              <tr>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
A
</p>
                </td>
              </tr>
              <tr>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
              </tr>
              <tr>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt">
                  <p>
A
</p>
                </td>
              </tr>
              <tr>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
                  <p>
B
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
                  <p>
G
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
                  <p>
R
</p>
                </td>
                <td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
B
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
G
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
R
</p>
                </td>
                <td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt">
                  <p>
A
</p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <p>
        </p>
        <p>
Finally while in the loop you can set each byte to the proper RGB color values to
manipulate the image how you want and then you convert the array back into an image
using the below code. 
</p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">
            <span style="color:#2b91af">WriteableBitmap</span> wBmp
= <span style="color:blue">new</span><span style="color:#2b91af">WriteableBitmap</span>(sourceImage.PixelWidth,
sourceImage.PixelHeight, sourceImage.DpiX, </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt"> sourceImage.DpiY, <span style="color:#2b91af">PixelFormats</span>.Bgr32, <span style="color:blue">null</span>); </span>
        </p>
        <p>
          <span style="font-family:Consolas; font-size:9pt">wBmp.WritePixels(<span style="color:blue">new</span><span style="color:#2b91af">Int32Rect</span>(0,
0, sourceImage.PixelWidth, sourceImage.PixelHeight), pixelData, stride, 0); </span>
        </p>
        <p>
        </p>
        <p>
That's the basics of how to access the individual RGB values for each pixel in an
image. It's pretty simple once you wrap you head around how each pixel relates to
a byte.
</p>
        <img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=26f4359f-145a-486c-966d-d44f044ab4e9" />
      </body>
      <title>Analyzing Jpgs Byte By Byte</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,26f4359f-145a-486c-966d-d44f044ab4e9.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2012/07/09/AnalyzingJpgsByteByByte.aspx</link>
      <pubDate>Mon, 09 Jul 2012 22:16:07 GMT</pubDate>
      <description>&lt;p&gt;
I have been doing a bit of work lately analyzing images from both video streams and
static pictures and apparently I have found the process interesting enough to write
about it. It's not very often that I can get away from the standard CRUD type application
and I really found it interesting to dig into the basics of image analysis. 
&lt;/p&gt;
&lt;p&gt;
For the tasks I have been working on I've needed to get down to the individual pixels
of an image. There are various ways to do this, some of them possibly easier than
what I am going to be walking through, but due to the circumstances of what I needed
to do this was then best method for me to accomplish it. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
First you need to get the jpeg into a BitmapImage object. It's a pretty simple task,
especially if it is coming from a file. 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;&lt;span style="color:#2b91af"&gt;BitmapImage&lt;/span&gt; sourceImage
= &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;BitmapImage&lt;/span&gt;(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;Uri&lt;/span&gt;(&lt;span style="color:#a31515"&gt;"TestImage.jpg"&lt;/span&gt;));&lt;span style="color:#a31515"&gt; &lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Next we need to get the image into a byte array. This is a bit more complicated, but
really isn't that bad 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;&lt;span style="color:blue"&gt;int&lt;/span&gt; stride
= (sourceImage.PixelWidth * sourceImage.Format.BitsPerPixel + 7) / 8; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;&lt;span style="color:blue"&gt;int&lt;/span&gt; size
= sourceImage.PixelHeight * stride; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;&lt;span style="color:blue"&gt;byte&lt;/span&gt;[]
pixelData = &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:blue"&gt;byte&lt;/span&gt;[size]; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;sourceImage.CopyPixels(pixelData,
stride, 0); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The most complex thing here is understanding what the stride is. Stride is the number
of bytes in each row of the image. We basically take the number of pixels wide and
multiple that by the number of bits per pixel which is a property off of the image.
Since there are 8 bits in a byte we divide by 8 to get the number of bytes. The next
key thing is the size of the byte array that we need which can be calculated by the
PixelHeight multiplied by the stride. Finally we copy this into an array. We now have
an array of bits that constitute the image. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Let's assume for explanation purposes that our image is a 32bit image. That means
that each pixel is "described" using 4 bytes. 1 byte is for the alpha channel, and
the other three are for the RGB values. To loop through each pixel we do the following: 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;&lt;span style="color:blue"&gt;for&lt;/span&gt; (&lt;span style="color:blue"&gt;int&lt;/span&gt; i
= 0; i &amp;lt; pixelData.Length; i += 4) &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt; { &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;&lt;span style="color:blue"&gt;byte&lt;/span&gt; blue
= pixelData[i]; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt; &lt;span style="color:blue"&gt;byte&lt;/span&gt; green
= pixelData[i + 1]; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt; &lt;span style="color:blue"&gt;byte&lt;/span&gt; red
= pixelData[i + 2]; &lt;/span&gt;
&lt;/p&gt;
&lt;p style="margin-left: 36pt"&gt;
} 
&lt;/p&gt;
&lt;p&gt;
It's basically your standard for loop except we add 4 on each iteration of the loop.
This is because we are looping though each pixel, but 1 pixel is represented by 4
bytes. Byte i is the blue channel, byte i + 1 is the green channel, byte i + 2 is
the red channel, and finally byte i + 3 is the alpha channel. The table below represents
the array for a 2 pixel wide by 8 pixel high image where each cell is a byte in the
array and every four cells in 1 pixel. Hopefully this helps to visualize the layout
of the data. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse:collapse" border="0"&gt;
&lt;colgroup&gt;
&lt;col style="width:80px" /&gt;
&lt;col style="width:80px" /&gt;
&lt;col style="width:80px" /&gt;
&lt;col style="width:80px" /&gt;
&lt;col style="width:80px" /&gt;
&lt;col style="width:80px" /&gt;
&lt;col style="width:80px" /&gt;
&lt;col style="width:80px" /&gt;
&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 2.25pt; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #c6d9f1; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
B
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
G
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
R
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #f2dbdb; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 2.25pt; border-right:  solid 2.25pt"&gt;
&lt;p&gt;
A
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Finally while in the loop you can set each byte to the proper RGB color values to
manipulate the image how you want and then you convert the array back into an image
using the below code. 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;&lt;span style="color:#2b91af"&gt;WriteableBitmap&lt;/span&gt; wBmp
= &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;WriteableBitmap&lt;/span&gt;(sourceImage.PixelWidth,
sourceImage.PixelHeight, sourceImage.DpiX, &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt; sourceImage.DpiY, &lt;span style="color:#2b91af"&gt;PixelFormats&lt;/span&gt;.Bgr32, &lt;span style="color:blue"&gt;null&lt;/span&gt;); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Consolas; font-size:9pt"&gt;wBmp.WritePixels(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;Int32Rect&lt;/span&gt;(0,
0, sourceImage.PixelWidth, sourceImage.PixelHeight), pixelData, stride, 0); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
That's the basics of how to access the individual RGB values for each pixel in an
image. It's pretty simple once you wrap you head around how each pixel relates to
a byte.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=26f4359f-145a-486c-966d-d44f044ab4e9" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,26f4359f-145a-486c-966d-d44f044ab4e9.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=fc2217ea-1097-482a-91cb-9c8fdc2a5190</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,fc2217ea-1097-482a-91cb-9c8fdc2a5190.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,fc2217ea-1097-482a-91cb-9c8fdc2a5190.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fc2217ea-1097-482a-91cb-9c8fdc2a5190</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
Well, it has been pretty quiet on this blog for a while. It has been a busy year,
including getting married, and I just haven't had the time to sit down and write up
some posts. As you can see from my past postings I like to break things down with
code samples and walkthroughs that let even the most inexperienced person understand
what is going on, which can take some time to do. Hopefully in the future I can get
a few posts up about Azure as I have been working in it a lot lately as well as some
fun posts on working with the MS Kinect SDK. 
</p>
        <p>
          <img src="http://weblog.ctrlalt313373.com/content/binary/101111_0226_BigChangesN1.png" alt="" />
        </p>
        <p>
This blog post is actually about my latest venture, <a href="http://www.risiti.com">Risiti</a>.
Our goal with Risiti is to begin streamlining the retail process buy building on the
relationship that is established between a merchant and a customer at the time of
purchase. The first step in building this relationship is creating an electronic receipt
from the merchant for the customer. This first step is complex, but extremely beneficial
to the customer allowing them to no longer worry about the frustration of paper receipts.
I don't know about you, but when I make a purchase the paper receipt goes directly
into my wallet, then once my wallet gets too thick they move onto the top of my dresser
(see the picture below of my latest pile). Finally once the top of the dresser is
covered with receipts I sort them, keeping the ones that I think I still may need,
and shred the rest. Rarely do I ever buy anything that I need to return, but there
is always that chance, especially around the holidays. On top of that I am a small
business owner and I need to keep any receipts from business expenses, not to mention
needing to save them for insurance and warranty purposes. 
</p>
        <p>
          <img src="http://weblog.ctrlalt313373.com/content/binary/101111_0226_BigChangesN2.jpg" alt="" />
        </p>
        <p>
We're tackling this problem on two fronts. Our ultimate goal is direct integration
with the merchants you shop at. We realize this is the best user experience for the
customer, but unfortunately businesses, in general, can be slow to adopt new technologies
like this so as we work on building our merchant network we are giving customers the
ability to upload their receipts into the system themselves via email. If your receipt
is already in an electronic format, say an email from your latest Amazon purchase,
simply forward in the email to our system and it will take care of storing it for
you. For paper receipts, just pull that camera phone out of your pocket, snap a picture
of it, and email it in as an attachment from your phone. 
</p>
        <p>
Whereas storing your receipts electronically is a great goal, we want to go beyond
that. We want to use that information to help you build a relationship with the merchants
you shop at often. From the merchant standpoint, statistics indicate that it is much
more difficult to gain a new customer than it is to retain an existing customer. Based
on that, we want you to be able to let a merchant know if you received a poor shopping
experience so that they can correct the situation before they lose you as a customer.
Beyond that we would like to work with the merchants you shop at to offer you deals
and discounts that may interest you based on what you have already bought from them.
Don't worry; at no point will we be giving out your personally identifiable purchase
information. We want our friends and family to use Risiti and that isn't how we want
to be treating out friends and family. 
</p>
        <p>
It's a big venture that we see as being beneficial to everyone and we would really
appreciate your feedback on the process. We'll be slowly sending out beta invites
and making improvements based on your feedback. If you're interested in participating
in the beta then head on over to the <a href="http://www.risiti.com">website</a> and
sign up for updates as we will be using this list to send out beta invitations. If
you're not interested in participating I would still appreciate hearing your feedback
on why you aren't interested. If you like the idea, head on over and like us on <a href="http://www.facebook.com/pages/Risiti/276016519079408">Facebook</a> and
follow <a href="http://twitter.com/risitiusa">@RisitiUSA</a> on Twitter. Finally,
when you're shopping at your favorite merchant ask them why they're not using Risiti!
</p>
        <img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=fc2217ea-1097-482a-91cb-9c8fdc2a5190" />
      </body>
      <title>Big Changes, New Opportunities</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,fc2217ea-1097-482a-91cb-9c8fdc2a5190.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2011/10/11/BigChangesNewOpportunities.aspx</link>
      <pubDate>Tue, 11 Oct 2011 02:26:37 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Well, it has been pretty quiet on this blog for a while. It has been a busy year,
including getting married, and I just haven't had the time to sit down and write up
some posts. As you can see from my past postings I like to break things down with
code samples and walkthroughs that let even the most inexperienced person understand
what is going on, which can take some time to do. Hopefully in the future I can get
a few posts up about Azure as I have been working in it a lot lately as well as some
fun posts on working with the MS Kinect SDK. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://weblog.ctrlalt313373.com/content/binary/101111_0226_BigChangesN1.png" alt="" /&gt; 
&lt;/p&gt;
&lt;p&gt;
This blog post is actually about my latest venture, &lt;a href="http://www.risiti.com"&gt;Risiti&lt;/a&gt;.
Our goal with Risiti is to begin streamlining the retail process buy building on the
relationship that is established between a merchant and a customer at the time of
purchase. The first step in building this relationship is creating an electronic receipt
from the merchant for the customer. This first step is complex, but extremely beneficial
to the customer allowing them to no longer worry about the frustration of paper receipts.
I don't know about you, but when I make a purchase the paper receipt goes directly
into my wallet, then once my wallet gets too thick they move onto the top of my dresser
(see the picture below of my latest pile). Finally once the top of the dresser is
covered with receipts I sort them, keeping the ones that I think I still may need,
and shred the rest. Rarely do I ever buy anything that I need to return, but there
is always that chance, especially around the holidays. On top of that I am a small
business owner and I need to keep any receipts from business expenses, not to mention
needing to save them for insurance and warranty purposes. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://weblog.ctrlalt313373.com/content/binary/101111_0226_BigChangesN2.jpg" alt="" /&gt; 
&lt;/p&gt;
&lt;p&gt;
We're tackling this problem on two fronts. Our ultimate goal is direct integration
with the merchants you shop at. We realize this is the best user experience for the
customer, but unfortunately businesses, in general, can be slow to adopt new technologies
like this so as we work on building our merchant network we are giving customers the
ability to upload their receipts into the system themselves via email. If your receipt
is already in an electronic format, say an email from your latest Amazon purchase,
simply forward in the email to our system and it will take care of storing it for
you. For paper receipts, just pull that camera phone out of your pocket, snap a picture
of it, and email it in as an attachment from your phone. 
&lt;/p&gt;
&lt;p&gt;
Whereas storing your receipts electronically is a great goal, we want to go beyond
that. We want to use that information to help you build a relationship with the merchants
you shop at often. From the merchant standpoint, statistics indicate that it is much
more difficult to gain a new customer than it is to retain an existing customer. Based
on that, we want you to be able to let a merchant know if you received a poor shopping
experience so that they can correct the situation before they lose you as a customer.
Beyond that we would like to work with the merchants you shop at to offer you deals
and discounts that may interest you based on what you have already bought from them.
Don't worry; at no point will we be giving out your personally identifiable purchase
information. We want our friends and family to use Risiti and that isn't how we want
to be treating out friends and family. 
&lt;/p&gt;
&lt;p&gt;
It's a big venture that we see as being beneficial to everyone and we would really
appreciate your feedback on the process. We'll be slowly sending out beta invites
and making improvements based on your feedback. If you're interested in participating
in the beta then head on over to the &lt;a href="http://www.risiti.com"&gt;website&lt;/a&gt; and
sign up for updates as we will be using this list to send out beta invitations. If
you're not interested in participating I would still appreciate hearing your feedback
on why you aren't interested. If you like the idea, head on over and like us on &lt;a href="http://www.facebook.com/pages/Risiti/276016519079408"&gt;Facebook&lt;/a&gt; and
follow &lt;a href="http://twitter.com/risitiusa"&gt;@RisitiUSA&lt;/a&gt; on Twitter. Finally,
when you're shopping at your favorite merchant ask them why they're not using Risiti!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=fc2217ea-1097-482a-91cb-9c8fdc2a5190" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,fc2217ea-1097-482a-91cb-9c8fdc2a5190.aspx</comments>
      <category>Risiti</category>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=1c24172e-48e6-483f-9c10-fa740ecb48f1</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,1c24172e-48e6-483f-9c10-fa740ecb48f1.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,1c24172e-48e6-483f-9c10-fa740ecb48f1.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1c24172e-48e6-483f-9c10-fa740ecb48f1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt">I've been working on
a fairly large project the last few months which required SQL replication where the
server that hosted the publication didn't run on the default port. I don't know what
SQL Server 2008's issue is with replication on anything besides the default port,
but my windows service that handled the syncing would always error out. (I'm doing
a pull subscription with SQL Express 2008 so there is no SQL Agent to handle the syncing
for me.) My work around for this was to create a SQL Server Alias during installation
of my application. You need to reference the dll Microsoft.SqlServer.SqlWmiManagement.dll
to do this. (It's possible you may need to reference another dll, but I already had
several SQL Server dlls referenced for the actual replication code I had written).
This dll can be found in the SDK which you get installed when you install SQL Server
2008. Look for it in the folder that was created in your Program Files. The name space
you will be working with is Microsoft.SqlServer.Management.Smo.Wmi. Below is some
example code on how to do it in C#. </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt">using Microsoft.SqlServer.Management.Smo.Wmi; </span>
        </p>
        <p>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> public void CreateAlias() </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> { </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> ManagedComputer mc =
new ManagedComputer(); </span>
        </p>
        <p>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> ServerAlias alias =
new ServerAlias(); </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> alias.Parent = mc; </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> alias.ServerName = <em>Server
Address</em>; </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> alias.Name = <em>Name
for your alias</em>; </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> alias.ConnectionString
= <em>Port number as string</em>; </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> alias.ProtocolName =
"tcp"; </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> alias.Create(); </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> } </span>
        </p>
        <p>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> public bool DoesAliasExist() </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> { </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> ManagedComputer mc =
new ManagedComputer(); </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> bool result = false; </span>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> foreach (ServerAlias
serverAlias in mc.ServerAliases) </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> { </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> if(serverAlias.Name.ToUpper()
== <em>Name for your alias</em>) </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> { </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> result = true; </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> } </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> } </span>
        </p>
        <p>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> return result; </span>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt"> } </span>
        </p>
        <p>
        </p>
        <p>
          <span style="color:black; font-family:Arial; font-size:10pt">I tried using a completely
different name for the alias, but couldn't get replication to work until I created
the alias name as the server name, then things started working nicely. That seemed
a bit strange to me as you would think I should be able to name the alias whatever
I wanted. Hopefully someone else will find this helpful and it will save them some
searching.</span>
        </p>
        <img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=1c24172e-48e6-483f-9c10-fa740ecb48f1" />
      </body>
      <title>Creating a SQL Server Alias with Code</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,1c24172e-48e6-483f-9c10-fa740ecb48f1.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2011/01/31/CreatingASQLServerAliasWithCode.aspx</link>
      <pubDate>Mon, 31 Jan 2011 01:28:30 GMT</pubDate>
      <description>&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt;I've been working on
a fairly large project the last few months which required SQL replication where the
server that hosted the publication didn't run on the default port. I don't know what
SQL Server 2008's issue is with replication on anything besides the default port,
but my windows service that handled the syncing would always error out. (I'm doing
a pull subscription with SQL Express 2008 so there is no SQL Agent to handle the syncing
for me.) My work around for this was to create a SQL Server Alias during installation
of my application. You need to reference the dll Microsoft.SqlServer.SqlWmiManagement.dll
to do this. (It's possible you may need to reference another dll, but I already had
several SQL Server dlls referenced for the actual replication code I had written).
This dll can be found in the SDK which you get installed when you install SQL Server
2008. Look for it in the folder that was created in your Program Files. The name space
you will be working with is Microsoft.SqlServer.Management.Smo.Wmi. Below is some
example code on how to do it in C#. &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt;using Microsoft.SqlServer.Management.Smo.Wmi; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; public void CreateAlias() &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; { &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; ManagedComputer mc =
new ManagedComputer(); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; ServerAlias alias =
new ServerAlias(); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; alias.Parent = mc; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; alias.ServerName = &lt;em&gt;Server
Address&lt;/em&gt;; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; alias.Name = &lt;em&gt;Name
for your alias&lt;/em&gt;; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; alias.ConnectionString
= &lt;em&gt;Port number as string&lt;/em&gt;; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; alias.ProtocolName =
"tcp"; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; alias.Create(); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; } &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; public bool DoesAliasExist() &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; { &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; ManagedComputer mc =
new ManagedComputer(); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; bool result = false; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; foreach (ServerAlias
serverAlias in mc.ServerAliases) &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; { &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; if(serverAlias.Name.ToUpper()
== &lt;em&gt;Name for your alias&lt;/em&gt;) &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; { &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; result = true; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; } &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; } &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; return result; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt; } &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color:black; font-family:Arial; font-size:10pt"&gt;I tried using a completely
different name for the alias, but couldn't get replication to work until I created
the alias name as the server name, then things started working nicely. That seemed
a bit strange to me as you would think I should be able to name the alias whatever
I wanted. Hopefully someone else will find this helpful and it will save them some
searching.&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=1c24172e-48e6-483f-9c10-fa740ecb48f1" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,1c24172e-48e6-483f-9c10-fa740ecb48f1.aspx</comments>
      <category>Development</category>
      <category>SQL Replication</category>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=f54e3866-500f-4e38-aee1-3f6e7b16bc6b</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,f54e3866-500f-4e38-aee1-3f6e7b16bc6b.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,f54e3866-500f-4e38-aee1-3f6e7b16bc6b.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f54e3866-500f-4e38-aee1-3f6e7b16bc6b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I know this blog has been pretty quiet for a while. Hopefully some new posts are coming
soon based on getting inspired from the latest Iowa Code Camp on May 1<sup>st</sup>.
For now I am just testing to verify that I can post from Word 2010 to dasBlog using
the MetaWebLog API. For future reference for myself the url to use for dasBlog to
access the MetaWebLog API is {url}/blogger.aspx
</p>
        <img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=f54e3866-500f-4e38-aee1-3f6e7b16bc6b" />
      </body>
      <title>dasBlog and MetaWebLog</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,f54e3866-500f-4e38-aee1-3f6e7b16bc6b.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2010/05/02/dasBlogAndMetaWebLog.aspx</link>
      <pubDate>Sun, 02 May 2010 15:36:18 GMT</pubDate>
      <description>&lt;p&gt;
I know this blog has been pretty quiet for a while. Hopefully some new posts are coming
soon based on getting inspired from the latest Iowa Code Camp on May 1&lt;sup&gt;st&lt;/sup&gt;.
For now I am just testing to verify that I can post from Word 2010 to dasBlog using
the MetaWebLog API. For future reference for myself the url to use for dasBlog to
access the MetaWebLog API is {url}/blogger.aspx
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=f54e3866-500f-4e38-aee1-3f6e7b16bc6b" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,f54e3866-500f-4e38-aee1-3f6e7b16bc6b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=a7556657-9157-4b3b-a449-07a22cf7c9c1</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,a7556657-9157-4b3b-a449-07a22cf7c9c1.aspx</pingback:target>
      <dc:creator>David A. Osborn</dc:creator>
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,a7556657-9157-4b3b-a449-07a22cf7c9c1.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a7556657-9157-4b3b-a449-07a22cf7c9c1</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Unfortunately for you this post isn't very
interesting.  I'm just testing things out after upgraded DasBlog to version 2.3
an moving everything to my hosting provider.<br /><p></p><img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=a7556657-9157-4b3b-a449-07a22cf7c9c1" /></body>
      <title>Upgraded DasBlog</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,a7556657-9157-4b3b-a449-07a22cf7c9c1.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2009/11/28/UpgradedDasBlog.aspx</link>
      <pubDate>Sat, 28 Nov 2009 04:08:04 GMT</pubDate>
      <description>Unfortunately for you this post isn't very interesting.&amp;nbsp; I'm just testing things out after upgraded DasBlog to version 2.3 an moving everything to my hosting provider.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=a7556657-9157-4b3b-a449-07a22cf7c9c1" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,a7556657-9157-4b3b-a449-07a22cf7c9c1.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ctrlalt313373.com/Trackback.aspx?guid=871765c5-65c2-4849-8974-e38c35b3f5ad</trackback:ping>
      <pingback:server>http://weblog.ctrlalt313373.com/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ctrlalt313373.com/PermaLink,guid,871765c5-65c2-4849-8974-e38c35b3f5ad.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://weblog.ctrlalt313373.com/CommentView,guid,871765c5-65c2-4849-8974-e38c35b3f5ad.aspx</wfw:comment>
      <wfw:commentRss>http://weblog.ctrlalt313373.com/SyndicationService.asmx/GetEntryCommentsRss?guid=871765c5-65c2-4849-8974-e38c35b3f5ad</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is one of those blog posts that is getting written mostly for my future reference,
but someone out there may possibly find it useful as well. Recently Mediacom, the
local cable provider, decided to move around a few channels and I found myself needing
to update my MythTV box so that it knew the proper channels to record my shows from.
This turned out to be fairly simple. I logged into the box via ssh and executed a
su command to elevate myself to the root account. Then I executed the following command: 
</p>
        <p>
$ mythfilldatabase --do-channel-updates 
</p>
        <p>
After a few minutes of updates, everything was taken care of. There was no need to
reboot the computer and my records still existed unharmed. 
</p>
        <p>
        </p>
        <img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=871765c5-65c2-4849-8974-e38c35b3f5ad" />
      </body>
      <title>Updating Channels in MythTV</title>
      <guid isPermaLink="false">http://weblog.ctrlalt313373.com/PermaLink,guid,871765c5-65c2-4849-8974-e38c35b3f5ad.aspx</guid>
      <link>http://weblog.ctrlalt313373.com/2009/06/07/UpdatingChannelsInMythTV.aspx</link>
      <pubDate>Sun, 07 Jun 2009 17:16:18 GMT</pubDate>
      <description>&lt;p&gt;
This is one of those blog posts that is getting written mostly for my future reference,
but someone out there may possibly find it useful as well. Recently Mediacom, the
local cable provider, decided to move around a few channels and I found myself needing
to update my MythTV box so that it knew the proper channels to record my shows from.
This turned out to be fairly simple. I logged into the box via ssh and executed a
su command to elevate myself to the root account. Then I executed the following command: 
&lt;/p&gt;
&lt;p&gt;
$ mythfilldatabase --do-channel-updates 
&lt;/p&gt;
&lt;p&gt;
After a few minutes of updates, everything was taken care of. There was no need to
reboot the computer and my records still existed unharmed. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ctrlalt313373.com/aggbug.ashx?id=871765c5-65c2-4849-8974-e38c35b3f5ad" /&gt;</description>
      <comments>http://weblog.ctrlalt313373.com/CommentView,guid,871765c5-65c2-4849-8974-e38c35b3f5ad.aspx</comments>
    </item>
  </channel>
</rss>