Product and Development Musings

ImageMan.Net Version 3 Beta Testers Needed

4. March 2011 08:19

Spring is officially here and our developers have been busy all winter getting ready to release our ImageMan.Net Version 3.0 components and we are looking for a few good beta testers to help us make sure it’s the best release possible and to make sure we haven’t done anything stupid.

So what’s new in Version 3 ?

  • .Net 4.0 and .Net 2.0 components – No more hassles with app.config when using the existing components in a .Net 4.0 framework application
  • 64 Bit components – Native 64 bit components allow you deploy your applications as 32 or 64 bits.
  • Exif read and write support in the JpegEncoder and JpgDecoder classes including support for the GPS tags.
  • Enhancements to the PDFEncoder class when writing searchable PDF files. Search terms are now highlighted at the appropriate locations on the image.
  • Enhancements to the viewer and thumbnail controls provide even richer functionality.
  • Performance tweeks to the Encoders and Decoders to speed up image loading and saving.

So if you are interested in using this new code and providing us with feedback please let us know at support@data-tech.com and we’ll get you signed up. We anticipate releasing the beta in mid to late March.

ImageMan.Net Version 2.09 is available

4. March 2011 06:08

The next release of our ImageMan.Net components is now available for downloading. The installation can be downloaded from the My Products page or from the Trial Downloads page.

Among the enhancements and bug fixes are:

  • Faster PDF Import support in the PDFDecoder class. The memory usage was also reduced particularly helping when importing files with a large number of pages.
  • Performance improvements when reducing the bit depth depth of images to 1 bit using the ModifyBitdepthCommand class.
  • Fixes to a couple of small memory leaks in the PDF & TIFF Decoder/Encoder classes. In a long running service type application these could cause problems so its important to update if you have any longer running applications.
  • Fixed a slow startup issue on a few machines that was caused by the RSACrypto code used in our licensing.
  • A host of other minor updates which can be found in the release notes on the My Products page.

ImageMan.Net Twain Version 3 is now shipping

10. January 2011 07:33

The next release of our ImageMan.Net Twain toolkit is now available for downloading. Despite the major new functionality this is a free update to existing licensed users. The installation can be downloaded from the My Products page or from the Trial Downloads page.

Among the major new features are:

  • Support for 32 & 64 Bit applications with the same assembly
  • Support for the latest TWAIN Version 2.1 specification
  • New task oriented online help
  • Visual Studio 2010 Help format included
  • .Net 2.0 and 4.0 assemblies
  • New properties to select the version of TWAIN used
  • TwainAvailable property to confirm TWAIN data source manager is installed

64 Bit TWAIN Issues
We’ve had lots of folks asking about TWAIN support for their 64 applications and this release adds that support. However due to the architecture of the TWAIN support for 64 applications it will only support 64 bit TWAIN drivers. As of now there are not many, if any, true TWAIN Version 2.x 64 bit drivers that we are aware of. This means that applications that must support twain should continue to run as 32 bit applications for compatibility with the most installed scanners drivers. This limitation is a part of TWAIN and not specific to the ImageMan.Net Twain toolkit.

Scanner Manufacturers and 64 Bit drivers
So from a practical standpoint until manufacturers start producing 64 bit drivers it’s not practical to have 64 bit scanning applications. Note that some manufacturers are saying they have 64 bit drivers for 64 bit operating systems but in actuality they just have 32 bit TWAIN 1.9 drivers that run on 64 bit operating systems. These are not the same as a true TWAIN Version 2.x 64 bit driver.

V 8.74 of ImageMan ActiveX Suite Released

6. January 2011 06:17

V 8.74 of the ImageMan ActiveX Suite is now available for downloading.  The installation can be downloaded from the My Products page.  Contact support@data-tech.com if you require assistance downloading the updated files.

This is a maintenance release that fixes the following issues:

  • Fixed an issue which could cause a crash when inserting the image control in a VFP 9 SP2 application
  • Fixed a licensing problem introduced in 8.72 which could cause the Trial Dialog to be displayed even when the license file was installed in the \program files\common files\dti\licenses directory
  • Fixed an issue which caused the Twain control to consume large amounts of memory when accessing the Sources collection and the Twain_32.dll wasn’t installed on the system.
  • Enhanced the PNG Import Filter to be more robust when images have incorrect palette sizes in their metadata.

Holiday Schedule

23. December 2010 05:43

We want to take a moment to thank all our customers for their support this past year and to wish them a happy new year.

