Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
icm color profile embedding in a PSD image
#1
Hello,

I'm trying to embed a icm profile sRGB IEC61966-2.1 into a layered PSD made of PNG images problematically using using python pdb call's in gimpfu v2.6.9.
it seems to always default to sRGB and does not embed the IEC version any idea how to do this
using exiftool and imagemagic convert on a psd results in gimp not being able to read it.

profile="/path/.../sRGB_Color_Space_Profile.icm"
image = pdb.gimp_image_new(width, height, RGB)
...
pdb.gimp_layer_set_name(layer, name)
pdb.gimp_image_add_layer(image, layer, 0)

...
pdb.plug_in_icc_profile_apply(image, profile, 0, False)
pdb.plug_in_icc_profile_set( image, profile)
pdb.file_psd_save(image, layer, output, output, 0, 0)

Cheers
Richard
Reply
#2
Moved this because it is a scripting issue but as a note a something.icm is a monitor profile rather than a somthing.icc which is a colour profile.
Reply
#3
It might/might not be possible using a gimp script/plugin. Probably not, Gimp 2.8.x has poor exif support. I leave that to the clever guys.

psd is a horrible format, that is poorly supported in Gimp. Not recommended unless absolutely necessary Wink

One way: Gimp then ImageMagick (IM)

1. Export a psd image using Gimp, I would use IM here but that scrambles the layers. https://i.imgur.com/niMmnAJ.jpg

2. Looks like this for comparison later on. https://i.imgur.com/I4Xv2MP.jpg note the icc profile files.

3. Take the image from Gimp and using IM to write the new colour profile (Normally I use this to convert RGB to CMYK). You do need the .icc profiles handy or be prepared to include the entire path. https://i.imgur.com/TuZKYhU.jpg
The general command
Code:
convert image.psd -alpha off -profile srgb.icc -profile new.icc -alpha on new.psd

4. Well the new.psd still looks like the old one, except for the increased file size. https://i.imgur.com/btAiCLh.jpg

5. Verify the profile using IM identify verbose. Looks ok here. https://i.imgur.com/p3JJZRx.jpg

edit: hmm..Just opened the new.psd in Gimp 2.9.7 which has better exif support, the new profile is definitely there but the 'text' layer is scrambled. Probably an IM thing, all you can do is try and hope.
Reply
#4
(10-13-2017, 03:30 PM)rich2005 Wrote: Moved this because it is a scripting issue but as a note a something.icm is a monitor profile rather than a somthing.icc which is a colour profile.

Thanks for the update it is a big help.

Is there somewhere I can download 2.9.7 tar zip for Linux that will build in a non-administrator.

The site official download goes to 2.9.6 https://download.gimp.org/mirror/pub/gimp/v2.9/

Cheers
Reply
#5
For the latest versions, use Git to retrieve these packages:

Code:
git://git.gnome.org/babl
git://git.gnome.org/gegl
git://git.gnome.org/gimp

You can also use the equivalent HTTP urls:

Code:
https://git.gnome.org/browse/{package}


One you have cloned the Git repo, you can use git checkout

You don't need admin privs to build them, or even to "install" them as long as it is in your own use directories. However you may have preprequisites ("*-dev" packages, typically C header files) that will require installation privileges (which usually means root) unless you "install" them from source in your user directories.

A good write-up (for a "fixed" version, but still valid for a plain version):

   http://ninedegreesbelow.com/photography/...tists.html
Reply


Forum Jump: