Difference between revisions of "Colour Management Tests"

From CDOT Wiki
Jump to: navigation, search
(Project Details)
(Project Leader(s))
 
(33 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
== Project Description ==
 
== Project Description ==
  
Write reftests to compare images in order to deal with floating point tolerance. This includes dealing with things like Monitor Profiles, profiles in JPEG (i.e., JPEGs get changed based on colour profile info). See discussion of colour profiles in Firefox 3 here. It would be useful to be able to compare to PNGs with a reftest, perhaps creating an image diff tool, where pixels outside a floating point tolerance (> 0.n) would somehow be highlighted so you can see what is different. Done.
+
Write reftests to compare images. This includes dealing with things like Monitor Profiles, profiles in JPEG (i.e., JPEGs get changed based on colour profile info). See discussion of colour profiles in Firefox 3 here. It would be useful to be able to compare to PNGs with a reftest, perhaps creating an image diff tool, where pixels outside a floating point tolerance (> 0.n) would somehow be highlighted so you can see what is different. Done.
  
 
This will require some graphics and image knowledge (i.e., Photoshop, what colour is on a computer, etc).
 
This will require some graphics and image knowledge (i.e., Photoshop, what colour is on a computer, etc).
Line 10: Line 10:
  
 
[[user:Evmarbella|Ezadkiel Villarico Marbella]]
 
[[user:Evmarbella|Ezadkiel Villarico Marbella]]
[http://zadkielm.blogspot.com/search/label/reftest Project Blog]
+
 
 +
[http://zadkielm.blogspot.com/search/label/reftest Project Blog] Up-To-Date Information
 +
 
 +
[http://zadkielm.blogspot.com/2008/10/pixel-reftesting-with-profiles.html Colour Profile Reftest 0.1] Gained basic knowledge of reftesting with colour profiles
 +
 
 +
[http://zadkielm.blogspot.com/2008/11/colour-profile-reftest-02and-then-there.html Colour Profile Reftest 0.2] Created tests and filed bugs
 +
 
 +
[http://zadkielm.blogspot.com/2008/12/reftest-03-manifesting-bug-459617.html Colour Profile Reftest 0.3] Research on tracking down bug and test manifests
  
 
== Project Contributor(s) ==
 
== Project Contributor(s) ==
Line 17: Line 24:
  
 
NOTE: only Project Leader(s) should add names here.  You '''can’t''' add your own name to the Contributor list.
 
NOTE: only Project Leader(s) should add names here.  You '''can’t''' add your own name to the Contributor list.
 +
 +
If anything is unclear feel free to edit the instructions or msg me on IRC or email me.
 +
 +
Instruction <br />
 +
notes from: <br />
 +
http://zadkielm.blogspot.com/2008/09/firefox-and-reference-testing-reftest.html <br />
 +
http://zadkielm.blogspot.com/search/label/reftest <br />
 +
 +
1 <br />
 +
Have a build of firefox on the linux with <br />
 +
ac_add_options --enable-tests <br />
 +
on the mozconfig <br />
 +
 +
2 <br />
 +
download the reftest <br />
 +
[http://zenit.senecac.on.ca/wiki/imgs/Pngsuite-colorprofiles-failedtest-contrib.zip contrib-failedtest] <br />
 +
 +
unzip it in your home folder.<br />
 +
open terminal<br />
 +
and <br />
 +
cd ~/pngsuite-colorprofiles-failedtest<br />
 +
 +
run the reftest <br />
 +
~/pngsuite-colorprofiles$ ~/src/obj*/dist/bin/firefox --no-remote -reftest -P testfirefox1(replace with test Profile) ./failedPixelTestAdobe1998.list | grep REFTEST > failedPixeltestAdobe1998output(insert Linux OS).txt
 +
 +
3<br />
 +
open the failedPixelAdobe1998output*.txt<br />
 +
 +
Outcome:<br />
 +
It should failed and it should have <br />
 +
the URI data of the tested pixels/images.<br />
 +
see <br />
 +
'fail line output' <br />
 +
http://zadkielm.blogspot.com/2008/09/reftesting-testing-continues.html <br />
 +
Upload the text file on the zenit wiki <br />
 +
(failedPixeltestAdobe1998output(insert Linux OS).txt ) <br />
 +
Please include your Processor/OS information. <br />
 +
ex. <br />
 +
Processor Speed and Brand..., <br />
 +
Version of Linux. <br />
 +
and add your name on the contributions. <br />
 +
 +
'''Please post your test results here:'''
 +
 +
{| border="1"
 +
|-
 +
! Date
 +
! IRC Nick
 +
! Platform
 +
! Firefox Version
 +
! Processor
 +
! Result
 +
|-
 +
| 19-Oct-2008
 +
| ezadkiel
 +
| Ubuntu Release 8.04(hardy) Kernel Linux 2.6.24-19-generic GNOME 2.22.3
 +
| Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081019 Minefield/3.1b2pre
 +
| Intel Core 2 CPU T7400 @ 2.16 GHz
 +
| it passed [http://zenit.senecac.on.ca/wiki/imgs/FailedPixeltestAdobe1998outputUbuntu.txt.zip test-result]
 +
|-
 +
|}
  
 
== Project Details ==
 
== Project Details ==
  
 
[http://mxr.mozilla.org/mozilla/source/layout/tools/reftest/README.txt REFTEST READ ME]
 
[http://mxr.mozilla.org/mozilla/source/layout/tools/reftest/README.txt REFTEST READ ME]
 +
 +
0.1 Release
 +
Isolated Failed test.
 +
[http://zenit.senecac.on.ca/wiki/imgs/Pngsuite-colorprofiles-failedtest.zip failedtests0.1]
  
 
'''TechNote001:'''
 
'''TechNote001:'''
Line 28: Line 100:
  
 
'''Technote002:'''
 
'''Technote002:'''
You must enable colour management you must
+
about:config and set
go to your about:config and search for
+
gfx.color_management.mode to <br />
gfx.color_management.mode and switch it to 1
+
‘0′ for no color management,<br />
 +
‘1′ for full color management, and <br />
 +
‘2′ (the default) for tagged(with ICC)-only correction<br />
  
 
'''Technote003:'''
 
'''Technote003:'''
 
What are ways to embed colour profiles into images?
 
What are ways to embed colour profiles into images?
Photoshop does it.
+
Photoshop does it. Preview in Mac OSX does it which means
 
+
you can use Automator to apply profiles on multiple images
'''Technote004:'''
 
Create Images with sRGB colour profile embedded.
 
  
 
'''Technote005:'''
 
'''Technote005:'''
Tricky bit on rendering to get the firefox
 
rendering back as an image.
 
  
'''Technote006:'''
+
reftest can compare images now output is sRGB if the reftest fails
A way to do this Draw the image into a canvas
 
http://developer.mozilla.org/En/Canvas_tutorial:Using_images
 
Then call toDataURL or getPixelData to get the pixels out.
 
It doesn't reverse-colour-correct the data read from canvas
 
methods which is incorrect, but useful. Reftests already
 
give a data URL when the test fails.
 
  
''toDataURL:''
+
'''Technote007:''' Use URI scheme for reftest [http://en.wikipedia.org/wiki/Data:_URI_scheme DATA URI Scheme Wiki]
  
http://cow.neondragon.net/index.php/681-Canvas-Todataurl
+
'''Techtool002:'''<br /> [http://software.hixie.ch/utilities/cgi/data/data URI kitchen] [http://www.scalora.org/projects/uriencoder/ URI Encoder]
http://developer.mozilla.org/En/Code_snippets/Canvas
 
  
''getPixelData:''
+
simple to complex > back to simple
  
no information
 
  
  
'''Technote007:''' Use URI scheme for reftest [http://en.wikipedia.org/wiki/Data:_URI_scheme DATA URI Scheme Wiki]
+
bug 459617 details
 
+
https://bugzilla.mozilla.org/show_bug.cgi?id=459617
 
 
'''Techtool001:''' layout/tools/reftest/reftest-to-html.pl
 
 
 
'''Techtool002:'''<br /> [http://software.hixie.ch/utilities/cgi/data/data URI kitchen] [http://www.scalora.org/projects/uriencoder/ URI Encoder]
 
  
simple to complex. 
+
- first figure out the exact pixel that's different
  
'''Testing GOAL001:'''
+
- then add some conditional code in cmsDoTransform that checks for that pixel, prints it on input, and prints the transformed pixel
simple to complex.  <br />
 
For example <br />
 
(a) colors x000000 and xFFFFFF, <br />
 
(b) then do the primary colors, <br />
 
(c) then complimentary colors, <br />
 
(d) then get into things like alpha values <br />
 
(e) and color blending.  <br />
 
  
'''Focus 001'''<br />
+
-and see if you can confirm that the issue is within LCMS, or whether it's actually somewhere else
focus on getting together<br />
 
various profiles and<br />
 
various images,<br />
 
creating tagged and<br />
 
untagged ones <br />
 
that should look the same,<br />
 
  
and then plugging those into the reftest framework. <br />
+
-if it's an LCMS issue if you can get the lcms code to say that it's outputting different pixels on different platforms for the same input pixel and transform
  
 
== Project News ==
 
== Project News ==
Line 107: Line 152:
 
Got a response from an email...one step closer to putting these pieces together.
 
Got a response from an email...one step closer to putting these pieces together.
  
Got some Goals...
+
Got some Goals...and Focus.
 +
 
 +
- Sept 26/08
 +
 
 +
Been testing thing for the past few days...trying to get the tests right.
 +
 
 +
- Sept 28/08
 +
 
 +
I think I got the tests right.
 +
Profiles [[Image:ICCProfiles28Sept08.zip]]
 +
 
 +
- Oct 3/08
 +
 
 +
Reading on colours LAB vs RGB vs CMYK
 +
 
 +
Has a conclusion on [http://zadkielm.blogspot.com/2008/10/reftesting-colour-profiles-in-ubuntu.html the ubuntu]
 +
 
 +
Update the test [http://zenit.senecac.on.ca/wiki/imgs/Reftest-colorprofiles_04Oct08.zip updated tests]
 +
 
 +
- Oct 11/08
 +
 
 +
spent time isolating 2 pixels that were failing on the reftests in Ubuntu
 +
tested to see if the suspected pixels were failing...yes they still fail.
 +
 
 +
[http://zadkielm.blogspot.com/2008/10/pixel-reftesting-with-profiles.html Pixels In Isolation]
 +
 
 +
simplified reftest to show failing pixel and reftest differences in GIMP
 +
 
 +
- Oct 12/08
 +
 
 +
filed a bug
 +
[https://bugzilla.mozilla.org/show_bug.cgi?id=459617 bug#459617]
 +
 
 +
trying to narrow it down.
 +
 
 +
- Oct 19/08
 +
 
 +
how to test in different configurations.
 +
 
 +
- Nov 9/08
 +
 
 +
updating the test...it's too [http://zadkielm.blogspot.com/2008/11/hg-add-to-patches.html big]
 +
 
 +
- Nov 24/08
 +
learning about hg queues
 +
adding and importing folders and files patches.
 +
looking at [https://bugzilla.mozilla.org/show_bug.cgi?id=463221 bug] comments particularly:
 +
Yay, reftests!
 +
 
 +
A few tiny drive-by nits:
 +
 
 +
"pngsuite" is actually an official PNG test suite, so these should go under a
 +
different name. Say, modules/libpr0n/test/reftest/png/color-profile/.
 +
 
 +
A single reftest.list manifest is fine, no need to break it into small chunks.
 +
The readme could just be distilled down into plain test, and rolled into the
 +
manifest as brief comments.

Latest revision as of 16:32, 8 December 2008

Colour Management Tests

Project Description

Write reftests to compare images. This includes dealing with things like Monitor Profiles, profiles in JPEG (i.e., JPEGs get changed based on colour profile info). See discussion of colour profiles in Firefox 3 here. It would be useful to be able to compare to PNGs with a reftest, perhaps creating an image diff tool, where pixels outside a floating point tolerance (> 0.n) would somehow be highlighted so you can see what is different. Done.

This will require some graphics and image knowledge (i.e., Photoshop, what colour is on a computer, etc).

Project Leader(s)

Ezadkiel Villarico Marbella

Project Blog Up-To-Date Information

Colour Profile Reftest 0.1 Gained basic knowledge of reftesting with colour profiles

Colour Profile Reftest 0.2 Created tests and filed bugs

Colour Profile Reftest 0.3 Research on tracking down bug and test manifests

Project Contributor(s)

Name(s) of people casually working on the project, or who have contributed significant help. Include links to personal pages within wiki

NOTE: only Project Leader(s) should add names here. You can’t add your own name to the Contributor list.

If anything is unclear feel free to edit the instructions or msg me on IRC or email me.

Instruction
notes from:
http://zadkielm.blogspot.com/2008/09/firefox-and-reference-testing-reftest.html
http://zadkielm.blogspot.com/search/label/reftest

1
Have a build of firefox on the linux with
ac_add_options --enable-tests
on the mozconfig

2
download the reftest
contrib-failedtest

unzip it in your home folder.
open terminal
and
cd ~/pngsuite-colorprofiles-failedtest

run the reftest
~/pngsuite-colorprofiles$ ~/src/obj*/dist/bin/firefox --no-remote -reftest -P testfirefox1(replace with test Profile) ./failedPixelTestAdobe1998.list | grep REFTEST > failedPixeltestAdobe1998output(insert Linux OS).txt

3
open the failedPixelAdobe1998output*.txt

Outcome:
It should failed and it should have
the URI data of the tested pixels/images.
see
'fail line output'
http://zadkielm.blogspot.com/2008/09/reftesting-testing-continues.html
Upload the text file on the zenit wiki
(failedPixeltestAdobe1998output(insert Linux OS).txt )
Please include your Processor/OS information.
ex.
Processor Speed and Brand...,
Version of Linux.
and add your name on the contributions.

Please post your test results here:

Date IRC Nick Platform Firefox Version Processor Result
19-Oct-2008 ezadkiel Ubuntu Release 8.04(hardy) Kernel Linux 2.6.24-19-generic GNOME 2.22.3 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081019 Minefield/3.1b2pre Intel Core 2 CPU T7400 @ 2.16 GHz it passed test-result

Project Details

REFTEST READ ME

0.1 Release Isolated Failed test. failedtests0.1

TechNote001: Reftest framework contains image rendering reftests in module/libpr0n/test/reftest inside the mozilla source.

Technote002: about:config and set gfx.color_management.mode to
‘0′ for no color management,
‘1′ for full color management, and
‘2′ (the default) for tagged(with ICC)-only correction

Technote003: What are ways to embed colour profiles into images? Photoshop does it. Preview in Mac OSX does it which means you can use Automator to apply profiles on multiple images

Technote005:

reftest can compare images now output is sRGB if the reftest fails

Technote007: Use URI scheme for reftest DATA URI Scheme Wiki

Techtool002:
URI kitchen URI Encoder

simple to complex > back to simple


bug 459617 details https://bugzilla.mozilla.org/show_bug.cgi?id=459617

- first figure out the exact pixel that's different

- then add some conditional code in cmsDoTransform that checks for that pixel, prints it on input, and prints the transformed pixel

-and see if you can confirm that the issue is within LCMS, or whether it's actually somewhere else

-if it's an LCMS issue if you can get the lcms code to say that it's outputting different pixels on different platforms for the same input pixel and transform

Project News

- Sept 19/08

made some builds with --enabled-tests

learning how to make reftests.

reading over notes etc.

- Sept 20/08

made more updates to notes and project page.

- Sept 22/08

Got a response from an email...one step closer to putting these pieces together.

Got some Goals...and Focus.

- Sept 26/08

Been testing thing for the past few days...trying to get the tests right.

- Sept 28/08

I think I got the tests right. Profiles File:ICCProfiles28Sept08.zip

- Oct 3/08

Reading on colours LAB vs RGB vs CMYK

Has a conclusion on the ubuntu

Update the test updated tests

- Oct 11/08

spent time isolating 2 pixels that were failing on the reftests in Ubuntu tested to see if the suspected pixels were failing...yes they still fail.

Pixels In Isolation

simplified reftest to show failing pixel and reftest differences in GIMP

- Oct 12/08

filed a bug bug#459617

trying to narrow it down.

- Oct 19/08

how to test in different configurations.

- Nov 9/08

updating the test...it's too big

- Nov 24/08 learning about hg queues adding and importing folders and files patches. looking at bug comments particularly: Yay, reftests!

A few tiny drive-by nits:

"pngsuite" is actually an official PNG test suite, so these should go under a different name. Say, modules/libpr0n/test/reftest/png/color-profile/.

A single reftest.list manifest is fine, no need to break it into small chunks. The readme could just be distilled down into plain test, and rolled into the manifest as brief comments.