We will be closed for the holidays this Friday December 24th and also on Thurs Dec 30th and Friday Dec 31st.

 

Best Wishes for a Happy and Prosperous New Year from the entire Data Techniques Team

 

Basic CMYK

ImageMan.Net Twain Version 3

3. September 2010 09:12

The next release of our ImageMan.Net Twain toolkit is ready for beta testing and we are looking for testers.

Among the major new features are:

  • Support for 32 & 64 Bit applications with the same assembly
  • Support for the latest TWAIN Version 2.1 specification
  • New task oriented online help
  • .Net 2.0 and 4.0 assemblies
  • New properties to select the version of TWAIN used

If you are interested in trying out this beta release please drop us a line at support@data-tech.com and we’ll get you a trial.

64 Bit TWAIN Issues

We’ve had lots of folks asking about TWAIN support for their 64 applications and this release adds that support. However due to the architecture of the TWAIN support for 64 applications it will only support 64 bit TWAIN drivers. As of now there are not many, if any, true TWAIN Version 2.x 64 bit drivers that we are aware of. This means that applications that must support twain should continue to run as 32 bit applications for compatibility with the most installed scanners drivers. This limitation is a part of TWAIN and not specific to the ImageMan.Net Twain toolkit.

Scanner Manufacturers and 64 Bit drivers

So from a practical standpoint until manufacturers start producing 64 bit drivers it’s not practical to have 64 bit scanning applications. Note that some manufacturers are saying they have 64 bit drivers for 64 bit operating systems but in actuality they just have 32 bit TWAIN 1.9 drivers that run on 64 bit operating systems. These are not the same as a true TWAIN Version 2.x 64 bit driver.

V 8.72 of ImageMan ActiveX & DLL Suites Released

2. June 2010 10:44

V 8.72 of the ImageMan ActiveX and DLL Suites is now available for downloading.  The installations can be downloaded from the My Products page.  Contact support@data-tech.com if you require assistance downloading the updated files.

This is a maintenance release that fixes the following issues:

  • Tif DIL round up error on resolution
  • IncreaseTo method changes X & Y resolution of image
  • Cant write multi-page PDFs to memory using ImgxWriteMem*
  • Exception when loading images larger than memory
  • Licensing change to eliminate calls to display trial dialog from IsLicenseValid
  • Check for license file in the Common Files\DTI\Licenses directory
  • MousePointer property now updates cursor when its set

Efficiently Convert PDF to Multipage TIF

24. May 2010 08:28

One of our ImageMan.Net customers recently asked us to help him convert a multipage PDF file to a single multipage TIF.  His initial attempts to do so were causing memory issues due the resolution and color depth of the source PDF as well as the approach he was taking. 

Inefficient Approach

