Search code examples
delphidelphi-2010

How to use Delphi 2010's new WIC capability on Canon files?


Does anyone know of some sample code that shows how Delphi 2010 can read RAW files using its new COM interface to WIC?

I want to read Canon RAW images and then access specific pixels...


Solution

  • This is the simplest usage:

    procedure TForm116.Button1Click(Sender: TObject);
    var
      WIC: TWICImage;
    begin
      WIC := TWICImage.Create;
      try
        WIC.LoadFromFile('MyFilename.raw');
        Image1.Picture.Graphic.Assign(WIC);
      finally
        WIC.Free;
      end;
    end;
    

    There are many, many, many different types of "raw" image file formats, so there is no telling if WIC will be able to handle it.