Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3304828
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:06:12+00:00 2026-05-17T21:06:12+00:00

I’m creating a small image upload validator for this printing company, they need to

  • 0

I’m creating a small image upload validator for this printing company, they need to make sure that an uploaded image has a color space of either CMYK or PMS.

This is what I’m using right now:

Image img = Image.FromStream(fupFile.PostedFile.InputStream);
ImageFlags flags = (ImageFlags)Enum.Parse(typeof(ImageFlags), img.Flags.ToString());

I can then check flags, which will contain something like “Partially Scalable | ColorSpaceCmyk | HasRealPixelSize”. There’s more info on it here: http://msdn.microsoft.com/en-us/library/system.drawing.imaging.imageflags.aspx

Notice that there is no flag for a PMS color space. Is there a way to check that?

Also, some files I upload, they don’t have a color space flag at all. Does that mean that the color space can’t be recognized?

I’m also wondering if this is a foolproof way to check the color space, or if there is a better strategy?

EDIT:

I’ve been looking around, and I guess you can get a lot of data from the image’s metadata. http://msdn.microsoft.com/en-us/library/xddt0dz7%28v=VS.90%29.aspx

Does anyone know if the metadata contains the image’s color space?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:06:13+00:00Added an answer on May 17, 2026 at 9:06 pm

    PMS is not a color space, rather it is a system of color matching (PANTONE Color Matching System). I seriously doubt you will find any popular bitmap image file codecs that employ this method of encoding pixel color. Rather they will encode the PANTONE color as one of CMYK or RGB (or perhaps another color model).

    Vector file formats like Postscript or PDF may embed spot colors that contain the PMS reference, however, even those formats usually need the RGB or CMYK equivalent of the PMS number.

    The best method of determining an images color model is to know and understand the file format itself. It is not hard to read and parse the raw file headers to determine if the underlying data is stored as CMYK, RGB, etc…

    Robust toolkits, such as Leadtools, may make this task a bit easier and more accurate than anything you will gather from .NET.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.