The less optimized, but convenient, way to solve this problem would be to load the PDF file into an ImageMan.Net image collection (as a standalone ImageCollection object or part of the Viewer's Images property).  Then you can simply save that collection using one of the many overloaded Save methods.  ImageMan.Net handles appending each image in the collection to a single file.

For example, here's one way to simply save the entire collection to a file called image.tif:

[C#]

myImageCollection.Save("image.tif");

[VB.Net]

myImageCollection.Save "image.tif"

Or if you are using a Viewer, then you can save the collection using the Viewer's Save method which will loop through the Images property and create a single file called image.tif:

[C#]

viewer1.Save("image.tif");

[VB.Net]

Viewer1.Save "image.tif"

Additionally, these Save methods have overloads that will allow you to specify the start page, the total number of pages and the image encoder to use.

The problem with this approach is that the larger your ImageCollection, the larger the amount of memory your program will use while running.  Our client was running out memory while trying to process the PDF.

Efficient Approach

The most efficient and less memory intensive (and lowest level) way to solve this problem is to make use of the PdfDecoder class to loop through the pages of the source PDF.  With the PdfDecoder you can also modify some of the source PDF's image details including the resolution and color depth.  Then, for each page in the source image, you can create and append to a single output image file using the TifEncoder's Save method.

At the end of this article, I'll provide links to working sample apps that will contain the code to perform the PDF to TIF conversion.  This sample app will cover all of the details on how to properly work with streams to create the decoder and encoder instances.  I'll cover some of the highlights below:

To loop through the pages of the source PDF, you'll need an instance of the PdfDecoder class which will allow you to retrieve the number of pages (using the Pages property) and set the current page (using the Page property).  Then, you can use an instance of the TifEncoder class to append each page to an output file using the Save method:

[C#]

int totalPageCount = pdfDecoder.Pages;
int currentPageNumber = 0;
 
while (totalPageCount-- > 0)
{
    pdfDecoder.Page = currentPageNumber++;
 
    ImImage tempImage = pdfDecoder.Load(null);
    tifStream.Seek(0, SeekOrigin.Begin);
    tifEncoder.Save(tifStream, tempImage, null);
    tempImage.Dispose();
}

[VB.Net]

Dim totalPageCount As Integer = pdfDecoder.Pages
Dim currentPageNumber As Integer = 0
 
Do While totalPageCount > 0
    pdfDecoder.Page = currentPageNumber
    currentPageNumber += 1  
        
    Dim tempImage As ImImage = pdfDecoder.Load(Nothing)
    tifStream.Seek(0, SeekOrigin.Begin)
    tifEncoder.Save(tifStream, tempImage, Nothing)
    tempImage.Dispose()
 
    totalPageCount = totalPageCount - 1
Loop

The decoder and encoder classes allow you to perform some very low level operations on images that will help your image processing code become much more efficient.  For more details on these ImageMan.Net classes, please refer to the documentation. 

The following sample apps are available online:

ImageMan.Net Twain Now Compatible with .NET 4.0 and Visual Studio 2010

20. May 2010 06:35

Good news, early adopters! ImageMan.Net Twain 2.80, the latest release of our advanced Twain component, fully supports the .NET framework 4.0 and Visual Studio 2010.   This component is now available for downloading from the My Products page.

Separate Assemblies

ImageMan.Net Twain 2.80 ships with two separate DLL's- one for the .NET framework 2.0 and one for the .NET framework 4.0.  You'll find the DLL's in separate folders in the installation path.

Note: You can tell the difference between the similarly named DLLs by right clicking on the file and viewing the Properties dialog.  In the Details tab (for Windows 7) or the Version tab (for XP), view the File description field.  The 2.0 assembly will read "ImageMan.Net Twain for .Net 2.0".  Likewise, the 4.0 assembly will be labeled "ImageMan.Net Twain  for .Net 4.0". 

2010-05-19_1400

Sample Applications and Code

You'll notice new client side and ASP.NET samples (and sample code) that are fully compatible with Visual Studio 2010.  If you have multiple versions of Visual Studio on your system, you can select which samples to install during the installation process. 

Note: The Start menu links to the demo apps will always target the earliest version of the .NET framework you have installed on your computer.

2010-05-14_1042 

Help Format

To better integrate with Visual Studio 2010, we've updated our documentation to the Microsoft Help System format which is available to you when you install Visual Studio 2010.  Previous versions still retain their properly formatted help documentation.

2010-05-14_1049

ImageMan.Net and Visual Studio 2010

15. April 2010 08:26

With the release of Visual Studio 2010, some of you are probably eager to start developing new applications on (or porting existing applications to) the .NET Framework 4 and the new IDE.  You can use ImageMan.Net components in Visual Studio 2010 projects that target .Net Framework 4 but you'll need to be aware of one issue. 

According to Microsoft:

The .NET Framework 4 works side-by-side with older Framework versions.  Applications that are based on older versions of the Framework will continue to run on the version targeted by default.

However, the above statement does not hold true when the older versions involve mixed mode assemblies.  ImageMan.Net was developed on .NET Framework 2 and one of the components, DTI.ImageMan.Codecs.dll, is a mixed-mode assembly which does not get properly loaded into the .NET Framework 4 runtime without additional configuration.

Until the ImageMan.Net source is built in .NET Framework 4, you are going to have to apply a slight workaround to get the components to work properly in a .NET Framework 4 assembly.  Here's an example of the type of exception you can expect to see when you do not apply this workaround:

FileLoadException

To cause this exception, I created a simple Windows application in Visual Studio 2010.  I dropped ImageMan.Net ThumbnailViewer, Viewer, Annotation and AnnotationToolSrip controls onto the form's design surface.  Then I built and ran the application which displayed the exception dialog above.

To fix this problem, you'll simply need to add the useLegacyV2RuntimeActivationPolicy attribute to the application's config file (app.config) like so:

<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
    </startup>
</configuration>

Setting this attribute to true will allow a pre-.NET Framework 4 mixed-mode assembly to load in a .NET Framework 4 process.  With this workaround in place, you'll be able to integrate the ImageMan.Net components in your Visual Studio/.NET Framework 4 projects.  We will soon release .NET Framework 4 targeted ImageMan.Net assemblies which will not require you to modify your app.config files.

Log in