Product and Development Musings

Urgent: ImageMan.Net Version 2.06 Update

18. March 2010 06:12

We have released ImageMan.Net V 2.06 which contains a critical fix for all users of ImageMan.Net V 2.xx. Due to a buildserver issue, versions of 2.xx prior to 2.06 will fail to load on April 1, 2010 and display a Beta Expired dialog.


We apologize for the inconvenience.

ImageMan.Net Version 2.05 is available

10. March 2010 08:41

V 2.05 of ImageMan.Net is now available for downloading from the My Products page.

This is a maintenance release that includes the following changes:

  • New Deskew algorithm is faster and more accurate
  • Faster redraw speeds in the ImageMan Viewer control when using iannotations in the document edition
  • Fixed a bug which caused problems when rotating images with an axis > 32K in size
  • Fixed an issue with the DTI.ImageMan.Codecs.dll manifest file which caused a failure when deploying with Clickonce
  • Several other minor fixes

Persisting Annotations: Saving and Branding

19. February 2010 11:43

We recently learned how the Viewer control manages annotation marks during runtime.  Now let's continue our discussion in our series of articles on annotation support in ImageMan.Net Document Edition by highlighting how to persist annotated images after you are done working with them. 

Saving Annotations

The annotation information on an image can be saved in TIFF, JPG or PNG formats. This will happen automatically when an image in the Viewer control has associated annotation information. The annotation information is stored as a separate layer of the image.

So, if you want to share or continue working with an annotated image save it as a TIFF, JPG or PNG file.  If you want to load an image with the annotation information in the proprietary ImageMan.Net format in another TIFF viewer the annotation information will not be displayed.  (In an upcoming post, we will learn how to create annotated images with a common set of annotations that can be shared with other TIFF viewers.)

We'll now add the ability to save our annotations in the sample application we built in the last few posts (Visual Studio 2008 source code: C# source, VB.Net source).

  • Open IMAnnotate1.sln for C# (or IMAnnotate1VB.sln fo VB.Net) in Visual Studio 2005 or 2008 (which ever you used last time)
  • Open Form1 class in design view
  • Drag and drop a SaveFileDialog control onto the form:


  • Add a new menu item under the File menu item and call it Save.:


  • Automatically add events to this submenu item by double-clicking to let Visual Studio autogenerate the event method.
  • Now, add this code to open the Save File dialog:


private void saveToolStripMenuItem_Click(object sender, EventArgs e)
    saveFileDialog1.Filter = RegisteredEncoders.GetFilterString();
    if (saveFileDialog1.ShowDialog() == DialogResult.OK)
        annotation1.SaveInWangFormat = false;


Private Sub SaveToolStripMenuItem_Click( _
    ByVal sender As System.Object, ByVal e As System.EventArgs) _
    Handles SaveToolStripMenuItem.Click
    SaveFileDialog1.Filter = RegisteredEncoders.GetFilterString()
    If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
        Annotation1.SaveInWangFormat = False
    End If
End Sub

First we generate a list of available file types to allow the user to use and set that as the filter for the SaveFileDialog control.  Then, if the user selected a valid filename and location, we save the image using the given filename.  Notice the SaveInWangFormat property of the Annotation object? Let's hold off on that until the next topic.

  • So now run the application (by clicking F5, for instance)
  • Add a few annotation marks onto the default (white) image
  • Save that image to a known location as either a TIFF, JPG or PNG file type
  • Close the application
  • Run it again
  • Open the previously saved image
  • You should now still be able to move, edit and otherwise manipulate the previous marks

Note: If you open the file in the Windows Picture and Fax Viewer, for instance, you will not see the annotated marks.

Branding Annotations

If you need to permanently add the annotation information to the image you can use the annotation objects Brand() method to burn the annotations onto the image. Once you do this, however, you can no longer manipulate the annotations as before.

