+ All Categories
Home > Documents > How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color...

How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color...

Date post: 28-Mar-2015
Category:
Upload: rosemary-bacon
View: 220 times
Download: 1 times
Share this document with a friend
Popular Tags:
49
How WCS in Windows How WCS in Windows Vista works with Vista works with Drivers and Drivers and Applications Applications Michael Stokes Michael Stokes Microsoft Color Architect 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.
Transcript
Page 1: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

How WCS in Windows How WCS in Windows Vista works with Drivers Vista works with Drivers and Applicationsand Applications

Michael Stokes Michael Stokes Microsoft Color ArchitectMicrosoft 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.

Page 2: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

IntroductionIntroduction

Page 3: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS in Windows VistaWCS in Windows Vista™™ is isA new color management paradigm and A new color management paradigm and infrastructureinfrastructure

A transparent, modular, color processing A transparent, modular, color processing pipeline that allows for easy color pipeline that allows for easy color troubleshootingtroubleshooting

A new development platform for advanced A new development platform for advanced color devices and applicationscolor devices and applications

A platform for innovation in color A platform for innovation in color managementmanagement

The first step in a staged implementation The first step in a staged implementation process that will span several Windows process that will span several Windows releasesreleases

NOT MANDATORYNOT MANDATORYIf it doesn’t make business sense in your If it doesn’t make business sense in your workflow, if it’s not better, don’t use it.workflow, if it’s not better, don’t use it.

Page 4: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS FeaturesWCS FeaturesContinued, improved support for ICC-based workflowsContinued, improved support for ICC-based workflowsNew explicitly staged color processing pipelineNew explicitly staged color processing pipelineNew, Simple XML Profile FormatsNew, Simple XML Profile Formats

Easy to edit, verify, understand and extend by third partiesEasy to edit, verify, understand and extend by third partiesNew Visual ModelNew Visual Model

CIECAM02 instead of reflection-print-like PCSCIECAM02 instead of reflection-print-like PCSBuilt-in baseline device models for common device classesBuilt-in baseline device models for common device classes

Extensible by third party plug-in device modelsExtensible by third party plug-in device modelsSelectable gamut mapping modelsSelectable gamut mapping models

Support for third party plug-in gamut mapping models for Support for third party plug-in gamut mapping models for proprietary algorithms or improvements on baseline gamut proprietary algorithms or improvements on baseline gamut mapping modelsmapping models

Transforms can support black preservationTransforms can support black preservationSupport for high dynamic range, wide gamut, high precision Support for high dynamic range, wide gamut, high precision color data (up to 32 bpc float)color data (up to 32 bpc float)

scRGB with a realistically defined gamut boundary (“wscRGB”)scRGB with a realistically defined gamut boundary (“wscRGB”)Enables color managed proprietary and open RAW workflowsEnables color managed proprietary and open RAW workflows

New centralized color control panelNew centralized color control panelPer-user as well as system-wide profile/device associations, Per-user as well as system-wide profile/device associations, defaults, and settingsdefaults, and settingsNon-Admin users can now install/uninstall profilesNon-Admin users can now install/uninstall profiles

Page 5: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Linear ROI ModelLinear ROI Model

none extensive

Development Investment

New

Ben

efit

s

Legacy compatibleLegacy compatibleWCS XML data as private tags of ICC profilesWCS XML data as private tags of ICC profiles

WCS processing accessible via legacy ICM2 APIsWCS processing accessible via legacy ICM2 APIs

New functionalityNew functionalityWCS XML data directly associated with devicesWCS XML data directly associated with devices

New WCS APIs sharing legacy syntaxNew WCS APIs sharing legacy syntax

Page 6: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Windows Color System and Windows Color System and ICC workflowsICC workflows

WCS still supports and defaults to the same WCS still supports and defaults to the same sRGB ICC profile as previous Windows sRGB ICC profile as previous Windows versionsversionsSeamless interoperability with ICC profile-Seamless interoperability with ICC profile-based workflowsbased workflows

ICC-only transforms run through improved ICM3 ICC-only transforms run through improved ICM3 CMMCMMMixed ICC & WCS transforms run through WCS Mixed ICC & WCS transforms run through WCS CITECITE

Any existing code that uses ICM2 APIs will Any existing code that uses ICM2 APIs will continue to work without any change continue to work without any change requiredrequiredICC Version 4 support is added to ICMICC Version 4 support is added to ICMAddressing key recorded ICM bugsAddressing key recorded ICM bugsImplement new functionality via current Implement new functionality via current ICM2 APIsICM2 APIsOld applications work with new profilesOld applications work with new profilesNew profile format is processed by current New profile format is processed by current ICM2 APIsICM2 APIs

Page 7: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Compatibility DemonstrationsCompatibility Demonstrations

Page 8: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS ComponentsWCS Components

Page 9: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

The Parts of the Windows Color The Parts of the Windows Color SystemSystem

New WCS XML-based color profile formatsNew WCS XML-based color profile formats

Color Infrastructure & Translation Engine Color Infrastructure & Translation Engine (CITE)(CITE)

The Color Appearance Model (CAM)The Color Appearance Model (CAM)Based on CIECAM02Based on CIECAM02

Gamut Boundary and Gamut Shell Gamut Boundary and Gamut Shell FunctionsFunctions

The Baseline Device Model SetThe Baseline Device Model SetExtensible via Device Model Plug-insExtensible via Device Model Plug-ins

The Baseline Gamut Map Model SetThe Baseline Gamut Map Model SetExtensible via Gamut Map Model Plug-insExtensible via Gamut Map Model Plug-ins

And of course the improved ICM CMM, with And of course the improved ICM CMM, with ICC version 4 profile support addedICC version 4 profile support added

Page 10: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS PipelineWCS Pipeline

Page 11: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS Profile FormatsWCS Profile FormatsEach type has its own schemaEach type has its own schema

Device Model Profile (DMP), file extension Device Model Profile (DMP), file extension “.cdmp”“.cdmp”

A DMP targets a particular device model, either one of A DMP targets a particular device model, either one of the built-in “baseline” device models, or a plug-in device the built-in “baseline” device models, or a plug-in device modelmodelDMPs targeting plug-in device models must also specify a DMPs targeting plug-in device models must also specify a baseline device model as a fallbackbaseline device model as a fallback

Color Appearance Model Profile (CAMP), Color Appearance Model Profile (CAMP), “.camp”“.camp”

A CAMP provides the parameters to the CIECAM02 A CAMP provides the parameters to the CIECAM02 equations for a specific viewing condition.equations for a specific viewing condition.

Gamut Map Model Profile (GMMP), Gamut Map Model Profile (GMMP), “.gmmp”“.gmmp”

A GMMP targets a particular gamut mapping model, A GMMP targets a particular gamut mapping model, either one of the built-in baseline gamut mapping either one of the built-in baseline gamut mapping models, or a plug-in gamut mapping model.models, or a plug-in gamut mapping model.As with DMPs, a GMMP that targets a plug-in GMM must As with DMPs, a GMMP that targets a plug-in GMM must also specify a baseline gamut mapping model as a also specify a baseline gamut mapping model as a fallback.fallback.

WCS profiles are embedded in image formats as a WCS profiles are embedded in image formats as a private tag in a WCS-created approximating ICC private tag in a WCS-created approximating ICC profileprofile

Necessary for interoperability off of Windows Vista™Necessary for interoperability off of Windows Vista™

Page 12: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

A WCS sRGB profileA WCS sRGB profile

Page 13: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS Device ModelsWCS Device Models

WCS device models use the WCS device models use the measurement data from a DMP to measurement data from a DMP to instantiate a model that relates instantiate a model that relates device color space coordinates to device color space coordinates to CIEXYZCIEXYZ

Baseline device models implement Baseline device models implement different algorithms and processing different algorithms and processing models for different device classesmodels for different device classes

Third parties can extend the set of Third parties can extend the set of device models by writing plug-in device models by writing plug-in device modelsdevice models

Page 14: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS Baseline Device WCS Baseline Device ModelsModelsCRT Device ModelCRT Device Model

LCD Device ModelLCD Device Model

RGB Capture Device ModelRGB Capture Device Model

RGB Projector Device ModelRGB Projector Device Model

RGB Printer Device ModelRGB Printer Device Model

CMYK Printer Device ModelCMYK Printer Device Model

RGB Virtual Device ModelRGB Virtual Device ModelUsed for wcsRGBUsed for wcsRGB

ICC Virtual Device ModelICC Virtual Device ModelEnables use of ICC profiles in WCS Enables use of ICC profiles in WCS transformstransforms

Page 15: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS Gamut Mapping Models WCS Gamut Mapping Models (GMMs) (GMMs)

All gamut mapping is performed All gamut mapping is performed between explicit source and between explicit source and destination GBD Shells in CIECAM02 destination GBD Shells in CIECAM02 JChJCh

