I'm using code below for converting an RGB tif file to CMYK format. It works great on my local development machine(Windows 7) but is throwing this error in our Windows 2003 production server.
Error: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [NotSupportedException: No imaging component suitable to complete this operation was found.] Syst开发者_C百科em.Windows.Media.Imaging.FormatConvertedBitmap.FinalizeCreation() +376 System.Windows.Media.Imaging.FormatConvertedBitmap.EndInit() +158 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Below is the code I'm using: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FormatConvertedBitmap newFormatedBitmapSource = new FormatConvertedBitmap(); newFormatedBitmapSource.BeginInit(); newFormatedBitmapSource.Source = myBitmapSource; newFormatedBitmapSource.DestinationFormat = PixelFormats.Cmyk32; newFormatedBitmapSource.EndInit(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've done some research and some people suggested to check the WindowsCodecs.dll version. I did that and found out in my dev machine the version is 6.1.7600 while the server version is 6.0.5840. I tried copying the newer version into the server and registering via regsvr32 but I'm getting "entry point dllregisterserver not found". I tried searching the windowsCodecs 6.1 installer but cannot find any.
How can I update WindowsCodecs.dll in the server? Am I heading in the right solution to this issue? Any input will be greatly appreciated.
Thanks
Another possible resolution is:
If your client is running Windows XP and you are using an icon in your WPF window. There is an icon that shows up in the windows title bar. Remove that icon and any icons in your program windows and it may resolve the error.
Spent hours on this one more than once, and it always had to do with an Icon in the window. Note: other images will work inside the program but not an .ico in the Window Title.
Turned out the server has some issues (file corruption) and needs to be rebuild.
精彩评论