3

I have a number of ICC color profile files for monitor calibration. They can be imported and work correctly on Ubuntu, but the titles they were created with are not helpful so I'd like to change them.

As far as I can tell there's no way to change the title from the Color Settings application.

I've found that with colormgr I can install a profile and change the title that appears in Color Settings like so:

colormgr import-profile <icc-filename> | grep "Profile ID"
colormgr get-devices | grep "Device ID"
colormgr device-add-profile <monitor-device-id> <profile-id>
colormgr profile-set-property <profile-id> Title "<new-title>"

However, verifying the checksums of the original ICC file and the imported copy in ~/.local/share/icc, I can see that nothing has changed in the imported file so the new title must stored somewhere locally in my system.

I'd like to be able to share these files with other machines so I'd like to change the title stored in the file itself.

Is there any way I can change the title stored in an ICC file using software in Ubuntu?

Ian Mackinnon
  • 1,274
  • 2
  • 21
  • 46
  • It might be worth a try to simply open it with gedit (or another text editor), look for the name and change it. But probably then saving it will break it. Unfortunately I am not very acquainted with color profiles, so I do not have any certain information on how to do it... – dadexix86 Mar 07 '16 at 23:08
  • @dadexix86, unfortunately that only seems to work if the new name is the same length as the old name. If not, the profile can still be imported but it has no effect. So it seems at the very least a byte offset needs to be changed somewhere in the file too. – Ian Mackinnon Mar 07 '16 at 23:43
  • 1
    There are several solutions with GUI for MacOS and Windows (if you aren't daunted by using wine), but GNU/Linux ones are hard to find. I tried SampleICC (it requires compilation), but managed only to extract tags. I haven't found a tool for modifying tags in SampleICC, though this ability is mentioned in its docs. Maybe you will be more lucky. Miscellaneous tools are listed [here](http://www.color.org/profilingtools.xalter), open source tools are mentioned above the table. – whtyger Mar 09 '16 at 11:37
  • @whtyger, interesting, thanks. That site also has the [ICC spec](http://www.color.org/icc_specs2.xalter) available as PDF which could be useful. – Ian Mackinnon Mar 09 '16 at 11:43
  • 1
    Not at all. Just in case, to dump all tags with SampleICC you can use the command `./iccDumpProfile your_color_profile.icm ALL > dump.txt`. – whtyger Mar 09 '16 at 11:56

2 Answers2

4

OK, finally I did it under ubuntu with IccXML:

open a terminal

install prerequisites:

sudo apt-get install build-essential
sudo apt-get install libxml2-dev
sudo apt-get install libtiff5-dev

make a working directory

cd $HOME
mkdir icc
cd icc

get the source codes:

wget http://netcologne.dl.sourceforge.net/project/sampleicc/sampleicc%20tar/SampleIcc-1.6.8/SampleICC-1.6.8.tar.gz
wget http://netcologne.dl.sourceforge.net/project/iccxml/IccXML-Src/IccXML-0.9.8/IccXML-0.9.8.tar.gz

extract and compile SampleICC

tar -xzf SampleICC-1.6.8.tar.gz
cd SampleICC-1.6.8/
./configure --prefix=$HOME/icc/
make -j
make install

extract and compile IccXML

tar -xzf ../IccXML-0.9.8.tar.gz
cd IccXML-0.9.8/
PKG_CONFIG_PATH=$HOME/icc/lib/pkgconfig ./configure --prefix=$HOME/icc
make -j
make install

Get a testfile and do the job:

cd $HOME/icc/bin
wget http://www.tftcentral.co.uk/icc_profiles/dell_2707wfp.icm
./iccToXml dell_2707wfp.icm dell_2707wfp.xml
gedit dell_2707wfp.xml

Now go to the end of the file, change the description data as you want, save the file and close gedit.

./iccFromXml dell_2707wfp.xml dell_2707wfp_new.icm

OK, have a look on the original:

./iccDumpProfile dell_2707wfp.icm ALL | grep -A 1 textDescriptionType

Output: 
Type:   textDescriptionType
"Dell 2707WFP.icm"

and a look of the new one:

./iccDumpProfile dell_2707wfp_new.icm ALL | grep -A 1 textDescriptionType

Output: 
Type:   textDescriptionType
"Dell Test 2707WFP.icm"
cmks
  • 1,874
  • 1
  • 11
  • 17
1

An icc-file consists of tags. The tag of interest may be

tag xxx:
  sig      'desc'
  type     'desc'
  offset   2747620
  size     73
TextDescription:
  ASCII data, length 25 chars:
    0x0000: GRACoL2006_Coated1v2.icc
  No Unicode data
  No ScriptCode data

Ther are a lot of tools for creating and editing icc-files, commercial and open-source.

The ICC Profile Inspector incorporates the ability to modify many of the tag entries in a profile. It only runs on Windows or linux/wine.

Maybe for just editing the desc-tags it may be an acceptable solution to run a tool under linux/wine or under discrete windows.

If you want to run under discrete linux you should use IccXML. Just convert the icc-file to a xml-file, edit the desired tags an convert the xml-file back to an binary icc-file.

cmks
  • 1,874
  • 1
  • 11
  • 17