Branding is done at the image's color depth. So if you have color marks and a black and white image. Either increase the color depth of the underlying image, or understand that the color branded marks will appear differently.

  • Add another menu item on the toolstrip (under the File menu item) and call it Brand


  • Create the code behind and add the following code:


private void brandToolStripMenuItem_Click(object sender, EventArgs e)
    // Brand the current image
    // Clear all existing marks
    // Refresh the viewer


Private Sub BrandToolStripMenuItem_Click( _
    ByVal sender As System.Object, ByVal e As System.EventArgs) _
    Handles BrandToolStripMenuItem.Click
    ' Brand the current image
    ' Clear all existing marks
    ' Refresh the viewer
End Sub
  • Run the application
  • Add a few annotation marks onto the default (white) image
  • Brand the image using the Brand menu option
  • Now try to manipulate the current marks and notice that you can't (they aren't marks now; they are part of the image)
  • Add some new marks
  • Save that image to a known location as either a TIFF, JPG or PNG file type
  • Close the application
  • Run it again
  • Open the previously saved image
  • You should now still be able to move, edit and otherwise manipulate the new marks but the branded marks are not editable any longer

Save this project since we will continue to build on it next time for a discussion on persisting common annotations that are compatible with other TIFF viewer and (many) annotation editors.

Persisting Annotations: The Viewer Control

14. January 2010 10:50

In the last series, we learned how to work with Annotations in ImageMan.Net Document Edition. Now, we will learn more about one of the ways to persist your annotated images.

The ImageMan.Net Viewer control automatically manages the annotations for each image in it's associated Images collection.  So, when you load an image in the Viewer and add annotations to it, then add a second image to the Viewer, you can still go back to the first image and manipulate the annotation marks. 

Let's try this out by adding some file and paging features to the example application that we started in the previous article.  (If you didn't create this solution, then I suggest you quickly follow the steps as indicated in the previous blog post so we can be in synch.)

  1. Open IMAnnotate1.sln in Visual Studio 2005 or 2008 (which ever you used last time)
  2. Open the Form1 class in design view
  3. Drag and drop a ImageMan.Net OpenImageDialog control onto the design surface
  4. Add the following menu items:
    - File
    - Image


  1. Under the File men item, add the following menu items:
    - Add...  A2-2
  2. Under the Image menu item, add the following menu items:
    - First
    - Next
    - Previous
    - Last A2-3
  3. Automatically add events to each submenu item by double-clicking each one.  Let Visual Studio autogenerate the event method.
  4. Now, in code view, let's add some code that will handle adding images to the Viewer control's Images collection:


private void addToolStripMenuItem_Click(object sender, EventArgs e)
    if (openImageDialog1.ShowDialog() == DialogResult.OK)

[Visual Basic]

