AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi How to work with WIC?
Thema durchsuchen
Ansicht
Themen-Optionen

How to work with WIC?

Ein Thema von WojTec · begonnen am 3. Feb 2010 · letzter Beitrag vom 1. Mär 2010
Antwort Antwort
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

How to work with WIC?

  Alt 3. Feb 2010, 12:08
Today I discover new technology called WIC, but I not found any examples how to work with it I only researched how to load picture and convert format:

Delphi-Quellcode:
// Function() to test if this engine working correctly
function WICImageFormatDescription(const WIC: TWICImage): string;
begin
  Result := '';

  case WIC.ImageFormat of
    wifBmp: Result := 'Bitmap';
    wifPng: Result := 'PNG';
    wifJpeg: Result := 'JPEG';
    wifGif: Result := 'GIF';
    wifTiff: Result := 'TIFF';
    wifWMPhoto: Result := 'JPEG XR';
    wifOther:
    begin
      if GUIDToString(WIC.EncoderContainerFormat) = GUIDToString(GUID_ContainerFormatIco) then
        Result := 'Icon'
      else
        Result := 'other'
      ;
    end;
  end;
end;

var
  WIC: TWICImage;
begin
  WIC := TWICImage.Create;
  try
    if OpenPictureDialog.Execute then
    begin
      WIC.LoadFromFile(OpenPictureDialog.FileName);
      Image.Picture.Assign(WIC);
      ShowMessage(WICImageFormatDescription(WIC));
      WIC.ImageFormat := wifWMPhoto;
      WIC.SaveToFile('output.wdp');
    end;
  finally
    WIC.Free;
  end;
end;
For example how to get installed codecs (names and extensions, eg. to add format to dialogs). Or how to get some info about format and manipulate format during file saving? Or manipulate image? Do you have some experience with this? This looks to be good method to read RAW images.

PS: Is there better method to compare GUIDs than I wrote?
PS2: Do you know native Delphi libs to support image formats? Something like GraphicsEe, but updated to latest format versions (GrEx for example can't read last TIFFs).
  Mit Zitat antworten Zitat
Benutzerbild von fs999
fs999

Registriert seit: 4. Dez 2006
Ort: Luxembourg
46 Beiträge
 
Delphi 10.3 Rio
 
#2

Re: How to work with WIC?

  Alt 1. Mär 2010, 16:42
Hello,

There is DCRaw for delphi from Davie Lee Reed at smatters.com.

Greetings
Frederic
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:31 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz