I am getting an odd exception:
I am getting an odd exception:
Cannot create WIC Imaging Factory object for 'TCustomBitmapCodecWIC'.
This is occuring on Windows 2003 server with code that is built with 10-Seattle and seems to run perfectly fine everywhere else. Nothing weird... In a nutshell, I'm just trying to load the application's icon from the exe to an image on the application's splash screen. This is what it is running and it is choking on the Bitmap.LoadFromStream() call:
var
icon: TIcon;
Stream: TMemoryStream;
begin
icon := TIcon.Create;
icon.LoadFromResourceName(HInstance, 'MAINICON');
if icon.Handle = 0 then
begin
Exit;
end;
Stream := TMemoryStream.Create;
icon.SaveToStream(Stream);
Stream.Position := 0;
imgAbout.Bitmap.LoadFromStream(Stream);
icon.Free;
Stream.Free;
end;
Cannot create WIC Imaging Factory object for 'TCustomBitmapCodecWIC'.
This is occuring on Windows 2003 server with code that is built with 10-Seattle and seems to run perfectly fine everywhere else. Nothing weird... In a nutshell, I'm just trying to load the application's icon from the exe to an image on the application's splash screen. This is what it is running and it is choking on the Bitmap.LoadFromStream() call:
var
icon: TIcon;
Stream: TMemoryStream;
begin
icon := TIcon.Create;
icon.LoadFromResourceName(HInstance, 'MAINICON');
if icon.Handle = 0 then
begin
Exit;
end;
Stream := TMemoryStream.Create;
icon.SaveToStream(Stream);
Stream.Position := 0;
imgAbout.Bitmap.LoadFromStream(Stream);
icon.Free;
Stream.Free;
end;
The IWICImagingFactory interface is supported from Windows Server 2008 and higher.
ReplyDeletehttps://msdn.microsoft.com/de-de/library/windows/desktop/ee690281(v=vs.85).aspx
Uwe Raabe thanks. Since I'm not explicitly using this at all, does this mean that my application is not compatible with Windows versions prior to 2008?! This is our first FireMonkey project...
ReplyDeleteSeattle mentions Windows 2008 as minimum for FireMonkey: docwiki.embarcadero.com - FireMonkey Platform Prerequisites - RAD Studio
ReplyDeleteUpdate: This same application works fine in XP?!
ReplyDeleteThe MSDN link above mentions XP as supporting that interface, too. The fact that XP isn't supported by Seattle doesn't mean that it cannot run under XP. If you have to target FMX on Windows Server 2003 you are probably out of luck. Even XE2 requires that interface.
ReplyDelete