in

ASP.NET Weblogs

This Blog

Syndication

Sponsors

Roiy Zysman

  • Windows Server Core 2008 R2 - Help tip #1 - Server Default Name

    This might be simple, but also tricky if you don't know where to look for. Once installed, Server core has a default name assigned.
    To get it , just run ipconfig /all in the command line.
    The first line will include the server's default name.

    Now, if you want to change it or join it to a domain , follow this post. http://blogs.techrepublic.com.com/datacenter/?p=594


     

  • Guest Post on the ISABlog - Keeping High Availability with Forefront TMG’s ISP Redundancy Feature

  • Deepzoom with Silverlight 2.0 First Hands Example

    I was looking for an interesting starting point to getting my hands dirty with Silverlight. Deepzoom caught my attention. It is basically a Silverlight component that let's you zoom in and out into an image. While there are some examples out there that utilize and showcase it, most of them are pretty basic and not that practical. While back I wrote a small app that composes a target image mosaic out of smaller images, but back than , I had to use Zoomify to provide a zoom in and zoom out interface. Now with Deepzoom, I wanted to check it out.

    Tropical Fruits - Original Oil Painting by wizan.

    So here is the final result, it is basically an image broken down to pixel size images that are matched to images that serve as the tiles of the original image. Now that we have the matching tiles, we can simply compose the original image. The only challenging is  point here is to break the new image into Deepzoom format. For that I used this good codeproject published project. Because the end result is almost 200MB , I've decided to share a video showcasing a silverlight ASP.Net embedded page.

     

    What is shown here is the Deepzoom running in an IE7 window with the composed mosaic image.

    It would be cool to have this online application that let's you upload images and build the last uploaded image from all of the previously loaded images.
    I'll share more technical information on this on later posts , so stay tuned.

    BTW, here is a cool Michael Phelps mosaic, hand made. It would be nice to have a computer software to do this.

  • Halloween Fun - Embedding Ghosts Watermark in images with C#

    For those of you who are going to celebrate Halloween on the 31st , here is a nice cool thing to do with C# and System.Drawing library.
    In this post I'll show you how to use C# to embed a ghost image with a background image.

    First we'll pick out the ingredients:
    A ghost image
    ghost_small

    And for background I've picked a times square shot taken by barcoder96


    times_sqaure_by_leegillen_from_flickr

    ok, now that we have these, let's start getting our hands code dirty.
    open up a console project , and add the System.Drawing reference by adding a using System.Drawing;
    Next, type in the following code

    Image backImg = Image.FromFile("e:/pictures/times.jpg");
    Image ghostImg = Image.FromFile("e:/pictures/ghost.png");
    Graphics g = Graphics.FromImage(backImg);
    g.DrawImage(ghostImg, backImg.Width/2, 10);
    backImg.Save("e:/pictures/halloween.jpg");

    What's happening here is that we basically load up our background image and foreground image, we acquire a graphics object from the background image, and use it to paint over the foreground image. Looks simple, right ? here is the result

     halloween

    But to make it more ghost realistic (there's an oxymoron for you), we'll make the ghost more transparent

    for that, I'm using an image color manipulation trick I first saw here (and there's also a good one here)
    The Matrix33 value below sets the level of opacity or transparency. 0 is full transparency , 1 is no transparency at all.
    The matrix multiply all of the colors with the new opacity value which "fades" out the colors and thus gives it the requires transparency.

    Bitmap transparentGhost = new Bitmap(ghostImg.Width, ghostImg.Height);
    Graphics transGraphics = Graphics.FromImage(transparentGhost);
    ColorMatrix tranMatrix = new ColorMatrix();
    tranMatrix.Matrix33 = 0.25F; //this is the transparency value, tweak this to fine tuned results.
    
    ImageAttributes transparentAtt = new ImageAttributes();
    transparentAtt.SetColorMatrix(tranMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
    transGraphics.DrawImage(ghostImg, new Rectangle(0, 0, transparentGhost.Width, transparentGhost.Height), 0, 0, transparentGhost.Width, transparentGhost.Height, GraphicsUnit.Pixel, transparentAtt);
    transGraphics.Dispose();
    
    g.DrawImage(transparentGhost, backImg.Width / 2, 10);
    backImg.Save("e:/pictures/halloween2.jpg");
    Which gets us to this better version


    halloween2

    And if you iterate it some more , and give it some skewing you can get the following result.


    halloween3

    For achieving this , you can use the YAEL C# image manipulation library which provides a watermark image filter

    Or trying this Halloween Ghosts Image filter online at http://www.imgtoys.com

  • Tagging Images with GPS coordinates. Now the lightweight app.

    In one of my previous posts I showed how to embed GPS coordinates to jpeg images using C#. It is mainly useful if you're using a maps+pictures services such as panoramio.com or everytrail.com or any other kind of mapping and pictures solutions.
    My GPS buddy is a nifty HOLUX M-241 GPS  among the regular location, speed, direction, time it can also records tracks, and on top of that it's rather cheap
    image
    But unfortunately its image GPS coordinates embedding feature doesn't work so well.

    So here is a little app to solve do that , it is basically an image GPS coordinates tagging solution. And it can be used with any other GPS that tracks data and can export the data as KML files.

    Here are the 3 simple steps to use it  (Please note that this application is just on its Beta stage, it doesn't come with any warranty, so use at your own risk)

    1. GPS and Camera Time Sync - Before the shooting session starts, make sure your camera time is synced with your GPS time - "synchronize your watch gentlemen". This is critical to couple between the GPS sample and the appropriate picture that was taken at that point. Also make sure your GPS sample rate is as frequent as can be (I for example, take a waypoint record every second)
    2. Shoot - Go out and take some pictures. Download your pictures to a folder, and export your waypoints as a KML file (hopefully this app would support more formats in the future)
    3. Geotag - Run the application, show it where the pictures folder and KML file are, hit the GO button.

    image


    And that's basically it, now your photos are tagged with their relevant GPS location. Once you upload them to any of the services listed above , they would be automatically placed on the map.

     image image  image

    Since this is a technology blog, I feel obligated to share a few words on the technology. This solution is actually being deployed with the ClickOnce technology. Here is a quote of what it is from MSDN
    "ClickOnce is a deployment technology that allows you to create self-updating Windows-based applications that can be installed and run with minimal user interaction. ClickOnce deployment overcomes three major issues inherent in deployment..."

    image

    One of the advantages of this feature that fits like a glove to this solution is that it comes prebuilt with an update check mechanism (as seen in the image above). You can configure  it to look for newer versions each time the application starts, and if there is , it automatically download and installs it on the client machine. Developing this functionality from scratch can be really tedious. If you're into releasing small foot print, specific focus solutions, I strongly recommend  reading more about it. It's not that it is perfect, ClickOnce has it's own issues, but for most cases (especially for these kinds of micro solutions)  it will be enough to take the overhead of working on an additional setup feature.

  • Using Live Maps to Show Beijing 2008 Medals Distribution by Contry

    I've was looking for an interesting project to get my hands on live maps API. Just to get the hang of developing cool application on top of Live maps.

    I've started this Olympics Medal Count + Community Contributed Data + Live Maps Mashup

    And It's almost complete.

    Take a look at this Beijing 2008 Medals Count on Live Maps

    image

    If you want to help complete the picture, make your contribution to this wiki page

    Want to get a grip on the Live Earth SDK as well, here is your starting point [Live Earth SDK]

    Bookmark and Share
  • Olympics Medal Count + Community Contributed Data + Live Maps Mashup

    This is still work in progress , since this countries list is not completed yet. But I'd thought I'd share the work so far.

    Live maps with its extendible API/SDK allows you to do cool things. Here is one, taking the countries 2008 Olympic games medal counts, asking the community to help with getting countries coordinates, and mashing it all up with javascript to create a cool representation of nations of the worlds map with their Beijing 2008 medals count.

    image

     

    Here is what's ready so far.

    Beijing 2008 Medals Count on Live Maps

    Want to help to complete the picture, add your country coordinates to this wikipedia countries gps coordinates page

    No fancy ASP.Net stuff was used to build this, just a bunch of ye-olde-regex magic procedures.

  • Engineering Failures, Bad Engineering or No Engineering at all

    Here are a few examples that you can probably relate to as an analogy to your latest Software Development Project

     

     

  • Missing Windows Authentication provider For IIS 7 on Windows Server 2008

    In case your Windows Server 2008 machine doesn't include a windows authentication scheme (see image below), do the following
    image

    Open up Server Manager (one way to do this is by right clicking the computer node from within the start menu and choosing  Manage). Expend the Roles node. Right click the Web Server (IIS) and choose Add Role Services. You'll get the following wizard, just scroll down a bit and check Windows Authentication under the security node.

    image

    If you've done everything right , you should also get the following option in IIS authentication pane

    image

     

    Here is how to do this on Vista
    Adding Windows Authentication provider into IIS 7 on Vista

  • Mapping the world - Community Style.

    I had an idea for a cool mashup that included a map , countries coordinates and another secret ingredient.  But to my surprise, I couldn't find a free Country to  gps coordinates Database. which means that even though Columbus discovered America more than 5 centuries ago there are still some uncharted lands in the virtual world.

    Sure, there are some interesting GPS information Databases about Airports , Hotels and other special interests but I just couldn't find a very basic type of I'll give you the country name and I'll get a GPS coordinates (somewhere in the middle of the country) in return.

    So I've started this wikipedia page, it is basically just a list of countries and an empty place to enter a longitude, latitude coordinates.

    image

    How can you help you ask ? One simple way is to go to any maps services such as Google maps or Live's maps service, zoom in to a center location of your favorite country, extract the GPS coordinates of that point and paste them in the wikipedia page for all to use freely .

    Here is a very short tutorial on how to extract the coordinates from Google maps , the same similar technic can be used for Live's maps service as well

    3 states are already tagged with their coordinates, just 254 to go !
    let's see how long it takes for the whole list to get completely filled with would countries coordinates.  

More Posts Next page »