Private Sub AddToolStripMenuItem_Click( _
    ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles AddToolStripMenuItem.Click
    If OpenImageDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
    End If
End Sub
  1. Add this code that will handle navigating the image collection:


private void firstToolStripMenuItem_Click(object sender, EventArgs e)
private void nextToolStripMenuItem_Click(object sender, EventArgs e)
private void previousToolStripMenuItem_Click(object sender, EventArgs e)
private void lastToolStripMenuItem_Click(object sender, EventArgs e)

[Visual Basic]

Private Sub FirstToolStripMenuItem_Click( _
    ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles FirstToolStripMenuItem.Click
End Sub
Private Sub NextToolStripMenuItem_Click( _
    ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles NextToolStripMenuItem.Click
End Sub
Private Sub PreviousToolStripMenuItem_Click( _
    ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles PreviousToolStripMenuItem.Click
End Sub
Private Sub LastToolStripMenuItem_Click( _
    ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles LastToolStripMenuItem.Click
End Sub
  1. Run the application and add a few images
  2. Add some annotations
  3. Navigate between the various images

You'll notice the annotations you added will remain intact while navigating between the images.  The annotated marks are able to moved, resized, modified, etc.

Next week, we'll continue on this persistence topic and learn how to save and brand the annotated image.

Annotations in ImageMan.NET Document Edition

5. January 2010 12:08

Today we are going to kick off a series of blog posts highlighting some of the great new features in our latest version of ImageMan: ImageMan.Net Document Edition.  This first post will introduce you to the annotation features you can use to add text and drawings to images or documents. 

The Document Edition includes a rich set of annotation objects including:

    • Rectangle
    • Ellipse
    • Line
    • Polygon
    • Highlight
    • String
    • Freehand Line
    • Bezier Curve
    • Pie Shape
    • Arc
    • Sticky Note
    • Image
    • Redaction
    • Overlay
    • Text Stamp
    • Custom Mark

You can add multiple annotation objects to an image.  Once added, you can modify, move, resize and remove them easily.  We'll discuss persisting, protecting and encrypting annotated images in upcoming blog posts.  We'll also cover implementing annotation support programmatically soon, but for starters, we'll go over the Annotation control, which is the core of annotation support in ImageMan.Net, as well as the Annotation ToolStrip.

Test Driving the Annotation Features

Let's build a simple image viewer with annotation support.  I'm assuming you've already installed at least the trial version of the ImageMan.Net Document Edition.

  1. Start Visual Studio.Net (2005/2008)
  2. Create a new Windows Forms Application project (in C# or VB.Net)
  3. Name it IMAnnotate1
  4. Add the following controls to the design surface of Form1:
    - MenuStrip
  5. Add the following ImageMan.Net controls to the design surface of Form1:
    - Viewer, Annotation, Annotation ToolStrip
  6. In the Properties window, set the following properties for viewer1:
    - Dock: Fill
  7. Set the following properties for annotation1:
    - Viewer: viewer1
    - ToolStrip: annotationToolstrip1
  8. Save your work

Adding the Design Surface

If you run the application we've just created, you'll notice that the Annotation ToolStrip is pre-populated with buttons you can use to easily work with the full set of annotation objects:


Our next step is to add a design surface.  We have two options here: we can add code to go out and retrieve an existing image and load it into the Viewer or we can create a new image.  For ease of use, let's go with the latter approach.

  1. Open Form1 in code view
  2. Add a reference to DTI.ImageMan:


using DTI.ImageMan;

[Visual Basic]

Imports DTI.ImageMan
  1. In the Form1 Constructor (after the InitializeComponent() method), add this code to create the default design surface:


    new ImImage(800, 1100, PixelFormat.Format24bppRgb, Color.White));

[Visual Basic]

    New ImImage(800, 1100, PixelFormat.Format24bppRgb, Color.White))

Working with the Annotation ToolStrip

Now we've got a design surface where we can add and manipulate annotation marks.  Let's add a few marks from the Annotation ToolStrip.

  1. Select the Rectangle button
  2. Left click and drag on the design surface to create a rectangle annotation mark

Notice that when you select an annotation tool on the Annotation ToolStrip, additional formatting tool buttons are dynamically added:


The visible formatting options will change depending on the annotation tool selected. For the Rectangle annotation tool, you can modify the following properties:

  • Fore Color
  • Back Color
  • Translucent
  • Brush
  • Pen Width
  • Corner Radius
  • Filled

Working with the Annotation Marks

Once a mark has been added to an image, you can perform various actions on it.  Marks can be:

  • selected
  • dragged
  • dropped
  • reordered
  • formatted
  • moved
  • resized (for most annotation marks)
  • deleted
  • copied
  • cut
  1. Click on the Select tool on the Annotation ToolStrip:


  1. Select the rectangle mark on the design surface by clicking anywhere inside it
  2. On the ToolStrip, select the Back Color button
  3. Select a color in the Color Dialog and click OK button
  4. On the ToolStrip, select the Pen Width button
  5. Enter a pen width of 3 and click the OK button


Working with the Context Menu

An alternative way to create and format annotation objects is to use the right click context menu. 

  1. Right click on the design surface
  2. Select the Tools menu option
  3. Select the Note annotation tool
  4. Drag a note mark onto the design surface
  5. Type some text in the note mark


If you want to hide the context menu, you just have to set the ShowContextMenu property on the Annotation object to false:


annotation1.ShowContextMenu = false;

[Visual Basic]

annotation1.ShowContextMenu = False

The next article on this topic will cover saving and branding your annotated images.

New Mainpine Pricing in 2010

23. December 2009 05:00

Effective January 1, 2010 Mainpine will be raising the prices on their IQ Express cards. Though we may have some cards available after that time at the old pricing the new pricing will be in effect for any new stock received after Jan 1.


The new prices will be:

IQ Express 1 Port Modem $439
IQ Express 2 Port Modem $659
IQ Express 4 Port Modem $1209
IQ Express 8 Port Modem $2199


These prices represent the first price increase from Mainpine in many years and still represent an excellent value compared to other intelligent fax modem cards.

As always we will maintain a large stock of these cards so most orders will ship the same day.

Drag and Drop with the ImageMan.NET WinForms Controls

22. December 2009 12:11

The ImageMan.NET Windows Forms controls make it easy to implement drag and drop functionality in your own applications.  To showcase this feature, lets extend one of the VS.NET 2008 Thumbnail control samples (TestThumbCol for C# or TestThumbColVb for VB.NET) that ships with ImageMan.NET.  This code will also work in Visual Studio.NET 2005.

We will add the ability for a user to select one or more image files from Windows Explorer and drop them on to the Viewer control.  The images will then be added to the Thumbnail Browser control and one of the images will be opened in the Viewer.

  • Run Visual Studio.NET 2008
  • Open the solution file found under:

For C#:
C:\Program Files\ImageMan.Net V2\Visual Studio 2008 Samples\C#\TestThumbCol\TestThumbCol.sln


C:\Program Files\ImageMan.Net V2\Visual Studio 2008 Samples\VB\TestThumbColVb\TestThumbColVB.sln

  • Open Form1 in design view
  • Select the Viewer control
  • In the Properties window, set AllowDrop to True:


  • Open the Events list for the Viewer control and double click on the DragDrop event to have Visual Studio.NET automatically create the event:


  • Return to the design view and double click on the DragOver event to have Visual Studio.NET automatically generate the event:


  • Staying in code view, let's add some code to the DragDrop event which will add the selected files to the Viewer's image collection.  Because the Thumbnail Browser is synchronized with the Viewer's image collection (in the Form's constructor), the Thumbnail Browser will also be updated.  In the DragDrop event, add the following code:

For C#:

private void thumbNail1_DragDrop(object sender, DragEventArgs e)
    string[] fileNames = (string[])e.Data.GetData(DataFormats.FileDrop);

    // handle each file passed as needed
    foreach (string fileName in fileNames)
        // Open each image and add to collection


Private Sub viewer1_DragDrop(ByVal sender As System.Object, ByVal e _
    As System.Windows.Forms.DragEventArgs) Handles viewer1.DragDrop
    Dim fileNames As String() = _
        DirectCast(e.Data.GetData(DataFormats.FileDrop), String())

    ' handle each file passed as needed
    For Each fileName As String In fileNames
        ' Open each image and add to collection
End Sub
  • To add the appropriate visual feedback to the user interface, update the DragOver event with the code shown below:

For C#:

private void thumbNail1_DragOver(object sender, DragEventArgs e)
    if (e.Data.GetDataPresent(DataFormats.FileDrop))
        e.Effect = DragDropEffects.Copy;
        e.Effect = DragDropEffects.None;


Private Sub viewer1_DragOver(ByVal sender As System.Object, ByVal e _
    As System.Windows.Forms.DragEventArgs) Handles viewer1.DragOver
    If e.Data.GetDataPresent(DataFormats.FileDrop) Then
        e.Effect = DragDropEffects.Copy
        e.Effect = DragDropEffects.None
    End If
End Sub
  • Build the application and give it a test run
  • Open Windows Explorer and navigate to a folder that contains images
  • Select one or more images and drag them on to the Viewer control.  Notice that the cursor will change indicating that you are allowed to drop the files on that control surface.
  • Drop the files on to the Viewer control and notice that the Thumbnail Browser updates to include those files and that one of the files will be displayed in the Viewer:


You can follow the steps outlined below to add similar functionality to the Thumbnail Browser control as well.  This implementation of drag and drop is consistent with the default Windows controls set and makes it easy for you add the user interactions your users have come to expect with desktop applications.

Automatic Debug Logging in FaxMan 4

10. December 2009 05:19

There will be times when you will need to know what's going on behind the scenes with the FaxMan SDK - you've added new features that aren't working quite yet or our technical support staff has requested debug logs to help you troubleshoot issues with sending or receiving faxes.  In an effort to make this as easy as possible, we've introduced automatic debug logging in version 4.6 of our FaxMan SDK.  Developers familiar with our previous versions will no longer have to use the command line "/d" option.

Port specific data is stored in a file for each day and port with the filename in the format Portxx-yyyymmdd.log where xx is the com port number and yyyymmdd is the date.   FaxMan log data is stored in a file in the format, faxman-yyyymmdd.log where yyyymmdd is the date.

These files, by default, are stored for 3 days.  You can change this by modifying the DaysToRetain FaxMan server configuration option (please refer to our documentation on how to modify these settings).  If you want to keep only a single day's worth of logs, for instance, set DaysToRetain equal to 1.

You'll find the logs in the same directory as the FaxMan4.exe file (typically the Windows System32 directory for 32-bit machines).

ImageMan.Net Version 1.73 Available

19. November 2009 04:11

V 1.73 of ImageMan.Net is now available for downloading from the My Products page.

This is a maintenance release that includes the following changes:

  • Memory leak in decoders
  • TIFF LZW compression for 24 bit continous tone images improved
  • TifEncoder may invert passed image data for 1 bit images
  • Scale of thumbnail images is incorrect

ImageMan.Net Version 2 Beta 1 Available

16. September 2009 10:01

Its finally happened, our next release of ImageMan is now available in beta form. This new release adds a whole set of exciting features that our users have requested including royalty free OCR support, Annotation support and more.

With the Version 2 release ImageMan will be available in two editions, the standard edition which has a feature set similar to the current release and the Document Edition which adds new document processing orientated features.
New Features in all ImageMan.Net editions
  • Drawing classes support drawing on all images at their native bitdepths
  • Performance and Misc enhancements to the Codecs
  • Misc enhancements to the Viewer and ThumbnailViewer controls
Feature in the new Document Edition
  • OCR - Royalty Free distribution
    • Annotations Support
    • Annotation component
    • Annotation Toolstrip component
    • Support for reading and writing WANG imaging format annotation data
  • Document Processing Commands including Blank Page Detection, Border removal, Despeckle and more
  • Support for reading and writing PDF/A and writing searchable PDF files with the optional PDF Import & Export Addons
  • Histogram And Pixel Count Methods
This beta release is feature complete and includes a host of new samples in C# and VB.Net for Visual Studio 2005 and 2008. This release of ImageMan now requires Version 2.0 or greater of the .Net Framework.
Note that the assemblies in this release will stop working at the end of the year so we do not recommend its use for any production code.
Please be sure to check out the new samples and help for information on using these new features. We will also be adding some tutorial videos on using these new features on our website.
We look forward to your comments, questions and suggestions about this release. Please let us know if you have any suggestions or ideas for how our components can simplify your imaging application needs. Beta users who provide feedback and suggestions will be eligible for an extra discount on the upgrade to Version 2 as a special thanks for helping us with this release.

To signup for the beta please email us at


Log in