Friday, November 21, 2008

Radius Fill Corners Update

I have gotten some feedback from the Paint.NET addin that I recently created. Most of the feedback has been positive, except for strange results occuring when a large radius is selected. This issue is related to how the code determines how to color each pixel for the image. Basically my calculations fall apart if the radius greater than a quarter of the height or width of the image. I knew this would be an issue, but decided not to restrict the radius size because I did not want to limit users who were working with large images.

I now realize that it is better to restrict the radius, but base it on the current image's size. This way you should always get the desired results.

Here are updated links:
source code
addin dll

Sunday, November 9, 2008

New Paint.NET Effect Addin for rounding the corners of an image

After searching through existing Paint.NET effect plugins, I did not find exactly what I was looking for (quick and easy way to round off the corners of an image, like the one below), so I decided to create one.


























With the help of Sepcot's template and tips from BoltBait’s site, the process was not too difficult, and it was an interesting learning experience. Most of the code is pretty similar to other examples, except that I decided to use some WPF libraries to help make the math calculations easier. The source code is available here, or you can just download the DLL for your personal use. Due to the WPF use, the .NET framework 3.5 is required for the effect addin to function. If you need help deploying the addin, there are tips here. Once you have got the addin working, just select the entire image and run the effect with the desired settings.

Tuesday, November 4, 2008

Paint.NET community

I used to spend a lot of time in Adobe Photoshop, but as the years have progressed I have spent more time coding, and less time performing graphics work. This eventually led the purchase price of Photoshop to be unjustifiable considering the limited amount of time I would spend using it. However, I still had a need for the occasional image manipulation, re-sizing, or touch-up. This is when I discovered Paint.NET. It is a great tool for the price (free!) and is very popular (so, you probably already know about it)...


What I had not realized until this week, is how great the community support for Paint.NET is. The application always just did what I wanted, so I had not taken the time to search for tips, tutorials, addins, etc. This week, I had a need to perform some more advanced task in Paint.NET, and found myself missing Photoshop’s capabilities. This lead me to search for some better ideas on how to accomplish the tasks I was working on. I quickly found out that there is a great community surrounding Paint.NET. There are tons of helpful blog posts on the net, and the Paint.NET forums are full of helpful users, tutorials, and free effect addins by developers such as Michael Sepcot, BoltBait, and Ed Harvey. This makes Paint.NET an even more useful product, and I’m looking forward to diving deeper into some of these community resources.

Wednesday, October 1, 2008

Remote Desktop Copy & Paste problem

I am consistently amazed by the wealth of information available in the blogosphere. Here is an example:

I spend a lot of time working in Remote Desktop sessions, and lately I had noticed that quite often I would lose the ability to copy and paste text between my local machine and the Remote Desktop session. This finally became annoying enough that I decided to research the issue. After a quick Google search, the first link took me to a blog post by Pinal Dave that explained how to solve my exact problem. The summary is that the problem can be solved by following these steps in the Remote Desktop session:

1. Open Task Manager
2. Kill the “rdpclip.exe” process
3. Restart the process by using Start >> Run >> rdpclip.exe

This simple solution has saved me a lot of aggravation.

Wednesday, September 24, 2008

XNA Tutorials

I have wanted to experiment with XNA ever since Microsoft released it. Well, over the last few weeks I have finally had enough semi-free time to dive into some of the code. My eventual goal is to create a racing game, so when I discovered that there is a Racing Game Starter Kit I could not help but start by hopping straight into its code. However, I quickly found out that the Starter Kit was going to be overwhelming without picking up some fundamental gaming code knowledge first. The next step was to check out the 2D and 3D Game tutorials. This turned out to be a much better starting point, and I now feel prepared to move on to some more advanced learning. Now, I just have to hope that Xboxs are still available for retail sale by the time I actually complete a real game. :-)





Tuesday, September 9, 2008

The elusive Orca download

Recently, I was having problems with a Windows Installer Merge Module and turned to the web for help. Upon searching, I found a suggestion to use Orca to edit the .msm file. The site simply stated to download Orca from Microsoft, so I searched MSDN for Orca and found that it is only available in the “Windows SDK Components for Windows Installer Developers”. This sounded simple enough, so I downloaded the SDK. After a brief download, I began the installation process and was horrified to find that it was going to require another 2GB+ download for a full installation. I was in a hurry, so I de-deselected the samples and documentation, which brought the install down to a more manageable size.

After the install completed, I happily navigated to Start->Microsoft Windows SDK -> Tools. Hmmm, no Orca in sight... I was just about to bite the bullet and run the full installer when I came across Aaron Stebner's blog post explaining how to get Orca, complete with a direct link for the software.

This saved me a lot of wasted time waiting on the download, just to use one small tool.

Monday, September 8, 2008

Browser shortcuts

Lately I have found myself searching for deals on used parts for our Jeep. As part of this routine, there are several sites that I navigate to, typically opening them in multiple browser tabs. As lazy as it may sound, I got tired of right-clicking items in my favorites list to open the site in a new tab. I decided it would be easier if I had a shortcut for opening all of the sites at once. I know that IE allows you to set multiple home page tabs, but this was not what I wanted because I don’t want the sites to load every time I open a browser.

I decided that a batch file might be an easy solution, and began researching IE’s command line options. While IE, does have a nice selection of options, unfortunately I could not get IE7 or IE8 to yield the results I wanted (the sites were opened in new windows instead of tabs). However, I got exactly what I wanted with Firefox (not a big issue because I routinely switch between the two browsers anyway). I just created the batch file in Notepad and saved it as a .bat file on my desktop. Here are example contents of the file:

cd\"Program Files (x86)\mozilla firefox\"
start firefox.exe http://www.cnn.com http://www.msn.com http://www.yahoo.com


After creating the batch file, it dawned on me that it would be easier to create a copy of my Firefox desktop shortcut, rename it appropriately, and then simply modify the shortcut’s target with the desired sites, as shown here:


Both methods are a great way to quickly navigate to a group of sites.