Atalasoft DotImage is a great library for working with all kinds of images. I recently had the need for a Tiff image which met the following specification:
300 x 300 dpi
Print at regular letter size (8 1/2 x 11)
Encoded using Group 4 compression
I created this Tiff file using only the following 5 lines of code:
AtalaImage atalaImage [...]
As a .net developer that has recently spent over a year helping to design and build a SCSF winforms application, I have been looking to branch out into different techniques and technologies to improve my skill set. With Visual Studio 2010 coming out, the latest support for WPF and a push, by Microsoft, toward its [...]
Here is a really simple way to handle a session expiration in asp.net MVC using a base controller. Having all controller inherit from a basecontoller and overriding the OnActionExecuting event allows for checking the session before all actions are executed.
Here is the code
public class BaseController : Controller
{
protected override void OnActionExecuting
[...]
Recently we had the need to transform System.Drawing.ContentAlignment property to System.Drawing. Stringformat alignment property for creating a Graphic object with text drawn on it inside a given rectangle. Assuming that you want the text printed from left to right, you can use the ContentAlignment Enum values to obtain the desired StringAlignment Enum value. For example:
[...]
Using SQLite in a Windows Mobile Application provides a simple way to add pre-populated data for consumption by the application. There are a couple of configuration considerations when adding the database to the project.
1. Adding reference to SQLite.dll. After installing SQLite there will be a Compact Framework folder in the following path :C:\ProgramFiles\SQLite.NET\bin. This folder [...]
While using the WCF Exception Shielding policy in Enterprise Library’s Exception Handler Block to shield exceptions and return Fault Contracts I came across an error. I named the shielding policy “WCF Shielding Policy” and implemented a FaultContract for each type of desired or expected exception.
While testing the policy, we were unable to return a proper [...]
Recently on our project we created a “functional” unit test for some services. The test was designed to check the entire call stack from the service layer to the DAO and return some expected results. We are using Spring for dependency injection through our entire application. This functional test initially only referenced the service DLL’s [...]
Recently on a project, we had the need to convert a saved multi-page tiff to a collection of bitmaps for viewing in a UI using standard GDI+ methods. These bitmaps also needed to be printed in a high quality way for submission to a government agency. This method ensures that no quality will be lost [...]
Recently I encountered a problem regarding default resolution for Images. An image that had been stored in a database as a multi-page tiff needed to be split into individual bitmaps for display and print on a winform using standard GDI+. While spliting the tiffs and creating the new bitmaps, the resolution was lost and was [...]