Skip to main content

Posts

Showing posts from August, 2013

C# - Building a Silverlight Deep Zoom Application [Beginner]

In the first part we looked at how to download hundreds of O'Reilly bookcovers usingC# . In the second part, we saw how to stitch those imagestogether into something a little more friendly for Deep Zoom Composer. In this part, we're going to create a Deep Zoom Composer project, export the final images, and build the finished Silverlight application. In order to build Deep Zoom applications, you're going to need to download Microsoft's Deep Zoom Composer . Everything else you should already have - especially if you're building Silverlight applications. In case you haven't checked out the previous tutorials yet, below is the application we'll be building today. [silverlight width="630" height="480" src="/sites/default/files/409/source/OReillyDeepZoom.xap"]   Step 1 - Import the Images Deep Zoom Composer is separated into three parts: Import, Compose, and Export. The first thing we're going to need to do is i

C# - Combining Images [Beginner]

Let's say you have two or more separate images and you'd like to combine those into a single image using C#. That's what this tutorial is going to demonstrate. We're going to create a function that takes multiple images and combines them into a large panoramic. I had a collection of 800 images and when I attempted to import them separately into Deep Zoom Composer, it ate up all of my system's memory and crashed. I needed to combine several images together into rows and import those into Deep Zoom Composer. Here's an example of what the code in this tutorial will produce. This image was produced by stitching together ten O'Reilly book covers. The background can be changed to any color, the width is simply the total width of all the images combined, and the height is set to the tallest image in the collection. First off, here's the method signature we'll be filling in the details for. public static System . Drawing . Bitma

C# - to Download Every O'Reilly Book Cover [Beginner]

This is the first part of the series, which will explain how to write a simple C# application to download every book cover from O'Reilly's website. O'Reilly's website contains a complete list of every book still in print. Basically, all we have to do is write a simple parser to pull out catalog IDs and then download the appropriate image. I know C# is not the best language for text parsing, but I know it well so I wrote my tool in C#. The concepts in this tutorial, however, can easily be extended to your own favorite language. If you go to the complete list, you'll see it's separated into 4 pages - "A-D", "E-J", "K-P", and "Q-Z". The first thing you'll want to do is download the source of all of those pages somewhere on your hard drive. I put mine here: C : \Downloads\complete . html C : \Downloads\complete2 . html C : \Downloads\complete3 . html C : \Downloads\complete4 . html   Now that we ha

C# Advanced Tutorial - Mastering C# [Beginner]

This tutorial aims to give a brief and an advanced introduction into programming with C#. The prerequisites for understanding this tutorial are a working knowledge of programming, the C programming language and a little bit of basic mathematics. Some basic knowledge of C++ or Java could be helpful, but should not be required.   Generics, Lambda expressions, Extension methods and GUI programming This is the second part of a series of tutorials on C#. In this part we are going to discuss more advanced features of C# like writing templates with generics, creating anonymous methods in form of lambda expressions and extending existing type definitions with extension methods. Finally we will apply our existing knowledge by creating graphical user interfaces by using the Windows Forms UI framework. For further reading a list of references will be given in the end. The references provide a deeper look at some of the topics discussed in this tutorial.   Enumeratio