How to identify CMYK images in ASP.NET using C#

后端 未结 6 1439
我寻月下人不归
我寻月下人不归 2021-02-02 14:54

Does anybody know how to properly identify CMYK images in ASP.NET using C#? When I check the Flags attribute of a Bitmap instance, I get incorrect resu

6条回答
  •  余生分开走
    2021-02-02 15:23

    You might check out FreeImage which is a win32 DLL but has a .NET wrapper, I am using it in a production enviroment and it's great.

    I would be surprised if it couldn't provide this information.

    (edit) I didn't notice before you asked for pure .NET solutions - so maybe this won't work - but I have found it a useful supplement to the limitations of the .NET framework for image manipulation.

    Another idea, if you only need to identify the format, is to extract that directly from the file. I have no idea how complex the specification for the JPEG format might be, but hey, it's only 29 pages!

提交回复
热议问题