Skip to content

RAD Studio 2010 Review #7: – A historic moment

12 August, 2009
by Wings of Wind

RAD GesturesHi guys, as usual we’re talking about a prerelease beta. Please keep in mind that anything can change till release. Also, many thanks to Embarcadero for giving us the permission to talk about this.

Well, today, at least for me, is a historic moment. (ok, as a field tester it was some time ago). But why? Take a look at the following picture (it’s a Delphi form in the IDE’s Form Designer), stop reading, and try to spot what is so historical in it. Please feel free to comment at the end…

Scan DELPHI

For me, many things are historical in this screen shot: A 5-year old Delphi Informant page, the article, the author, how the things changed over time. (Remember, at that time Nick was CTO at Lemanix and just a TeamB member).

But there is another historical thing which isn’t so visible… (no, guys, I don’t speak about Ribbons – a nice addition from D2009, even if in D2010 the Ribbon’s code quality was enhanced (bug-fixes etc.)).

Is that for the first time (after many years) the team started to think what the community really needs – and we wish that this trend to continue (more on another post) – and now we have support for WIC (Windows Image Component) out of the box. This means, first of all, support for the latest revision of TIFF format but, also, support for a plethora of WIC codecs (mainly for RAW formats). I tried with Canon’s codec and with a small trick the image is displayed as it should.

In fact the above screen-shot represents a full-blown scanned TIFF v6.0 in a Delphi Form.

Out of the box, now Delphi supports all the common image formats available today: Bitmap (Bmp), JPEG, PNG, GIF (yes, guys, they fixed enough bugs here), ICO, EMF, WMF and, of course, TIFF. Enough WIC codecs can be downloaded freely for your favorite digital camera from the vendor’s site. Image handling is transparent through TImage component.

WIC ships out of the box with Windows XP SP3, Vista or newer. If you have older OSes you can download it for free from Microsoft’s site (or other sites like this one). You can safely ship it with your application and install it in the background (it is very small btw).

There is a unit called WinCodec.pas with enough interfaces and classes for the ones eager to explore. Some examples:


//here you have the GUIDs only
const
  SID_IWICPalette                         = '{00000040-a8f2-4877-ba0a-fd2b6645fb94}';
  SID_IWICBitmapSource                    = '{00000120-a8f2-4877-ba0a-fd2b6645fb94}';
  SID_IWICFormatConverter                 = '{00000301-a8f2-4877-ba0a-fd2b6645fb94}';
  SID_IWICBitmapScaler                    = '{00000302-a8f2-4877-ba0a-fd2b6645fb94}';
  SID_IWICBitmapClipper                   = '{E4FBCF03-223D-4e81-9333-D635556DD1B5}';
  SID_IWICBitmapFlipRotator               = '{5009834F-2D6A-41ce-9E1B-17C5AFF7A782}';
  SID_IWICBitmapLock                      = '{00000123-a8f2-4877-ba0a-fd2b6645fb94}';
  SID_IWICBitmap                          = '{00000121-a8f2-4877-ba0a-fd2b6645fb94}';
  SID_IWICColorTransform                  = '{B66F034F-D0E2-40ab-B436-6DE39E321A94}';

//snipped. There are many more. The interfaces are in fact 32. Also we have 5 classes and 6 procedures.

So anyone who is interested in image processing, image management, in writing a small image manager for his camera, or a big DMS to deal with thousands of scanned files – you can have a look. Also, the ones from industrial imaging segment can give it a go.

Perhaps we should mention that WIC is becoming de facto standard in image handling infrastructure on Windows and is a central part of Windows 7.

Comments? Thoughts? Artistic impressions? :-)

12 Comments leave one →
  1. Alex permalink
    12 August, 2009 5:52 pm

    some TIFF support exists in libraries. TIFFLib for delphi, e.g.
    PNG also. GIF also.
    RAW is interesting. Only RAW is needed in WIC, Imho.

    • Wings of Wind permalink*
      12 August, 2009 9:24 pm

      First you must wait for the vendors to update these libraries. Second, TGIFImage isn’t anymore (Anders Melander’s component is included now in Delphi). Also, the WIC’s plug-in architecture allows you to add way more file formats that are shipped OOTB. Also, some of these libraries aren’t free. And, perhaps one of the most important is that they can now advertise Delphi as “it supports TIFF, RAW etc.”. This means better feature matrix, no more searching for newbies etc.

      • 13 August, 2009 3:30 pm

        Agree, better integrated thngs.

  2. 12 August, 2009 6:48 pm

    Does it support full PNG alpha transparency? How about 32-bit BMPs with alpha transparency? Alpha transparency in TImageLists?

    • 13 August, 2009 3:25 pm

      PNG *fully* supported.

  3. JerseyGuy permalink
    12 August, 2009 9:45 pm

    This isnt historic. Sure, its a nice feature. But you’ve been able to access all supported image formats in Windows using GDI+ since, what, 2001? AND, you also got access to its full range of image processing as well.

    The big question is… does TBitmap support 32-bit images w/ an alpha channel yet? Or is it still based on the old bitmap format?

  4. 13 August, 2009 12:19 am

    You know I was hoping that you were going to do a “pull back the curtain” moment and reveal a new version of this screenshot in Delphi 2010, where the non-visual components were kept in a separate container attached to, but not a part of, the visual form design surface….

    Oh well, maybe in 2011… ?

  5. 13 August, 2009 12:48 am

    I think technically it might be “An Historic Moment”, but I can’t remember – I do remember passing English at school, but I’ve forgotten much since then (particularly spelling)

  6. 21 October, 2009 11:37 am

    Почитал, улыбнуло :) А может и правда всегда думать исключительно о хорошем, а все плохое отбрасывать?

  7. 16 January, 2010 9:10 am

    А мне блог понравился

  8. 3 May, 2010 2:49 am

    А я так посмотрю, Вы как обычно немногословны ;)

Trackbacks

  1. Личная записная

Leave a Reply

Note: You can use basic XHTML in your comments.

Subscribe to this comment feed via RSS