Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

.NET

.NET Components For Image Management


Functionality

As a photographers' tool, we rely heavily on color management and the processing of raw files from professional digital cameras. When we contacted Atalasoft about whether they could add color-management support, they were straightforward—they wanted to, but needed guidance about how the feature set would work and which pieces were essential. Because we'd written our own code for color management, we were delighted to share our expertise in exchange for getting a vendor-supported toolkit we could use, while retiring some of our legacy code. Over time, we developed a similar relationship with raw file support, where by providing sample files and input, we could help make sure Atalasoft's toolkits met our needs. This kind of working relationship is essential for any high-value library or component. Our market evolves quickly and once we commit to using code from a vendor, we need to have a way to work with that vendor to ensure we can stay ahead of the competition.

Performance

Like any developer, we didn't want functionality at the expense of performance. We did extensive benchmarking of dotImage versus several COM-based solutions (including the toolkit we'd been using for several years), and in most tests, it did remarkably well, considering it is a native .NET application. Better yet, when dotImage was noticeably slower, Atalasoft was anxious to learn where the issues lay and resolve them for us. The result was that we got a native .NET library with the performance our customers were used to in COM.

Extensibility

They say you can't teach an old dog new tricks, but after nearly 30 years of programming, I was excited to find that the promise of subclassing seemed to be useable in the .NET languages C# and VB. The development environment provided a combination of powerful, productive languages and an easily extensible class library system. Programming was more fun than it had been in a long time. So when we looked for a compatible imaging toolkit, it was important that it fully support the class library model, letting us extend it simply and in ways consistent with our overall architecture. Libraries using COM components wrapped in .NET are often brittle and do not permit much subclassing. In fact, many were designed as "lowest common denominator" libraries that could be used with anything from C in embedded devices up to servers. While this is an admirable design goal, desktop programmer productivity and eventual web server use were paramount for us. dotImage is great because the team at Atalasoft clearly "got" object-oriented programming and designed the system from the ground up for use with modern IDEs such as Visual Studio. In Figure 1, for instance, the dotImage controls integrate directly into the Visual Studio IDE. Frankly, we wish the procedure for updating control versions in Visual Studio was more intuitive, but that's a general issue with VS. Other than that, using the dotImage controls is as simple as drag-and-drop—although frequently, we also create instances of their controls in code.

[Click image to view at full size]

Figure 1: dotImage controls integrate directly into the Visual Studio IDE.

If we needed a new function in an image codec (say, the ability to read large TIFF images in sections while we down-sampled them to reduce the overall memory needed), it was a simple matter to subclass the TIFF codec and provide a decoding function that also scaled as it read. In minutes, we had an optimized decoder—which might have taken us hours or even days to write from scratch. And because it was a simple subclass, it worked with upgraded versions of dotImage without needing to be recoded. For example, we were quickly able to add image comparison (see Figure 2) when our users demanded it simply by dropping two different viewer controls on the form with a container control. Better yet, when we pointed out the value of most ideas or innovations like this, Atalasoft quickly added them to their "wish list." Then, in the next release, we would find a built-in version of the capability, which meant one less piece of homebrew code to support.

[Click image to view at full size]

Figure 2: Comparing images.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.