1 / 49

How WCS in Windows Vista works with Drivers and Applications

How WCS in Windows Vista works with Drivers and Applications. Michael Stokes Microsoft Color Architect. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Introduction.

wendi
Télécharger la présentation

How WCS in Windows Vista works with Drivers and Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

  2. Introduction

  3. WCS in Windows Vista™ is • A new color management paradigm and infrastructure • A transparent, modular, color processing pipeline that allows for easy color troubleshooting • A new development platform for advanced color devices and applications • A platform for innovation in color management • The first step in a staged implementation process that will span several Windows releases • NOT MANDATORY • If it doesn’t make business sense in your workflow, if it’s not better, don’t use it.

  4. WCS Features • Continued, improved support for ICC-based workflows • New explicitly staged color processing pipeline • New, Simple XML Profile Formats • Easy to edit, verify, understand and extend by third parties • New Visual Model • CIECAM02 instead of reflection-print-like PCS • Built-in baseline device models for common device classes • Extensible by third party plug-in device models • Selectable gamut mapping models • Support for third party plug-in gamut mapping models for proprietary algorithms or improvements on baseline gamut mapping models • Transforms can support black preservation • Support for high dynamic range, wide gamut, high precision color data (up to 32 bpc float) • scRGB with a realistically defined gamut boundary (“wscRGB”) • Enables color managed proprietary and open RAW workflows • New centralized color control panel • Per-user as well as system-wide profile/device associations, defaults, and settings • Non-Admin users can now install/uninstall profiles

  5. Linear ROI Model • Legacy compatible • WCS XML data as private tags of ICC profiles • WCS processing accessible via legacy ICM2 APIs • New functionality • WCS XML data directly associated with devices • New WCS APIs sharing legacy syntax

  6. Windows Color System and ICC workflows • WCS still supports and defaults to the same sRGB ICC profile as previous Windows versions • Seamless interoperability with ICC profile-based workflows • ICC-only transforms run through improved ICM3 CMM • Mixed ICC & WCS transforms run through WCS CITE • Any existing code that uses ICM2 APIs will continue to work without any change required • ICC Version 4 support is added to ICM • Addressing key recorded ICM bugs • Implement new functionality via current ICM2 APIs • Old applications work with new profiles • New profile format is processed by current ICM2 APIs

  7. Compatibility Demonstrations

  8. WCS Components

  9. The Parts of the Windows Color System • New WCS XML-based color profile formats • Color Infrastructure & Translation Engine (CITE) • The Color Appearance Model (CAM) • Based on CIECAM02 • Gamut Boundary and Gamut Shell Functions • The Baseline Device Model Set • Extensible via Device Model Plug-ins • The Baseline Gamut Map Model Set • Extensible via Gamut Map Model Plug-ins • And of course the improved ICM CMM, with ICC version 4 profile support added

  10. WCS Pipeline

  11. WCS Profile FormatsEach type has its own schema • Device Model Profile (DMP), file extension “.cdmp” • A DMP targets a particular device model, either one of the built-in “baseline” device models, or a plug-in device model • DMPs targeting plug-in device models must also specify a baseline device model as a fallback • Color Appearance Model Profile (CAMP), “.camp” • A CAMP provides the parameters to the CIECAM02 equations for a specific viewing condition. • Gamut Map Model Profile (GMMP), “.gmmp” • A GMMP targets a particular gamut mapping model, either one of the built-in baseline gamut mapping models, or a plug-in gamut mapping model. • As with DMPs, a GMMP that targets a plug-in GMM must also specify a baseline gamut mapping model as a fallback. • WCS profiles are embedded in image formats as a private tag in a WCS-created approximating ICC profile • Necessary for interoperability off of Windows Vista™

  12. A WCS sRGB profile

  13. WCS Device Models • WCS device models use the measurement data from a DMP to instantiate a model that relates device color space coordinates to CIEXYZ • Baseline device models implement different algorithms and processing models for different device classes • Third parties can extend the set of device models by writing plug-in device models

  14. WCS Baseline Device Models • CRT Device Model • LCD Device Model • RGB Capture Device Model • RGB Projector Device Model • RGB Printer Device Model • CMYK Printer Device Model • RGB Virtual Device Model • Used for wcsRGB • ICC Virtual Device Model • Enables use of ICC profiles in WCS transforms

  15. WCS Gamut Mapping Models (GMMs) • All gamut mapping is performed between explicit source and destination GBD Shells in CIECAM02 JCh • WCS Baseline Gamut Mapping Models correspond roughly to ICC rendering intents • Third parties can extend the set of available GMMs by writing gamut mapping plug-ins

  16. WCS Baseline GMMs • Sigmoidal Gaussian Knee Clipping (SGKC) • Equivalent to ICC’s preferred, pictorial, or perceptual intent. • Selected by Photo.gmmp • Minimum Color Difference (MinCD) • Equivalent to ICC colorimetric intents: • Relative if neutral axis mapping is done • Selected by Proofing.gmmp • Absolute without neutral axis mapping • Selected by MediaSim.gmmp • HueMap • Equivalent to ICC saturation or business graphics intent • Selected by Graphics.gmmp

  17. Programming WCS

  18. DMP filename CAMP filename GMMP filename Open a Color Profile ICC or DMP filename OpenColorProfile() WcsOpenColorProfile() Default Profiles in Registry HPROFILE

  19. CreateMultiProfileTransform HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE pahProfiles, // ptr to array of HPROFILEs DWORD nProfiles, // number of HPROFILEs (max 10) PDWORDpadwIntent, // ptr to array of intents DWORDnIntents,// number of intents (max 10) DWORD dwFlags,// DWORD indexPreferredCMM// ignored if any WCS profiles ); • pahProfiles- profile array can contain a mix of ICC and WCS profile handles • If only ICC profiles are used, processing will be via the improved ICM CMM • “WCS_ALWAYS” in dwFlags will force WCS CITE processing in all-ICC-profile case • nIntentsmust equal 1, nProfiles -1, or nProfiles • Intents corresponding to WCS HPROFILEs will result in the use of the corresponding default GMMP mapped to that intent. • Intents specified in the padwIntent array trump GMMPs in WCS HPROFILEs, unless… • For WCS profiles, setting the corresponding intent in padwIntent to DWORD_MAX will force use of GMMPs contained in WCS HPROFILEs (constructed with WcsOpenColorProfile). • ICC DeviceLink, Abstract, and NamedColor profiles are not supported in combination with WCS profiles.

  20. Transform Profile Sequence Example padwIntent INTENT_PECEPTUAL DWORD_MAX HPROFILE B HPROFILE C HPROFILE A DMPA CAMPA GMMPA DMPB CAMPB GMMPB DMPC CAMPC GMMPC DMPC +CAMPC  GBDC DMPA +CAMPA  GBDA DMPB +CAMPB  GBDB GMMPPercep. GMMPB Default Profiles in Registry

  21. Color Control Panel Demonstration

  22. Demonstrations

  23. WinHEC Demo Station #1

  24. WinHEC Demo Station #1 • Transparency • Currently, all the WCS internal design documents are available under NDA • All algorithms are published for WCS in Windows Vista™ in MSDN • Legacy compatible APIs and Data formats • Office12 compatibility • Adobe CS2 compatibility • Vista Picture Gallery compatibility • 10bpc content to hardware • EIZO NANAO R31c medical imaging display

  25. WinHEC Demo Station #2

  26. WinHEC Demo Station #2 • WCS advantages in 8bpc workflows • Wide Gamut • Supports very wide DSC and working space gamuts such as ProPhoto without clipping • High Dynamic Range • Supports RGB virtual device space for values above diffuse white (and below reference black) • WCS advantages in >8bpc workflows • Visual difference in currently shipping hardware • NEC wide gamut 10bpc display, ATI x1300 and Nikon D1x • WCS eliminate contour artifacts due to ICC HDR limitations

  27. WinHEC Demo Station #3

  28. WinHEC Demo Station #3 • WCS software utility demonstration • Monotype Imaging • Integrated support for WCS profiles • Developed CMYK printer plugin with parameterized controls • …in five working days • Seiko Epson 2400 CMYK printer • Mitsubishi display demonstration • Automatic synchronization of associated profile with display hardware • Change white point with display remote, profile is automatically updated to match • Mitsubishi/NEDO very wide gamut, bright display prototype

  29. XPS and WCS DemonstrationCMYK and n-channel support in IE

  30. Application/Driver Color Communication • Conversations to avoid “double color management” • “What profile do you think best matches your current state?” • “I’ve already done the color conversion with this profile: Do no further color management (CM)” • “You do the CM using this destination profile” • “You do the CM using your idea of the best profile for your current state” • “You apply your propriety color magic” • “I’ve created a color managed print DC, you do no further CM”

  31. In Summary • WSC supports existing color workflows • WCS provides continuing, enhanced ICC support • WCS supports “high, wide, & deep” color • WCS implement state-of-the art color science • WCS represents a commitment by Microsoft to provide an extensible platform for color innovation that will be viable for years to come

  32. Color Best Practices • Populate, persist, and promote accurate metadata • Associate and embed accurate color profiles • Use and preserve embedded profiles • If you change color space, update the metadata • If you don’t understand the metadata, preserve it • Have your installers associate profiles with your devices • If it’s not actually an sRGB device, it should have associated profile(s) • Minimize number of color conversions in your workflows • Your driver should be aware of your device state and the correct profile for that state • WCS provides choices – choose what makes sense for your business

  33. Opportunities And Advantages • Your ICC-based workflows continue to work and can now take advantage of version 4 ICC profiles • The new WCS XML-based color profiles are easily programmatically updated, enabling self-characterizing devices • Third parties can add value via new plug-in device models and gamut mapping models • Vendors can write DM and GMM plug-ins that communicate with one another during processing • Support for high dynamic range, wide gamut, high precision color data (HWD) in WCS enables integration of such innovative devices into color managed workflows

  34. Community • Email questions/feedback to mscolor @microsoft.com • WCS “Color at Microsoft” blog at http://blogs.msdn.com/color_blog

  35. Questions

  36. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

  37. Backup Slides

  38. Extensibility Scenario Overview

  39. Windows Photo Gallery prints Windows Media Photo image to XPSDrv print driver for 8-color inkjet photo printer Scenario: Advanced Color

  40. Scenario: Advanced Color • XPS Documents support high dynamic range, wide gamut vector and image content • Using system services, filters can process rich color data to best match printed output to user intent and device capabilities • Windows Color System (WCS) – Enables extensive color conversion • Windows Imaging Components (WIC) – Image format support for Windows Media Photo and other XPS image formats • PrintTicket – Supports an array of color processing keywords to enable consistent and unambiguous color control between app and device

  41. Scenario: Advanced Color Data Flow • Windows Photo Gallery allows user selection of print settings • MXDW driver encapsulates Windows Media Photo image and print settings (as PrintTicket) in XPS Document • Filter process XPS file, decoding/transforming image, saving image to JPG format

  42. Advanced Color Filter

  43. Color Filter: Main Method HRESULT CColorFilter::StartOperation(void) { HRESULT hr =SetupColorTransform(L“wsRGB.cdmp"); CComPtr<IUnknown> pUnk; while (SUCCEEDED(hr = m_pProvider->GetXpsPart(&pUnk))) { CComPtr<IXpsDocument> pXD; CComPtr<IFixedPage> pFP; if (SUCCEEDED(pUnk.QueryInterface(&pXD))) { hr = m_pConsumer->SendXpsDocument(pXD); } else if ... else if (SUCCEEDED(pUnk.QueryInterface(&pFP))) { hr = ProcessFixedPage(pFP); hr = m_pConsumer->SendFixedPage(pFP); } } m_pConsumer->CloseSender(); m_pPrintPipeManager->FilterFinished(); DeleteColorTransform(m_hColorTrans); return hr; }

  44. Color Filter: Setup Transformation HPROFILE OpenColorProfile(const WCHAR * pszProfileName) { PROFILE profile = {PROFILE_FILENAME, (PVOID) pszProfileName, (DWORD) (wcslen(pszProfileName) * sizeof(WCHAR)) }; returnWcsOpenColorProfile(&profile, NULL, NULL, PROFILE_READ, FILE_SHARE_READ, OPEN_EXISTING, 0); } HRESULT SetupColorTransform(const WCHAR * pszDestProfileName) { HRESULT hr = S_OK;HPROFILE hProfile[2]; hProfile[0] = OpenColorProfile(L"wscRGB.cdmp"); hProfile[1] = OpenColorProfile(pszDestProfileName); DWORD intents = INTENT_ABSOLUTE_COLORIMETRIC; m_hColorTrans =CreateMultiProfileTransform(hProfile, 2, &intents, 1, WCS_ALWAYS | BEST_MODE, INDEX_DONT_CARE); CloseColorProfile(hProfile[0]); CloseColorProfile(hProfile[1]); return hr; }

  45. Color Filter: Page Processing HRESULT CColorFilter::ProcessFixedPage(IFixedPage* pFP) { HRESULT hr = S_OK; CComPtr<IPrintWriteStream> pWriter; if (SUCCEEDED(hr = pFP->GetWriteStream(&pWriter))) { CComPtr<IPrintReadStream> pReader; if (SUCCEEDED(hr = pFP->GetStream(&pReader))) { CXmlFilter filter(pWriter, pReader);// XML filter while (filter.GetToken()) if (wcscmp(filter.m_token, L"ImageSource") == 0) { filter.GetToken(); // = filter.GetToken(); // URI for ImageSource ConvertImage(filter.m_token, filter.m_tokenlen, COUNTOF(filter.m_token), pFP); } } } pWriter->Close(); } return hr; }

  46. Color Filter: Transform Image HRESULT ConvertWriteImage(pStream, imageUri, pFixedPage) { HRESULT hr = S_OK; CComPtr<IUnknown> pRead; CComPtr<IPartImage> pImagePart; CComPtr<IPrintReadStream> pImageStream; if (SUCCEEDED(hr =pFixedPage->GetPagePart(imageUri, &pRead)) && SUCCEEDED(hr = pRead.QueryInterface(&pImagePart)) && SUCCEEDED(hr =pImagePart->GetStream(&pImageStream))) { CImage src;CImage dst; CPrintStream2IStream readStream(pImageStream, NULL); hr=src.Load(& readStream, m_pImagingFactory); hr=dst.Create(src.m_Width,src.m_Height,BM_BGRTRIPLETS); TranslateBitmapBits(m_hColorTrans, src.m_pBuffer, src.m_icmFormat, src.m_Width, src.m_Height, src.m_Stride, dst.m_pBuffer, dst.m_icmFormat, dst.m_Stride, NULL, NULL); CPrintStream2IStream writeStream(NULL, pStream); hr =dst.Save(& writeStream, m_pImagingFactory); } return hr; }

  47. Central Color Control Panel

  48. Central Color Control Panel

  49. Central Color Control Panel

More Related