I can keep dreaming...

Posted on December 1, 2007 00:18 by Michael

Check out this premium monitor configuration!... Yours for only $5,999! This is the CineMassive MasterPlex 30D and I think I've fallen in love all over again!

Unfortunately, nothing has changed since I last posted about Monitors, monitors, monitors - I still have two young boys (not that this fact is unfortunate of course) and a wife with a love for shopping and this certainly wouldn't even get on the WAF (Wife Approval Factor) radar so I guess I'll have to keep on dreaming! Still I can drool at this picture for a little while longer...

  • 5 high quality large monitors
  • 1 x 30" ultra-premium primary center panel and 2560x1600 resolution
  • 4 x large 20.1" perimeter LCD screens with 1600x1200 resolution
  • Total Active Pixels: 13,696,000 (that's 13.7 Megapixel!!!)

BlogEngine.NET CoffeeHouse theme released!

Posted on October 30, 2007 00:29 by Michael

Back in July I submitted two themes to be included in the popular open source blogging platform BlogEngine.NET (which I use for this blog). One of those themes, GirlGeek (which was a generic version of my wife's family blog), was included in the release but the second theme, CoffeeHouse, was understandably passed on due to it's similarity to GirlGeek and the Dirtylicious theme for which my two themes were loosely based.

After a number of emails from BlogEngine.NET users asking for a copy of the CoffeeHouse theme I have finally gotten around to tidying up the source code and updating it for BlogEngine.NET v1.2 and I can therefore now make it available for download!

Hopfully I will also be able to contribute an original theme or two to the BlogEngine.NET community in the not too distant future?! But for now I hope you find CoffeeHouse useful.

CoffeeHouse1_2.zip (41.64 kb)

Update: I have updated the zip file above as it wrongly contained a published version of the theme folder instead of the original source (the site.master.cs file was missing and the site.master had an incorrect inheritance reference).

More...

Crop and resize an image in ASP.NET

Posted on August 20, 2007 23:57 by Michael

I have just spent some time implementing a database stored central image library into a web application and this library will be utilised where the application's various content requires associated images.

The main database table for storing the binary image data (and metadata) has multiple binary columns to store different sizes of the image, in a similar vein to photosharing sites like Flickr, where the sizes are as follows: thumbnail, small, medium, large and the original image. In addition to these sizes I wanted to store a square 75x75 pixel representation of the image which would be appropriately cropped. After spending several hours playing with the System.Drawing namespaces and still scratching my head somewhat, I went back to google to try and find some samples (my initial searches didn't find much?!) and eventually came across a good article on The Code Project site which includes a great method which resizes and crops the supplied image.

Here is an example of the code I used which is very useful to have in your code snippets library!... 

protected static System.Drawing.Image ImageCrop(
    System.Drawing.Image imgPhoto, int Width, int Height,
    AnchorPosition Anchor)
{

    int sourceWidth = imgPhoto.Width;
    int sourceHeight = imgPhoto.Height;
    int sourceX = 0;
    int sourceY = 0;
    int destX = 0;
    int destY = 0;

    float nPercent = 0;
    float nPercentW = 0;
    float nPercentH = 0;

    nPercentW = ((float)Width / (float)sourceWidth);
    nPercentH = ((float)Height / (float)sourceHeight);

    if (nPercentH < nPercentW)
    {
        nPercent = nPercentW;
        switch (Anchor)
        {
            case AnchorPosition.Top:
                destY = 0;
                break;
            case AnchorPosition.Bottom:
                destY = (int)(Height - (sourceHeight * nPercent));
                break;
            default:
                destY = (int)((Height - (sourceHeight * nPercent)) / 2);
                break;
        }
    }
    else
   
{
        nPercent = nPercentH;
        switch (Anchor)
        {
            case AnchorPosition.Left:
               
destX = 0;
                break;
            case AnchorPosition.Right:
                destX = (int)(Width - (sourceWidth * nPercent));
                break;
            default:
                destX = (int)((Width - (sourceWidth * nPercent)) / 2);
                break;
        }

   

    int destWidth = (int)(sourceWidth * nPercent);
    int destHeight = (int)(sourceHeight * nPercent); 

    Bitmap bmPhoto = new Bitmap(Width, Height,
       
PixelFormat.Format24bppRgb);
    bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
        imgPhoto.VerticalResolution);

    Graphics grPhoto = Graphics.FromImage(bmPhoto);
    grPhoto.InterpolationMode = InterpolationMode.HighQualityBicubic;

    grPhoto.DrawImage(imgPhoto,
        new Rectangle(destX, destY, destWidth, destHeight),
        new Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
        GraphicsUnit.Pixel);
 
    grPhoto.Dispose();
    return bmPhoto;
}

BlogEngine.NET 1.1 (an open source blog engine) was released in the middle of June and includes a theme that I created called GirlGeek! I wouldn't have normally submitted a feminine inspired theme but after designing my wife's blog (http://rebecca.sivers.co.uk) I thought it would be beneficial for the BlogEngine community to have a theme option for any female geeks out there that like this kind of look?!

The GirlGeek theme, like this one on my site, is loosly based on the Dirtylicious theme by Viktor Persson which was ported from WordPress to BlogEngine by Al Nyveldt. To be fair though I have heavily customised and altered the graphics and styling so it's only really using the original basic layout and positioning.

As well as the GirlGeek theme I have also knocked together a CoffeeHouse theme which is a more generic version of my blog's theme and I will make this available to the community as soon as I get a chance to organise it. You can see a screenshot of this theme below and if anyone wants this theme in the mean time then feel free to email me



I will hopefully find time over the next few months to work on some original themes to contribute to what I think is a really well coded .NET blog engine and also a really well run open source project! Stay posted!...

Rebecca's birthday present

Posted on July 14, 2007 03:01 by Michael

It was Rebecca's birthday a week ago (Friday 6th July) and after she had opened her "proper" presents I presented her with my laptop which had Internet Explorer conveniently navigated to http://rebecca.sivers.co.uk, Rebecca's very own blog site! You see, my old web site was apparently "our web site" and it was my mistake to think that Rebecca didn't have any inclination to use it (I guess I should have ignored the fact that she only posted twice in nearly six months) so she was not best pleased when the "Sivers Family" site became "Michael Sivers' Blog".

So, I set about rectifying the problem by setting Rebecca up with her own blog with a funky pink theme designed by yours truely (and using the same blog software I use - BlogEngine.NET) and in the knowledge that her birthday was fast approaching it seemed obvious to have it be an extra gift.

Rebecca seemed really pleased with her new site, especially once she read the opening post I wrote for her but it will be interesting to see how many posts she manages to make in the next 6 months?! :)


Rebecca's Blog

Monitors, Monitors, Monitors!

Posted on June 27, 2007 22:21 by Michael

For me a good monitor is an essential part of a good computer setup and for many years now I have always spent a good sum of money on the monitor for my systems. In the old days (I was born in 1977 so this may be relative) it was Iiyama Vision Master Pros and then more recently 21" IBM & Dell CRTs and for the last 2 years or so my monitor of choice has been the Dell 2405FPW 24" Widescreen TFT (superceded by the 2407WFP). Which is absolutely brilliant!

A while ago Dell then launched a 30" widescreen TFT the 3007WFP-HC and I was immediately tempted, however, the hefty £1,200 price tag plus the need for a new expensive graphics card put it out of reach, for now?!

Dell UltraSharp 3007WFP-HC 30-inch Widescreen LCD Flat Panel Monitor

And when I get to that point where I decide that my 24" monitor just isn't big enough, or more likely, can afford it, the 30" Dell is going to have a run for it's money... Why? Digital Tigers that's why!

Take a look at these...

  Digital Tigers...
Zenview PowerTrio Ultra HD (above top)
Zenview Powerscape Ultra HD (above bottom)

Digital Tigers are an American outfit that supply amazing multi-screen LCD displays in a truly bewildering array of configurations.

The first display configuration pictured above consists of 1 x 30" center panel and 2 x 20.1" rotated side panels giving a total resolution of 4960x1600 and costs $3,999. The second configuration is the same but with 4 rotated side panels giving a total screen real-estate of 7360x1200 pixels and costs a whopping $4,999!

Well, one of these is definitely on my Christmas wish list although with two babies to provide for I have a feeling nappies, clothes and toys will be of greater demand than such luxuries!

Well, after our web site was completely corrupted on my VPS server (corrupt virtual hard drive file) and foolishly no backups of the site content I have taken the opportunity to change my site from a custom-built site to a more mainstream blog engine based site of which you now see. Of course I'm sure I'll be adding some of my own tweaks to make it fit a little better for us!

Hopefully Rebecca and I will be more regular in posting news about what we are up to so those friends and family near and far who are interested can always drop by for an update?! There are a number of techie/geeky things I'd like to post about as well, although, I'm not sure who will be interested in that but we'll see?

Previous Site > New Site. Why? How?

I developed our previous site some time ago! The site consisted of a family blog, a geek blog (for me), a fairly large photo gallery, my CV and porfolio as a software architect/developer and this all supported with rather nifty content management features. The initial motivation for building the site was to have an opportunity to play with some, what was at the time, new technologies from Microsoft namely ASP.NET 2.0 and SQL Server 2005 which I was looking to utilise in various projects for my employer Cortexa.

The site was built on a Microsoft Starter Kit and I quickly tweaked the styling and added blogging features and enhanced the photo album/gallery functionality. I updated the site at the end of last year implementing ASP.NET AJAX and I was quite happy with it on the whole. The only important things that were missing were RSS feeds and Comments, but to add this functionality properly would take time that I haven't really got,  what with a fairly demanding job and now two kids in the family!

So I decided as I have now lost all the content for the old site (and it took two weeks to get a new VPS server setup - don't ask!) I may as well take the opportunity to move to a more mainstream blog product and have chosen BlogEngine.NET to do the honours. BlogEngine.NET is "an innovative open source blogging platform developed with ASP.NET 2.0" and should provide a good mix of core functionality for blogging and syndication and still give me the option to develop my own functionality on top if required. So far I really like BlogEngine.NET and after spending a few hours in Photoshop am pleased with the styling (although there's always room for improvement!), the site is lightweight in terms of it's footprint and uses XML instead of a SQL Server which I think has some advantages?!. As for photo albums/galleries I think I may just link to Flickr and then I can benefit from all the tools and utilities that are our there?! We'll see as I am a bit of a control freak and have always wanted this kind of stuff hosted on my own server.

Anyway, hopefully BlogEngine.NET will do the trick for me and I can get a little more regular with posting about life, family and geek!

For my own nostalgia here are some screen shots of the old site minus the live content...


Homepage including latest blog posts.


Photo albums homepage.


Photo album thumbnail view.


Individual photo view (with full size photo download option)


Resume (CV) of Michael Sivers.


Content management features.

The first blog entry... From previous site (see date)

Posted on September 1, 2006 00:00 by Michael

The following post is the only post I have from our previous web site (server fatally crashed with no backups!) which just happens to be the first post that I made and was orginally posted some time in September 2006.

Well, as Rebecca is in bed I thought I would take the opportunity to write our first blog entry on our new web site and let's face it, it may be my last! Judging by how much time Bec spends texting, emailing and message boarding I expect she will usually be doing most of the updating. September has been a busy month with lots on for me at work and Rebecca having various things to organise and do (including Ewans 1st Birthday party - I'm sure she will tell you all about it!). And to make everything more challenging Ewan is getting confident with his walking and really is into everything! I don't know how Bec manages to keep him occupied all day long but as usual she takes it all in her stride. Anyway just wanted to get the ball rolling so here we go!