Avian Waves : Blog
Topic: Tech
Search Blog
 
Recent Comments
Bulk Local Administrator Password Management Tool (15)
rcmichelle: Last time I forgot my password and tried...

Easy Way to Change Permissions on the Windows Server Scheduled Tasks Folder (C:\Windows\Tasks) (22)
4Fingus: Thank you so much. You have saved me alot of...

Mystery of the Missing msnmsn.inf on XP SP3 (24)
jo w: Thanx m8, it's even brilliant for those who are...

Delegating "Power Options" Management to Limited Users in XP (6)
Alessandro Stillitano: Hi :)I can report that on a Lenovo T410i the...
Last 15 Posts
Archives
September, 2010 (1)
July, 2010 (1)
June, 2010 (1)
April, 2010 (2)
March, 2010 (1)
January, 2010 (1)
November, 2009 (1)
October, 2009 (3)
July, 2009 (1)
June, 2009 (4)
April, 2009 (1)
March, 2009 (1)
Blog posts are currently filtered by topic. Click here to view all posts.
Posted By Timothy • Topic: Tech
Nov 22, 2009 5:45 PM EDT

I had a need to directly manipulate the bytes in a bitmap for my VB.Net app for Windows Phone.  I found quite a few articles with The Google on how to do this in C#, using the unsafe keyword.  That's a perfectly fine way of doing it for C# users.  However, VB.Net does not have anything like the unsafe keyword, so there is no way to run unsafe (unmanaged) code blocks.  Philosophically, this might be a "good" thing to Managed Code purists.  I'm actually neutral on the issue.  Still, just because you can't do arbitrary pointer and memory manipulation in VB.Net does not mean you can't do this very simple thing (dimming the color brightness of each byte of a bitmap).  It's pretty easy and I can't believe nobody out there has posted how to do it this way VB.Net or C#.  I came up with this code for the Compact Framework for Windows Phone specifically, but it will also work in the big Framework for big Windows.  It will work in both VB.Net and C# just fine.

[ Read entire post ]


This Avian Waves blog is powered by a modified version of Presstopia Blog




Avian Waves Logo