WCS Baseline Gamut Mapping Models WCS Baseline Gamut Mapping Models correspond roughly to ICC rendering correspond roughly to ICC rendering intentsintents

Third parties can extend the set of Third parties can extend the set of available GMMs by writing gamut available GMMs by writing gamut mapping plug-insmapping plug-ins

Page 16: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WCS Baseline GMMsWCS Baseline GMMsSigmoidal Gaussian Knee Clipping (SGKC)Sigmoidal Gaussian Knee Clipping (SGKC)

Equivalent to ICC’s preferred, pictorial, or Equivalent to ICC’s preferred, pictorial, or perceptual intent. perceptual intent. Selected by Photo.gmmpSelected by Photo.gmmp

Minimum Color Difference (MinCD)Minimum Color Difference (MinCD)Equivalent to ICC colorimetric intents:Equivalent to ICC colorimetric intents:Relative if neutral axis mapping is doneRelative if neutral axis mapping is done

Selected by Proofing.gmmpSelected by Proofing.gmmp

Absolute without neutral axis mappingAbsolute without neutral axis mappingSelected by MediaSim.gmmpSelected by MediaSim.gmmp

HueMapHueMapEquivalent to ICC saturation or business Equivalent to ICC saturation or business graphics intentgraphics intentSelected by Graphics.gmmpSelected by Graphics.gmmp

Page 17: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Programming WCSProgramming WCS

Page 18: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Open a Color ProfileOpen a Color Profile

ICC or DMP filename

OpenColorProfile()

Default Profiles in Registry

DMPfilename

CAMPfilename

GMMPfilename

WcsOpenColorProfile()

HPROFILE

Page 19: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

CreateMultiProfileTransformCreateMultiProfileTransform

HTRANSFORM WINAPI CreateMultiProfileTransform(HTRANSFORM WINAPI CreateMultiProfileTransform(PHPROFILE PHPROFILE pahProfilespahProfiles, , // ptr to array of HPROFILEs// ptr to array of HPROFILEsDWORD DWORD nProfilesnProfiles,, // number of HPROFILEs (max 10)// number of HPROFILEs (max 10)PDWORDPDWORD padwIntentpadwIntent,, // ptr to array of intents// ptr to array of intentsDWORDDWORD nIntentsnIntents,, // number of intents (max 10)// number of intents (max 10)DWORD DWORD dwFlagsdwFlags,, ////DWORD indexPreferredCMMDWORD indexPreferredCMM // ignored if any WCS profiles// ignored if any WCS profiles

););

pahProfilespahProfiles - profile array can contain a mix of ICC and WCS profile handles- profile array can contain a mix of ICC and WCS profile handlesIf only ICC profiles are used, processing will be via the improved ICM CMMIf only ICC profiles are used, processing will be via the improved ICM CMM““WCS_ALWAYSWCS_ALWAYS” in ” in dwFlagsdwFlags will force WCS CITE processing in all-ICC-profile case will force WCS CITE processing in all-ICC-profile casenIntentsnIntents must equal 1, must equal 1, nProfilesnProfiles -1, or -1, or nProfilesnProfilesIntents corresponding to WCS HPROFILEs will result in the use of the corresponding Intents corresponding to WCS HPROFILEs will result in the use of the corresponding default GMMP mapped to that intent.default GMMP mapped to that intent.Intents specified in the Intents specified in the padwIntentpadwIntent array trump GMMPs in WCS HPROFILEs, unless… array trump GMMPs in WCS HPROFILEs, unless…For WCS profiles, setting the corresponding intent in For WCS profiles, setting the corresponding intent in padwIntentpadwIntent to to DWORD_MAXDWORD_MAX will will force use of GMMPs contained in WCS HPROFILEs (constructed with force use of GMMPs contained in WCS HPROFILEs (constructed with WcsOpenColorProfileWcsOpenColorProfile).).ICC DeviceLink, Abstract, and NamedColor profiles are not supported in combination ICC DeviceLink, Abstract, and NamedColor profiles are not supported in combination with WCS profileswith WCS profiles..

Page 20: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Transform Profile Sequence ExampleTransform Profile Sequence Example

INTENT_PECEPTUAL DWORD_MAX

HPROFILE A

DMPA

CAMPA

GMMPA

DMPB

CAMPB

GMMPB

DMPC

CAMPC

GMMPC

Default Profiles in Registry

DMPA +CAMPA

GBDA

DMPB +CAMPB

GBDBGMMPPercep. GMMPB

DMPC +CAMPC

GBDC

HPROFILE B HPROFILE C

padwIntent

Page 21: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Color Control Panel Color Control Panel DemonstrationDemonstration

Page 22: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

DemonstrationsDemonstrations

Page 23: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WinHEC Demo Station #1WinHEC Demo Station #1

Page 24: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WinHEC Demo Station #1WinHEC Demo Station #1

TransparencyTransparencyCurrently, all the WCS internal design Currently, all the WCS internal design documents are available under NDAdocuments are available under NDAAll algorithms are published for WCS in All algorithms are published for WCS in Windows Vista™ in MSDNWindows Vista™ in MSDN

Legacy compatible APIs and Data Legacy compatible APIs and Data formatsformats

Office12 compatibilityOffice12 compatibilityAdobe CS2 compatibilityAdobe CS2 compatibilityVista Picture Gallery compatibilityVista Picture Gallery compatibility

10bpc content to hardware10bpc content to hardwareEIZO NANAO R31c medical imaging EIZO NANAO R31c medical imaging displaydisplay

Page 25: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WinHEC Demo Station #2WinHEC Demo Station #2

Page 26: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WinHEC Demo Station #2WinHEC Demo Station #2

WCS advantages in 8bpc workflowsWCS advantages in 8bpc workflowsWide GamutWide Gamut

Supports very wide DSC and working space gamuts Supports very wide DSC and working space gamuts such as ProPhoto without clippingsuch as ProPhoto without clipping

High Dynamic RangeHigh Dynamic RangeSupports RGB virtual device space for values above Supports RGB virtual device space for values above diffuse white (and below reference black)diffuse white (and below reference black)

WCS advantages in >8bpc workflowsWCS advantages in >8bpc workflowsVisual difference in currently shipping hardwareVisual difference in currently shipping hardware

NEC wide gamut 10bpc display, ATI x1300 and Nikon NEC wide gamut 10bpc display, ATI x1300 and Nikon D1xD1x

WCS eliminate contour artifacts due to ICC HDR WCS eliminate contour artifacts due to ICC HDR limitationslimitations

Page 27: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WinHEC Demo Station #3WinHEC Demo Station #3

Page 28: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

WinHEC Demo Station #3WinHEC Demo Station #3

WCS software utility demonstrationWCS software utility demonstrationMonotype ImagingMonotype Imaging

Integrated support for WCS profilesIntegrated support for WCS profiles

Developed CMYK printer plugin with parameterized Developed CMYK printer plugin with parameterized controlscontrols

……in five working daysin five working days

Seiko Epson 2400 CMYK printerSeiko Epson 2400 CMYK printer

Mitsubishi display demonstrationMitsubishi display demonstrationAutomatic synchronization of associated profile Automatic synchronization of associated profile with display hardwarewith display hardware

Change white point with display remote, profile is Change white point with display remote, profile is automatically updated to matchautomatically updated to match

Mitsubishi/NEDO very wide gamut, bright display Mitsubishi/NEDO very wide gamut, bright display prototypeprototype

Page 29: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

XPS and WCS DemonstrationXPS and WCS DemonstrationCMYK and n-channel support in IECMYK and n-channel support in IE

Page 30: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Application/Driver Application/Driver Color CommunicationColor Communication

Conversations to avoid “double Conversations to avoid “double color management” color management”

““What profile do you think best matches your What profile do you think best matches your current state?”current state?”

““I’ve already done the color conversion with I’ve already done the color conversion with thisthis profile: Do no further color management profile: Do no further color management (CM)”(CM)”

““You do the CM usingYou do the CM using this this destination profile” destination profile”

““You do the CM using your idea of the best You do the CM using your idea of the best profile for your current state”profile for your current state”

““You apply your propriety color magic”You apply your propriety color magic”

““I’ve created a color managed print DC, you do I’ve created a color managed print DC, you do no further CM”no further CM”

Page 31: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

In SummaryIn Summary

WSC supports existing color WSC supports existing color workflowsworkflows

WCS provides continuing, enhanced WCS provides continuing, enhanced ICC supportICC support

WCS supports “high, wide, & deep” WCS supports “high, wide, & deep” colorcolor

WCS implement state-of-the art color WCS implement state-of-the art color sciencescience

WCS represents a commitment by WCS represents a commitment by Microsoft to provide an extensible Microsoft to provide an extensible platform for color innovation that will platform for color innovation that will be viable for years to comebe viable for years to come

Page 32: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Color Best PracticesColor Best Practices

Populate, persist, and promote accurate metadataPopulate, persist, and promote accurate metadataAssociate and embed accurate color profilesAssociate and embed accurate color profiles

Use and preserve embedded profilesUse and preserve embedded profiles

If you change color space, update the metadataIf you change color space, update the metadata

If you don’t understand the metadata, preserve itIf you don’t understand the metadata, preserve it

Have your installers associate profiles with your Have your installers associate profiles with your devicesdevices

If it’s not actually an sRGB device, it should have If it’s not actually an sRGB device, it should have associated profile(s)associated profile(s)

Minimize number of color conversions in your Minimize number of color conversions in your workflowsworkflows

Your driver should be aware of your device state Your driver should be aware of your device state and the correct profile for that stateand the correct profile for that state

WCS provides choices – choose what makes sense WCS provides choices – choose what makes sense for your businessfor your business

Page 33: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Opportunities And Opportunities And AdvantagesAdvantages

Your ICC-based workflows continue to work and Your ICC-based workflows continue to work and can now take advantage of version 4 ICC profilescan now take advantage of version 4 ICC profiles

The new WCS XML-based color profiles are The new WCS XML-based color profiles are easily programmatically updated, enabling easily programmatically updated, enabling self-characterizing devicesself-characterizing devices

Third parties can add value via new plug-in device Third parties can add value via new plug-in device models and gamut mapping modelsmodels and gamut mapping models

Vendors can write DM and GMM plug-ins that Vendors can write DM and GMM plug-ins that communicate with one another during processingcommunicate with one another during processing

Support for high dynamic range, wide gamut, high Support for high dynamic range, wide gamut, high precision color data (HWD) in WCS enables precision color data (HWD) in WCS enables integration of such innovative devices into color integration of such innovative devices into color managed workflowsmanaged workflows

Page 34: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

CommunityCommunity

Email questions/feedback to Email questions/feedback to mscolor @microsoft.commscolor @microsoft.com

WCS “Color at Microsoft” blog at WCS “Color at Microsoft” blog at http://blogs.msdn.com/color_bloghttp://blogs.msdn.com/color_blog

Page 35: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

QuestionsQuestions

Page 36: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

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

Page 37: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Backup SlidesBackup Slides

Page 38: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Extensibility Scenario Extensibility Scenario OverviewOverview

Page 39: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Scenario: Advanced ColorScenario: Advanced Color

Windows Photo Gallery prints Windows Media Photo Windows Photo Gallery prints Windows Media Photo image to XPSDrv print driver for 8-color inkjet photo image to XPSDrv print driver for 8-color inkjet photo printerprinter

Page 40: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Scenario: Advanced ColorScenario: Advanced Color

XPS Documents support high dynamic XPS Documents support high dynamic range, wide gamut vector and image range, wide gamut vector and image contentcontent

Using system services, filters can process Using system services, filters can process rich color data to best match printed rich color data to best match printed output to user intent and device output to user intent and device capabilitiescapabilities

Windows Color System (WCS) – Enables Windows Color System (WCS) – Enables extensive color conversionextensive color conversion

Windows Imaging Components (WIC) – Image Windows Imaging Components (WIC) – Image format support for Windows Media Photo and format support for Windows Media Photo and other XPS image formatsother XPS image formats

PrintTicket – Supports an array of color PrintTicket – Supports an array of color processing keywords to enable consistent and processing keywords to enable consistent and unambiguous color control between app and unambiguous color control between app and devicedevice

Page 41: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Scenario: Advanced ColorScenario: Advanced Color

Data FlowData FlowWindows Photo Gallery allows user Windows Photo Gallery allows user selection selection of print settingsof print settings

MXDW driver encapsulates Windows Media MXDW driver encapsulates Windows Media Photo image and print settings (as Photo image and print settings (as PrintTicket) PrintTicket) in XPS Documentin XPS Document

Filter process XPS file, Filter process XPS file, decoding/transforming image, saving decoding/transforming image, saving image to JPG formatimage to JPG format

Page 42: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Advanced Color FilterAdvanced Color Filter

Page 43: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Color Filter: Main MethodColor Filter: Main Method

HRESULT CColorFilter::StartOperation(void) { HRESULT hr = SetupColorTransform(L“SetupColorTransform(L“wsRGB.cdmpwsRGB.cdmp")"); CComPtr<IUnknown> pUnk;

while (SUCCEEDED(hr = m_pProvider->GetXpsPart(&pUnk)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)QueryInterface(&pFP))) { hr = ProcessFixedPage(pFP)ProcessFixedPage(pFP); hr = m_pConsumer->SendFixedPage(pFP)SendFixedPage(pFP); } } m_pConsumer->CloseSender(); m_pPrintPipeManager->FilterFinished(); DeleteColorTransform(m_hColorTrans)DeleteColorTransform(m_hColorTrans); return hr;}

Page 44: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Color Filter: Setup Color Filter: Setup TransformationTransformationHPROFILE OpenColorProfile(const WCHAR * pszProfileName) { PROFILE profile = { PROFILE_FILENAME, (PVOID) pszProfileName, (DWORD) (wcslen(pszProfileName) * sizeof(WCHAR)) };

return WcsOpenColorProfile(&profile, NULL, NULL, PROFILE_READ,WcsOpenColorProfile(&profile, NULL, NULL, PROFILE_READ, FILE_SHARE_READ, OPEN_EXISTING, 0);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,CreateMultiProfileTransform(hProfile, 2, &intents, 1, WCS_ALWAYS | BEST_MODE, INDEX_DONT_CARE)WCS_ALWAYS | BEST_MODE, INDEX_DONT_CARE);

CloseColorProfile(hProfile[0]); CloseColorProfile(hProfile[1]); return hr;}

Page 45: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Color Filter: Page ProcessingColor Filter: Page Processing

HRESULT CColorFilter::ProcessFixedPage(IFixedPage* pFP){ HRESULT hr = S_OK; CComPtr<IPrintWriteStream> pWriter;

if (SUCCEEDED(hr = pFP->GetWriteStream(&pWriter)GetWriteStream(&pWriter))) { CComPtr<IPrintReadStream> pReader;

if (SUCCEEDED(hr = pFP->GetStream(&pReader)GetStream(&pReader))) { CXmlFilter filter(pWriter, pReader)CXmlFilter filter(pWriter, pReader); // XML filter

while (filter.GetToken()filter.GetToken()) if (wcscmp(filter.m_token, L"ImageSource") == 0wcscmp(filter.m_token, L"ImageSource") == 0) { filter.GetToken(); // = filter.GetToken(); // URI for ImageSource ConvertImage(filter.m_token, filter.m_tokenlen, ConvertImage(filter.m_token, filter.m_tokenlen, COUNTOFCOUNTOF(filter.m_token)(filter.m_token), pFP), pFP); } } } pWriter->Close(); } return hr;}

Page 46: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Color Filter: Transform Color Filter: Transform ImageImageHRESULT ConvertWriteImage(pStream, imageUri, pFixedPage){ HRESULT hr = S_OK; CComPtr<IUnknown> pRead; CComPtr<IPartImage> pImagePart; CComPtr<IPrintReadStream> pImageStream; if (SUCCEEDED(hr = pFixedPage->GetPagePart(imageUri, &pRead)pFixedPage->GetPagePart(imageUri, &pRead)) && SUCCEEDED(hr = pRead.QueryInterface(&pImagePart)) && SUCCEEDED(hr = pImagePart->GetStream(&pImageStream)pImagePart->GetStream(&pImageStream))) { CImage src; CImage dst; CPrintStream2IStream readStream(pImageStream, NULL); hr = src.Load(& readStream, m_pImagingFactory)src.Load(& readStream, m_pImagingFactory); hr = dst.Create(src.m_Width,src.m_Height,BM_dst.Create(src.m_Width,src.m_Height,BM_BGRBGRTRIPLETS)TRIPLETS);

TranslateBitmapBits(m_hColorTrans, src.m_pBuffer, src.m_icmFormat, TranslateBitmapBits(m_hColorTrans, src.m_pBuffer, src.m_icmFormat, src.m_Width, src.m_Height, src.m_Stride,src.m_Width, src.m_Height, src.m_Stride, dst.m_pBuffer, dst.m_pBuffer, dst.m_icmFormat, dst.m_Stride, dst.m_icmFormat, dst.m_Stride, NULL, NULL)NULL, NULL);

CPrintStream2IStream writeStream(NULL, pStream); hr = dst.Save(& writeStream, m_pImagingFactory)dst.Save(& writeStream, m_pImagingFactory); } return hr;}

Page 47: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Central Color Control PanelCentral Color Control Panel

Page 48: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Central Color Control PanelCentral Color Control Panel

Page 49: How WCS in Windows Vista works with Drivers and Applications Michael Stokes Microsoft Color Architect © 2006 Microsoft Corporation. All rights reserved.

Central Color Control PanelCentral Color Control Panel


Recommended