WWDC2001 Session 118
Transcript
Kind: captions
Language: en
good afternoon everyone I'd like to
welcome into session 118 which is color
sync again I'm Travis Brown and the Mac
os10 imaging technology manager and I'll
be being assisted by the color sync
engineering team color sync is has a new
role in Mac OS 10 and what's important
to note is that it's fundamentally
integrated in the operating system and
this is a different story from color
sync on previous versions the Mac OS
wear was an optional extension in fact
many users who are not maybe in a
professional publishing space never even
bothered to install it or never even
knew what it did well Mac OS 10 takes
the opportunity to integrate color sync
because color and color management is
very very important to a customer
experience whether it be a high-end
publishing customer or even someone
using let's say digital camera and
trying to look at an image on screen and
then print it for that reason
quartz takes advantage of color seeing
can great and great detail additionally
it's used throughout the print path to
provide color matching services for
prints printer drivers as well because
of this I want to bracket the sort of
content for today's session we're gonna
aim some of the content at developers
who maybe have never used color sync or
even may be aware of color sync so we're
gonna start with an overview of color
sync then we're gonna drop down into a
fairly detailed discussion of how color
sync in quartz in a react to provide a
color managed experience in Mac OS 10
we're gonna come back up a level and
talk about profiles in CMM this will be
familiar to developers who are used to
developing with the color sync api's on
Mac OS 9 and earlier and then one thing
we think is very important is since all
applications can share in a and the
color managed workflow that exists
within any Mac OS 10 system we feel it's
important for developers to take
advantage of the preference systems the
the preference api's that are available
in Mac OS 10 for you to figure out what
the user wants in terms of color this is
something that is going to be very
important because you could have for
example a designer who maybe creates
content for the web and they therefore
they want their primary RGB
colorspace to be maybe something like
srgb and it's very important for
application developers to learn how to
pick that information up from the system
then we'll also talk about the Vice
integration where you can associate
profiles with devices that are available
in the computer and then we'll conclude
with a question and answer so what I
want to do now is turn things over to
David Hayward he's going to tell you
more give you an overview of colorsync
good afternoon everyone
thanks for coming again I want to start
out today talking about a general
overview of color sync for those of you
in the audience who may not be familiar
with color management in general or
color sync in particular first thing to
be aware of is what is the problem that
color sync is trying to solve well as
we're all aware there's a wide variety
of devices that we all work with these
days some of them such as flatbed
scanners digital cameras LCD displays
tube displays toner printers inkjet
printers all of these devices represent
colors in very very different ways they
have different color spaces and also
they have different gamuts which is a
term for the range of colors that device
can represent so this is the problem
that makes it very difficult for a
document that's acquired from one device
to be rendered correctly on another
device or in a printer or a different
kind of printer the solution is color
sync which is an established solution
that provides a complete color
management solution which is designed to
provide consistent color across a wide
variety of devices even more than that
though colors new can also be used to do
color management or color
transformations that are not even
associated with devices such as human or
contrast enhancement but for most of the
subject we'll be talking about today you
can think of color sync as a way of
transforming colors from one source
device to a destination device so that's
the problem in the solution this the two
key foundations upon which color sync
are built are ICC profiles and CIE color
management modules or CMS I want to talk
in a little bit more detail about these
two key ingredients first of all ICC
profiles the icc profile is a
cross-platform file format defined by
the ISAT international color consortium
or ICC which is made up of members from
70 different companies you can find out
more information about them from their
website which is WWE
that describes how to transform between
device color space and an intermediate
color space or pcs which is the term
that the ICC promotes now this file
format allows for description of a wide
variety of devices but also encompasses
several standard color spaces which you
may have worked with such as srgb NTSC
etc the data that's contained in the
profile to a certain extent implies a
certain processing model but it's also
flexible and open the profile format is
can be extended by optional tags which
vendors can take advantage of in order
to provide specific solutions for their
customers also the icc profile format is
an evolving format it's ongoing
improvements are being made to it I'll
be talking more about that later when we
talk about the ICC for profile format
that's on the horizon so if you think of
profiles as the data that are used for
color management
CMMS are the code and the CMM or color
management module provides the
mathematical engine to perform profile
to profile transformations there's a
default CMM that Apple ships is part of
color sync which is the Apple CMM and
this is the same CMM that we ship on Mac
OS 9 and Mac OS 10
however again we've designed the system
to be open and expandable third parties
can add their own CMM so if they want to
provide their own alternate methods for
doing color transformations and several
been provided in the past by a wide
variety of vendors so this is a classic
diagram to show how color sync fits into
the Mac OS 10 architecture at the top
you have the familiar purple boxes for
carbon and cocoa applications these
applications can call color sync either
directly or indirectly by going through
other API such as quick-draw and quartz
rendering system the color singh can
then dynamically call CMMS as needed
either using the Apple CMM or third
party party CMM and all of this system
is based upon the Darwin foundation
provided in Mac o
so that's sort of the architectural
overview here's a diagram that I wanted
to add to give an idea of how color
management is actually used in practice
for those of you are not aware the idea
is again you have an application at the
top which is using color sync either
indirectly or directly and what the
document wants to do or the application
wants to do is to render a document
correctly that document let's say for
example it comes from a digital camera
the document may contain a profile
embedded with it that describes that
devices color space or it's also
possible if that profile doesn't contain
a profile to obtain a correct profile
for that device given that correct
profile for that device we now know how
to correctly understand the colors that
are represented within that document
without a profile those values are just
values we don't know how to correctly
interpret them now if we want to render
this image correctly on the display then
we need a destination profile in this
case we need to obtain the profile for
the display once we have a source and
destination profile then now we can
match the pixel data from the source or
camera profile to the destination or
display profile in order to provide the
most faithful reproduction of that
source image on that destination device
the story when it comes time to print is
very similar again you need a
destination profile in this case we can
obtain a profile from the printer and
again we can now match from the source
to the destination printer profile in
order to provide the best most faithful
representation of the image across its a
print time and lastly just a little bit
of a history lesson of color sync color
sync started back in 1993 in version 1.0
and has grown and become more and more
established along the way to version 3.1
which ships today as part of Mac OS 10
so it's it's it's been an exciting
project to be involved with the color
sync 2.0 and greater API which many of
you who are familiar with using color
sync on Mac OS 9 it's fully supported on
Mac OS 10 which means that it should be
very very easy for you to port your
applications that are using color sync
today to Mac OS 10 that being said there
are also some new API and new
functionality provided for color sync on
Mac OS 10 which will provide some new
enhancements which you may want to take
advantage
and also what's very very important is
that courts in the printing model on Mac
OS 10 make full use of color sync which
provides a good segue for me to pass off
to Luke Wallace who will be talking
about color sync and courts thanks thank
you David
as you just learn color sync API on Mac
OS 10 is fully implemented it covers
completely the color sing API on Mac OS
9 it includes some new features and it's
available for all applications that want
to use it in Mac OS 10 however color
sync was assigned a new role besides the
standard application services similar to
those on Mac OS 9 color sync is now also
used to provide color management to
other system components one of those
components is quartz our new graphic
system based on the PDF imaging model I
would like to show you how color sync is
used in quartz as you are going to see
quartz created a new paradigm for color
management which offers an alternative
access to colors and functionality and
if I want it to be very specific about
the topic I would rephrase it at color
as color sync and colored quartz color
management the objective for the quartz
color management was to integrate
graphics and color management services
satisfying some basic requirements first
of all quartz needed an ability to
composite different color spaces in
opacity to meet this requirement color
Singh is used to convert data from many
different color spaces into the one
selected by quartz as a working space
for compositing the second requirement
is focused on the needs of developers
it comes from the fact that all
applications using courts will have to
work with color management a scaleable
solution which is implemented in courts
should serve the needs of wide range of
applications on one end the involvement
of an application in color management
can be very minimal and just limited to
the use of some predefined default
settings provided by courts but on the
other end an application will have the
same full control over color management
as in accessing color sync directly
other requirements requirements are
color accuracy performance and
compatibility with PDF in simple terms
quartz quartz color management could be
described as built around color sync
which is used as an engine to process
PDF color data produced by quartz but in
order to better understand its design
let's review some of the basic concepts
pertaining to color in PDF and color
sync in PDF color is defined by by one
of the known color spaces device
calibrated or ICC based as you can see
this list reflects in essence the
history of color management initially
only device color spaces were supported
as we can say from today's perspective
those merely provided a classification
of different process color models and
because the color appearance is device
dependent these spaces are as a matter
of fact the worst choice for the
faithful color reproduction across
different devices next calibrated color
was invented along with the idea of
color convergence through device
independent color the advantage of this
method is a significant improvement in
color matching across the
from devices PDF follow that by adding
calibrated color spaces later on
calibrated color evolved into the
standard form that we here in this crowd
I quite familiar with and this standard
form is the ICC profile when the color
management based on ICC profiles gained
its popularity and became the de facto
standard among color professionals PDF
edit ICC based color space which allows
for embedding ICC profiles in PDF
documents PDF color conversions could be
described as a function of source color
space destination color space and
rendering intent please take note of the
rendering intent values in PDF as they
will refer to the next slide let's take
a look now how color sync and ICC define
color and color conversions naturally
color is defined by an ICC profile as I
mentioned a moment ago the ICC profile
is the in practice the most general form
of the color space description ICC color
conversions are basically very similar
to those in PDF the difference is an
option for inserting the intermediate
profiles between the source and
destination these additional profiles
are used in advanced color management
for things like soft proofing color
device simulation applying special
effects etc as we can see now the
rendering intent values in ICC are
exactly the same as those in PDF
the color model in quartz was created by
integrating PDF and ICC color models
let's review some of the most important
features of this model first of all all
PDF color spaces are expressed in courts
as ICC profiles device color spaces I
assign default profiles calibrated color
spaces contain the calibration record
which can be very easily repackaged as
the ICC profile and finally ICC based
color spaces provide their own ICC
profiles another simple but very
important concept that quartz inherited
from PDF is color space equivalents an
implied rule is that color conversions
are necessary only if the source color
space is different from the destination
quartz takes advantage of the simple
rule to properly organize the flow of
color data through multiple rendering
stages as I mentioned all PDF color
spaces are expressed in quartz an ICC
profile in the manner which is seamless
and transparent to all applications
working in the PDF imaging model but at
the same time we needed provision in
courts to create color transformations
from more than two profiles for that
reason we design a color space which can
consist of one or more ICC profiles this
way we are able to preserve the PDF
concept of matching a single source to a
single destination but at the same time
we are able to create those complex
color transformations which are suitable
for advanced color management and if the
need arises for such a color space to be
embedded in PDF the multiple profiles
contained in such a color space can be
concatenated by coloring into a single
profile
for the completeness it's worth
mentioning that quartz can also
encompass implicit device conversions as
defined in PDF by proper configuration
of the default color spaces here is an
example of the configuration handling
device gray - device RGB and device CMYK
- device RGB conversions let's see now
how all the things I was talking about
come together to provide the desired
color processing in the quartz drawing
model from the top-level perspective
there are three main components involved
in this model an application generating
the graphic contents quartz providing
the rendering services and the
destination for the rasterize data in
terms of color processing the
application can request quartz to render
data in any of the PDF color spaces to
accomplish that quartz will convert all
these into ICC profiles the default
profiles are selected by quartz but can
be overloaded by the application quartz
will do all compositing in the working
space and color sync will be invoked to
perform color transformations from any
of the source color spaces to the
working space and finally when
compositing is completed the rasterize
data will be sent to the desired
destination naturally if the color stays
of the destination doesn't match the
working space an additional conversion
must be done between the working space
and the destination here is an example
of quartz color management usage an
application creates contents in the
device RGB color space after
being rendered that content should be
display on the primary this monitor
without any color conversions from the
color management point of view we can
classify this case as a creek as
creating and rendering the data in the
same color space this case can be a
typical case of a very simple
application which doesn't have any color
management capabilities if that were the
old system and the application opened
the file which contained data in
different color spaces then device RGB
then the application itself would have
to convert the data to this to the
system profile otherwise displaying such
data would cause the core errors or
perhaps would be even possible at all
let's see what happens in quartz if the
application didn't do anything about
converting color and pass the data
directly to quartz as you have seen all
conversions happened correctly in quartz
and the data from different color spaces
is converted properly to the primary
display as a matter of fact this
configuration is 3fi is a predefined
default setting used by courts the same
configuration could be used by the by
the advanced color applications which
would like to use quartz only for
rendering without any color conversions
obviously many other combinations are
also possible here let me show you now
how convenient quartz color management
can be for some other that other color
operations for example applying special
effects to all data can be very easily
achieved by simply adding the abstract
profile to the working space as you can
see all conversions to the working space
will include the transformation defined
in the abstract profile another example
could be soft proofing the only thing we
need to do is to add the printer profile
to the working space and this way all
color Corrections defining the printer
profile who will be reflected in the
working space and consequently shown on
the primary display the use of multi
profile color spaces is not limited to
cause internals an application also
could use it here is an example of an
application using this kind of color
space to create some kind of free
transform color space for some
additional color effects to complete my
story about color management in quartz
let me tell you how color is handled in
printing from quartz so far I was
talking about the main flow of the color
data from the source to destination but
one more step is pulso possible here the
contents can be spooled in the PDF form
for printing which will be handled by
the Print Center there is one very
important fact about this pooled data as
I pointed out here all color data is
tagged in spool PDF and all and profiles
are assigned to the data exactly the
same way as they were four colors in
processing course is also used to
rasterize this pooled PDF at the
printing back-end from the color
management perspective we have a few
options here the first one is to use
color sink for color matching in this
case the working space is created from
printer profile and a special kind of
working space profile this working space
profile has a gamut large enough to
contain the gamut of the printer profile
but at the same time has all the
features needed by courts for
compositing the reason for adding the
printer profile is to assure
that all data tagged with different
rendering intents in this pooled PDF
will be rendered according to the
corresponding tags containing the
printer profile when the rendering is
completed the print job manager will
convert the data from the working space
to the printer profile another option is
custom custom driver color matching by
assumption our goal here is to provide
the best WYSIWYG experience for that
reason the color data by design is going
to be handed off in the system profile
color space for that reason working
space is set the system profile as a
result all data which is tagged with
system profiles will remain untouched
and obviously all other color data will
be converted by color sync to the system
profile color sync is also involved in
PostScript back-end from the color
management perspective our goal here is
to convert the color spaces containing
the spooled PDF to post-trip CSAs for
those of you who are not familiar with
the term of postscript csa let me
briefly explain that CSA stands for
color space array and it is used in
PostScript for the same way for
containing the calibration record as
calibrated spaces in PDF or ICC profiles
and quartz has internal capabilities to
convert PDF calibrated color spaces
directly to PostScript CSAs
all ICC profiles will be converted to
PostScript CSAs using color sync and
this concludes my talk on cords and
color sync so now I'll pass it back to
David thank you for your attention
[Applause]
thanks Luke so after that detailed
discussion I want to go back and go into
a little bit more detail on the subject
of color sync profiles and how they work
on Mac os10 as you may be aware from mac
os9 profiles are traditionally stored in
the profiles folder within the system
folder if an application wanted to get
access to that folder they would use the
color sync API cm get color sync folder
spec passing in for the V ref num
constant K system disc or I forget the
other constants that we're equivalent to
that but the idea behind it is that
would give you the location of the color
sync profiles folder you could also use
fine folder which is an equivalent API
however on Mac OS 10 one of the key
features in Mac OS 10 is that it's
designed from the get-go to be
multi-user and network savvy and for
this reason there's no longer just one
location where profiles can be installed
so now there's several locations first
of all there's a special location inside
the system folder which is system
library color sync profiles and this is
where color sync stores a few profiles
that it needs for critical operations
which means even if all the other
profiles were to be trashed by users
they could colorsync could still work
with just these few profiles to a
limited extent this profiles folder is
locked and protected but if you need to
get access to be able to read the
profiles in this directory you can get
access to this location by still by
calling CM get color sync folder spec
but instead you can pass in case system
domain for the V ref known parameter the
main place where profiles are stored is
in library color sync profiles this is
where we ship the majority of our
profiles this location is actually read
and writable by users so your
application or users can install
profiles in here as well if you need to
get access to this location you can pass
in K local domain for the Revere FM
constant if you're in a network
environment and your administrator is
installed profiles on the network for
your network devices these can be
installed in the standard location
Network library color sync profiles and
you can get access to this by passing in
k network domain
lastly users can install their own
personal profiles within their home
directory which
she's in the UNIX parlance tilda library
color sync profiles and as on mac os9
color sync also supports looking in
subfolders of all of these directories
or in say aliases disorders or aliases
to profile so the end-all situation we
have here is there's a lot of locations
where profiles can be stored so what
this means is it's probably more
important than ever if you're an
application and you want to present a
pop-up menu that shows a list of
profiles that are installed to the user
you really want to use the CM iterate
color sync folder API this API will
quickly call a callback proc for every
profile install that is installed in the
system in addition to simplifying your
code from having to deal with all these
locations
it also has performance benefits in that
it caches the frequently needed
information one caveat to mention
however is if you're running Mac OS 10
and you have a classic system folder
setup color sync will not automatically
search in the classic system folders
profiles directory however if your
application wants to get access at this
location to show those profiles to your
user you can easily do that by again
calling K cm get color sync folder spec
and this time you could pass in the K
classic domain so that's a lot of
directories I know and it's one of the
mark more common questions we have is
quite simply where do I install my
profiles and the short answer to the
question is applications should install
profiles in library color sync profiles
or in a subfolder it of it that being
said users can install profiles if they
wish in their own home directory so what
does it mean to be a profile well
traditionally profiles were filtered
based on their type and creator on Mac
OS 9 and the type was prof. and the
creator was synced but in actuality
that's not you know all that important
because profiles actually come from a
variety of sources and they may not have
types and creators so color sync no
longer checks the type and creator of
profiles also profiles need not have any
suffix or they may have any suffix
doesn't matter but if you are going to
have a suffix we request that you use
ICC by standardizing on one suffix it
makes it easier for applications that
are you
macoco NS open panel to filter profiles
same reason if you are going to use a
type in creator we'd recommend use prof
sync because that'll make it easier for
applications that are using the carbon
navigation services to filter profiles
but at its heart color Singh doesn't
care about type trader or suffix just
make life easier for your users what
really matters that distinguishes a
profile from any other file on your disk
is that it have be a valid ICC profile
and one quick way of determining that is
if there's a tap appropriate offset
within the header there's a signature
bytes which are a CSP color sync profile
I believe it stands for and that's what
really matters and that's what color
sync uses to determine if a file is a
profile we also impose the additional
restriction that the profile have a
valid description tag in it because we
realize in actual practice a lot of
applications put up pop-up menus or
scrolling lists with profiles and if a
profile has a bad name in it can either
be rendered as garbage tour or cause
other problems so in order to avoid this
problem it's more important than ever to
use the profile first aid color sync
utility to make sure that the profiles
that your application ships or creates
are free of common errors I'll show that
a little bit later also another one of
the key features of Mac OS 10 is that
it's for the first time it's a multi
localized operating system which means
that a given CD if Mac OS 10 contains
multiple languages on it and we've
wanted to provide that same
functionality for ICC profiles which
previously did not have this support so
we defined a new optional tag type of
type mluc which stands for multi
localized unicode string and this tag
you can think of it as containing a list
of a string be at the name of the
profile or whatever which has been
localized for multiple language and
regions we've also provided an easy api
for you to access this data that's
turned out to be tricky in the past so
first off there's the apic-em copy
profile localized string dictionary and
what this API does is allow you to get a
CF dictionary which contains the
language locale and string for multiple
localizations and it'll return to you
return that to you for
this specific tag of a pro of a given
profile similarly there's a cm set
profile localized string dictionary
which allows you to write a dictionary
of localized strings into a tag of a
profile in more typical practice however
your application just wants to get one
specific name out of a profile and for
that we have an API cm copy profile
localized string which you give it a
profile a tag a requested language and
region and then it will return to you
the actual language and region and the
actual string here's an example of it
being used in practice at the bottom
here is a cm copy profile localized
strings we pass in the prof the DSC M
tag which is the optional tag where this
might be stored and then in this case
the application is looking to see a US
English string being returned if that
tag if that profile does not contain a
US English string it'll try to return an
English string if it doesn't do that
it'll fall back to a reasonable default
another typical usage of this API is if
your application doesn't even care what
language is being returned you can pass
in mil where the en-us is passed in here
in this situation which is very simple
to call the color sync will
automatically return the best language
in the profile given the users current
preferred language settings so while
still talking about profiles I want to
talk for a bit about ICC profiles which
is an important change that's on the
horizon the ICC consortium has been
working long and hard on a new format
for profiles in order to provide more
flexibility and power and they're
calling it icc version 4.0 profiles I
don't want to go into all the details
that it changes you can probably get
information on that in more detail on
the web I just want to give you a few
highlights of the changes and what to be
aware of first off there's obviously a
new version field in the header of the
profile so that you can tell whether a
profile is a version 4 profile or an
earlier version also there's an md5 or
message digest checksum within the
profile header which is a very useful
feature if your application wants to be
able to tell if two profiles are
identical or not or to tell if a
profiles changed over
you can either access this md5 checksum
directly from the header a 16 byte value
or you can also use there's a color sync
apic-em get profile md5 the color sync
API has the advantage is that it works
on both ICC 4 profiles and earlier
profiles which don't have it embedded in
the header there's also some new tag
data types which are really where the
new power and flexibility come with ICC
version 4 profiles for one thing they
standardize on the mluc or multi
localized Unicode tag which I spoke
about in the previous slide but also
there's some new multi-dimensional
transform tags or multi-purpose transfer
tags M ba and ma B that provide a lot of
power to profile creators the important
thing to be aware of is that some of
your existing tags that you've used to
reading may contain the new data formats
whereas before contain the old data
format so for example if you were to
look in the a2b0 tag of a profile
traditionally that used to contain
either the mft1 or mft2 tag types but
starting with ITC version for that data
may actually be of a completely
different type which is the MBA or ma B
tag so this good news is that color sync
an apple CMM will be fully ICC for Savi
which means that if your application
doesn't do any parsing of profiles and
all it just all does is open profile
references and does color management
using those references or uses color
sync indirectly through courts then
everything will work perfectly however
if your application is in the business
of creating profiles or modifying
profiles you need to be aware of these
new tag types and make sure that you
handle those cases correctly so I want
to go into a little bit more detail on
CMMS on Mac OS 10 as well like with
profiles cm M's can also be installed in
multiple locations the typical location
if an application wanted to install a
profile would be in library color sync
CMMS I don't know if you've noticed that
the sort of family here is that a lot of
the color sync stuff is stored within
some library color sync directory so in
this case is library color sync CMS also
a user if they had a seaman that they
wanted to use
personally but didn't want to force
everyone on that machine to use that CMM
they can have a personal CMM installed
which is a great way to debug CMMS by
the way installing it until the library
caller syncs CMMS so what this means is
that if you have an application that
wants to present a list of CMMS to the
user that are available so that the user
can choose a preferred CMM you want to
use the CM iterate CMM info API and this
call will give you information about all
the CMM x' that are installed in the
system including the default apple CMM
if your solution involves building a CMM
there's some things you need to be aware
of the one key thing is that see MEMS on
Mac OS 10 or CF bundle based whereas on
Mac OS 9 they were component manager
based so you'll want to take a look at
the CF bundle documentation for
information on how to package your CMM
as a CF bundle but for the most part the
CMM will be very familiar to you on Mac
OS 10 all your your entry points that
you've supported in the past CMM open
CMM can cat the CMM match bitmap will
all be there the only difference is that
instead of having a component manager
wrapper around these entry points you'll
have a CF bundle wrapper around it
instead the apple CMM which we shipped
as part of Mac OS 10 has undergone a lot
of work in order to make sure that it is
tuned and and integrated fully with the
court system it works fully in that
environment and as such it is gone to
some effort to make sure that it handles
all the various profile types and all
the different image color spaces
correctly what this means is that if
you're developing your own third-party
CMM and you want it to work in this
color sync environment you need to make
sure to thoroughly test your CMM under a
wide variety of cases because if the
user chooses your CMM CMM as a default
CMM it will be used throughout the
quartz imaging model it's a very
powerful feature so we've had a lot of
talk so far I want to just do a little
bit of a demo here just to kind of give
you a guided tour of where things and
how things live on Mac OS 10 so
first of all I'm just started out in the
root level of the hard drive I'm going
to go on my Mac os10 volume I can go
into the library color sync directory
and inside here we have the majority of
the profiles that we install and all of
these end and ICC there's also a
displays profiles folder which is where
profiles that are for actual displays
are installed as well we also have a
bunch of example scripts for the color
sync scripting environment not be
showing that much today there but
there's a lot of power in there you
might want to investigate those scripts
if you're an apple scripter also if you
actually want to know where color sync
resides which is can be a little tricky
you go into system library frameworks
let's see where are we here frameworks
color sync is a sub framework of the
application services framework so you go
into application services frameworks and
then there lies color sync and this is
where you can find the headers and for
your browsing also if we go back up a
directory we can also see in this system
library path there's a color sync
directory where the required set of
profile the minimum required set of
profiles that Apple needs are installed
we also have plug-ins for our scripting
architecture or Apple scripting
architecture here from various file
types also there's a few applications
that color sync is installed one is if
you go into application see where's
utilities is always at the bottom there
is the where's it display calibrator
this is where our calibrator resides
currently it's an application I can just
launch this real quickly it's very
similar to the old color display
calibrator although with a slightly more
updated look to it and we can go through
and do our typical display calibration
and set skip that today and quit yes
there's also the color sync utility
application which in the version that
ships with Mac OS 10 today has within it
the functionality of
profile first-aid I actually kind of
like to show you a new version of color
sync utility that we're working on which
has this plus some more let me launch it
real quickly so as you can see it has as
one of its functionality is profile
first aid and so this is familiar if
you've used profile first aid in the
past you can hit verify and it'll go
through and search all the profiles on
your disk also however it has some new
modules one of which is the profiles
module and this is sort of a beginning
of a work in progress but what this
module does is its client of the CM
profile iteration API so it uses the API
to locate all the profiles on the disk
and then present them to the user in a
variety of fashions here we have them
all grouped by location so you can see
system library color sync profiles slash
library color sync profiles we can see
all the profiles we can see basic
information about the profiles that even
a novice can understand the full path
the color space when it was created we
can also however as a convenience group
these by different things if you just
want to say for example see where all
the CMYK profiles are you can just check
out the CMYK profiles and look at them
there so I'm going to show more of this
later but now I think I'll go back to
the slides and actually this provides a
good opportunity for me to pass the
microphone over to Eric Broadbent he'll
be talking about coloring preferences
and supporting api's thanks alright well
I wanted to start out today with a
little bit of an overview why are we
even talking about colors and
preferences and supporting api's well
here's a view of an application in
classic Mac OS and how it interacts with
different parts of the system and the
user applications generally speaking did
not have any knowledge of devices on the
system so applications would often the
applications that are doing color
management would often want to have an
idea of
so they would present a user interface
so that the user can tell them what
kinds of devices they would have on
their system and the application would
get some information about that in order
to do color management to those devices
or from them
similarly applications if they really
want to do color management also
sometimes need to understand where data
is coming from in documents
if there are no profiles so again
applications would as part of that you
use their interface often have parts of
it which would allow the user to select
default profile for a color space or
something like that and this was
actually very good we we were encouraged
by the fact that applications were
starting to to do this over the last few
years because it meant that they were
taking color management seriously and
they were putting an effort into their
applications to make sure that they did
things right it was a little bit of a
problem though over time where as more
and more applications did this there
were slight differences between the user
interfaces and users were becoming
something a lot of the power users were
not confused but some of the users were
confused about you know how come I have
to do this in this application and this
in this application and the terminology
is slightly different so the end story
at that point was that the application
would simply call color sync to do its
color management we we wanted to provide
a better story for both application
developers and users so on Mac OS 10 we
think we have a more intelligent way of
doing this first of all color sync is
aware of devices on Mac OS 10 which
we'll see
and secondly we've redesigned our user
interface to take advantage of some of
this knowledge so some of the devices
will are actually reflected in our user
interface the user interface covers a
lot of the points that applications used
to try to data points that the
applications used to try to collect from
the user and so applications can use the
API is behind these which we'll talk
about to get the Preferences for where
you know for profiles incoming default
profiles for color spaces and and in
some cases actual
four devices instead of guessing about
them and then the application you go
ahead and do what it's good at or what
it was designed to do which is you know
in this case image manipulation or
something like that and then call color
sync the same way as before to do the
color management so so as I said our
preference panel was redesigned it was
introducing coloring 3.0 which shipped a
Mac OS 9 first and it was designed to
provide a single point for users to go
to to control color in terms of profiles
on their system also it allowed us to
formalize some of the concepts and
terminology that are important for users
to understand so they really understand
what color management is about colored
devices and color spaces and we we built
it on a model that allows for us to
easily add to it in the future in terms
of providing more support for new color
spaces and new devices so here's a look
at what the the new panel looks like on
Mac OS 10
there are several panes of it but we're
just going to talk about the profiles
pane it has the first view of this is
default profiles for documents documents
can contain lots of different types of
data so an application can utilize the
fact that this is where users can set up
profiles for different color spaces that
will be contained in documents now if
the data has a profile associated with
it then that takes precedence but often
documents don't have profiles in them
and this is where the user gets to set
up their preferences for what happens
when there is no profile associated with
the color data the application can get
access to this to this preference by
using the cm get default profile by
space API they pass in one of the color
space types that are defined in our
headers and they get back a profile
reference and this would be appropriate
obviously as a source profile it's a
default profile for the colors coming in
the second view in the profiles pane
is the profiles for standard devices and
here applications obviously many of them
that are doing color management want to
know where the data is going to sit and
need a profile for that or where it came
from if they know that it came from a
device and colorsync actually will
reflect devices that are installed on
the user system into this so that users
can see that and applications can get
access to these preferences by calling
the ECM get default profile by use API
passing in one of the standard use types
and again getting back a profile
reference often this would be a
destination profile but it can still be
an input profile so wanted to give an
example of how an application might
benefit from these API is in a simple
color management example they have a
sample code which would not compile
obviously but my match image routine
which takes some kind of an image
reference which the application can
extract information or data from and as
I said before the first thing an
application should do when managing
color width from a document is to find
out if there's a profile embedded or in
this case an image of most of the modern
image formats contain containers for
profiles so there are known ways to get
to find out if there's a profile in an
image and get it out of there
if there is one great if there's not
well then we can go ahead and use the
API see him get default profile by space
but of course first we need to find out
what color space the image is in and
once we complete that we can go ahead
and get a reasonable default source
profile for that image once at that
point we have a source profile we want
to go ahead and get a destination
profile so let's say we're matching to
the display we can call cm get default
profile by use display cm displays and
get a destination profile and now we
have source and destination we can do
our color management get the bitmap from
the image and go ahead and match it now
there's a little bit of a caveat here
this this code sample would be
appropriate for a
classic or carbon application running on
Mac OS 9 on Mac OS 10 as you saw in
Luke's presentation much of the
destination color management has done
for you so you don't really need to do
this kind of matching if your
application utilizes courts but at least
what you should do is be aware of where
the data is coming from and if there's
no profile associated with it you can
tag it using our api's so in summary in
terms of coding preferences go all data
is now color managed on courts and your
application can really be a full player
in the color management story by by
simply making sure that data is
associated with a correct source profile
and and if need be a destination profile
most applications can simply use these
api's for color management and and have
the knowledge that they're getting the
users preferences a lot of applications
will still need to put up their own user
interfaces we don't mean to say that our
the color seek preference panel is the
be-all end-all of where of what color
management is about on the system but
we're hoping that a lot of applications
will simply be able to use our
preference panel and the API is behind
it again they're extensible they allow
us to add support for future devices and
color spaces and again they're flexible
and that applications could manage color
from both document center core device
centric perspective
speaking of devices one another new
feature in color sync on Mac OS 10 is
device support and on Mac OS 10 I have
new kernel new i/o and new device
managers for for input display and
printing and this gave us an opportunity
to integrate color sync with those
device managers to allow colorsync to be
aware of actual devices and their
profiles and this is very powerful it
was implemented with the following
services in general device registration
profile registration
the notion of defaults for devices and
profiles and notification services which
we'll talk about later a little bit more
detail on device and profile
registration again we rely on the device
managers we built support into them for
this they are the points on the system
that understand when devices are
attached to removed they also are the
points on the system that can discover
profiles for printing there's a known
way to do that
display same thing the display manager
knows how to discover or build device
profiles for the display and then they
go ahead and use some colors and KPIs to
to tell colors think about the device
and its profiles and so there's register
on register and there's CM set device
factory profiles so their colors ink
makes a distinction between factory
profiles and custom profiles and we'll
talk about that a little bit later in
terms of defaults oh we saw that the
api's in the profiles for standard
devices and the api reflectors give
access to defaults
not just any device profile and the way
this works is that when profiles are
registered and one of them is identified
as the default for that device over time
a user may change their settings for
example maybe initially when installing
a printer driver plain paper is a
default setting and then they go ahead
and change it to glossy or something
like that the device manager is aware of
that and tells us that the default
profile has changed so again the device
managers are the place where where where
these changes are noticed and and they
go ahead and notify color sink using CM
set default device if a default device
changes or cm set default device default
profile ID if a default profile changes
so one of the things that this allows
for which we haven't had on Mac OS
before is support for calibration
this is is done because of the data that
we have with a profile along with the
profile we get an ID which is as to be
unique per device a mode name which
really means you know under what
conditions is this profile used like
plain paper glossy transparency and so
on it's not the name of the profile it's
the name of the condition under which
the profile is used and actually
something that's not listed here but a
URL for where the profile is on the
system and profiles are actually
referenced most of the time by ID so we
don't bind with the URL until late in
the game and we actually need to do the
color management what this means is that
those profiles can be customized by an
application that knows how to do it so
an application application might go
ahead and get the factory profiles ask
the user by putting up a list of modes
which which mode they want to calibrate
for do their calibration and then
overlay by ID with a new URL a new
profile that's on a different place in
the system and and the printer the print
system or the user doesn't have to go
and set anything else the calibration
application has done this that new
profile will be used when it comes time
to do the color management so there's
some api's that support this yet device
factory profiles and then set we could
have called it set device custom
profiles but we just call it set device
profiles and set device profile if the
calibration application just wants to do
one profile up until this point the API
is in the device support have pretty
much been things that just the system
would call but at this point if a
calibration application wants to get
involved it would it would use these
api's finally as part of our device
support if applications want to they can
become aware of the changes in in
devices on their system that the device
managers tell us about color sync will
post notifications to a distributed
Center and by this we just mean that all
any process on the system can get I know
vacation if it registers with a
distribute a distributed Center some of
the things you can get notified for are
changes to a default device for a device
class if the user plugs in a new printer
and such as their default printer or
something like that there's a
notification for that changes to factory
or custom profiles changes to a default
profile and registration and on
registration so there are no colors to
KPIs for this but because we don't
actually support notification per se we
post notifications through the services
available and an application teams a
register with them through either
corefoundation or cocoa so go ahead and
look at those api's and if you're
interested in that you will need to look
in the coloring headers for the
notification strings that you register
for so in summary we've we've integrated
on Mac OS 10 with device managers this
gives us some new some new features and
some new integration applications have
access to default profiles simply
through our preferences api's
applications can actually get more
specific profile information if they
want using some new api's calibration
has supported me because of the way we
register and deal with profiles on the
system and finally applications can get
notified of these changes speaking of
which I believe we have a demo payment
of an application which will take
advantage of this thanks Eric
so as I left you wondering about before
we have this device's button in the
color sync utility module and what this
module is is it's a client of the device
integration API and that what it'll do
is it'll show you a list of all the
devices that have registered profiles on
this system and what I have here is the
dis we have different classes of devices
general classes scanners cameras
displays printers approvers and there's
one display registered also for purposes
of demoing I've registered two cameras
as well if we look at the we have two
cameras for each of these cameras
there's two different modes associated
with it if I click on the indoor mode it
will show what the factory profile for
that is which in this case just defaults
to srgb and there's also an additional
profile if it's been overridden by the
user or by a calibrator and there's a
second profile for that as well so we're
gonna have different device classes
different devices and different modes
within a given given device so this
application is kind of nice because it
allows you in one spot to be able to
browse the list of color sync savvy
devices on the system we can also change
what the the the profile is here if we
don't have a specific calibrator we
could create our own calibrated profile
and just associate that profile with
this device if we wish and it'll be used
automatically also we have the display
here which also has a profile associated
with it this is the profile that was
generated automatically at this when the
system is booted based on information
returned from the eated but if i
actually go into the system control
panel and go to system preferences go to
displays and go to the color tab this
also shows me the same profile so we
have two different two different clients
of the same database if you want to
think of it now one other thing about
this application is its it's registered
that it wants to receive notifications
of any changes so if I go to this tab
here and change the profile to multi
scan 17 for some reason you'll see that
in the background this app has already
received that notification and it's
already been updated if I flip it back
also if I were to go and calibrate and
go through the process of calibrating
the display
again this is the profile for this
display would be changed and it would be
reflected in this database so this is
really powerful it allows applications
in a standardized way to calibrate a
wide variety of devices and for the
users to get the best possible color out
of their out of their individual devices
another way of kind of demonstrating
this is we have a printer we've hooked
up here that registers for profiles if I
just go in here and plug it in USB
excuse me
bring this app to front and then go to
Print Center
a little bit of a beach ball it's
automatically recognized the printer and
as you can see let's say you didn't
register oops let me delete it quit it
and wash it again
no it was decided to be honoree this was
working earlier I swear okay well that's
a good demo without something not
working as expected but anyhow as you
can see we're receiving notifications
for the different devices and and it'll
be registered automatically the real
advantage of this is by by having a
device that registers for profiles
registers its profiles it allows a savvy
user of your device to be able to query
to see that devices profiles and also to
be able to calibrate that to be able to
get the best possible results out of
that device so I think that's it for now
we have the minor mystery of why it
didn't work but no look at the back
I needed to relaunch there sorry about
that so here we see that the stylus
color 880 coming up and registering no
less than I believe eight different
profiles all slightly different for
different print modes I think they could
be named slightly differently but
they're it's really great that they're
registering all these modes we can also
change which one is the default mode for
this printer if we had multiple printers
we could check which one is the default
printer so I think that's it for now so
as always where to go for more
information if you're more interested in
getting more detailed information you
can go get information on color sync
from WWF Elcom colour sink or the sdk
site as well also I always make a pitch
for the color sync dev and color sync
users list there's a lot of great
information there as well and feedback
can be sent to color sync at apple.com
and I'll pass it over to Travis a few
more words I want to just quickly go
through the roadmap of the remaining
graphic sessions here at WWDC we have
113 which is text on Mac OS 10 which is
very important if you're interested in
doing advanced text drawing on 10 and
also text drawing in conjunction with
quartz we have another interesting
session which is OpenGL high-performance
2d
if you're looking to do some 2d graphics
and make them go very very fast there's
some interesting applications of OpenGL
to to do that we also have a printing
session which is on Thursday which will
cover Mac OS Tunes printing tips for
carbon cocoa and also some BSD then we
also have on Friday a very important
talk if you're a carbon developer where
we have the graphics and imaging tips
and tricks where we'll go over quite
extensively issues such as quick-draw
and quartz integration in addition to
talking about the optimization of
graphics in general by working in
conjunction with quartz compositor this
is a contact information I can be
reached you have any questions about
color sync you can reach me at Travis B
at Apple comm we also have a product
manager for color sync technology who's
John Zimmer
if you have any suggestions on how color
sync can be improved feel free to email
John he's available at John Z at Apple
com
you