简体   繁体   中英

How to get image color mode (Greyscale,CMYK or RGB) of an JPEG Image?

i want to find whether the particular image is CMYK/GrayScale/RGB. how to find the color mode of the image in C#.NET/VB.NET/ASP.NET. Pls, help me

You can achieve this using System.Drawing.Image object.

System.Drawing.Image img = System.Drawing.Image.FromStream(fileStream); 

using img object you can retrieve img.PixelFormat; . I hope this will works for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM