Page 1 of 1

Color profile missing after convert with -profil param

Posted: 2018-07-31T04:58:09-07:00
by raedermmpro
Hi there,

I convert an original image from CMYK to RGB and also apply the respective profile.

Code: Select all

convert in.jpg -profile sRGB_v4_ICC_preference_displayclass.icc -colorspace rgb -density 150 out.jpg
When I check the embedded profile after conversion with identify --verbose out.jpg the profile is not visible

Code: Select all

...
  exif:thumbnail:YResolution: 72/1
    exif:WhiteBalance: 1
    exif:XResolution: 150/1
    exif:YResolution: 150/1
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 5091b2d3d3943f3009d896a3e53b2a8a658ae55d4b2d385cf1b2b017cfdc359b
    unknown: 8904742
  Profiles:
    Profile-8bim: 9474 bytes
    Profile-exif: 6894 bytes
    Profile-iptc: 1187 bytes
      unknown[2,0]:
      Caption[2,120]: Shot of a young businessman experiencing stress during a late night at work
      Headline[2,105]: Burnout - bad for business, bad for your health
      Special Instructions[2,40]: Model and Property Released (MR&PR)
      Byline[2,80]: Peopleimages
      Byline Title[2,85]: Contributor
      Credit[2,110]: Getty Images
      Src[2,115]: E+
      Image Name[2,5]: 625738340
      Created Date[2,55]: 20161125
      Created Time[2,60]: 000000+0000
      Keyword[2,25]: Real People
      Keyword[2,25]: Computer
      Keyword[2,25]: Using Phone
      Keyword[2,25]: Landline Phone
      Keyword[2,25]: Using Computer
      Keyword[2,25]: Creative Occupation
      Keyword[2,25]: New Business
      Keyword[2,25]: Businessman
      Keyword[2,25]: One Man Only
      Keyword[2,25]: Only Men
      Keyword[2,25]: One Young Man Only
      Keyword[2,25]: Young Men
      Keyword[2,25]: Men
      Keyword[2,25]: Males
      Keyword[2,25]: Busy
      Keyword[2,25]: Talk
      Keyword[2,25]: Multi-Tasking
      Keyword[2,25]: Burning the Candle at Both Ends
      Keyword[2,25]: Lens Flare
      Keyword[2,25]: E-Mail
      Keyword[2,25]: Headache
      Keyword[2,25]: Working Late
      Keyword[2,25]: Pain
      Keyword[2,25]: Young Adult
      Keyword[2,25]: Talking
      Keyword[2,25]: Sitting
      Keyword[2,25]: Looking
      Keyword[2,25]: Holding
      Keyword[2,25]: Working
      Keyword[2,25]: Physical Pressure
      Keyword[2,25]: Expertise
      Keyword[2,25]: Frustration
      Keyword[2,25]: Exhaustion
      Keyword[2,25]: Time
      Keyword[2,25]: Discussion
      Keyword[2,25]: Creativity
      Keyword[2,25]: Emotional Stress
      Keyword[2,25]: Business
      Keyword[2,25]: Technology
      Keyword[2,25]: Human Neck
      Keyword[2,25]: Brown Hair
      Keyword[2,25]: Black Hair
      Keyword[2,25]: Tired
      Keyword[2,25]: Business Person
      Keyword[2,25]: Office Worker
      Keyword[2,25]: Professional Occupation
      Keyword[2,25]: Occupation
      Keyword[2,25]: People
      Keyword[2,25]: Night
      Keyword[2,25]: Office
      Keyword[2,25]: Place of Work
      Keyword[2,25]: Internet
      Keyword[2,25]: Telephone
      Keyword[2,25]: Casual Clothing
      Keyword[2,25]: Desk
      Keyword[2,25]: Table
      Keyword[2,25]: Breakdown
      Keyword[2,25]: Smart Casual
      Keyword[2,25]: Overworked
      Copyright String[2,116]: PeopleImages
    Profile-xmp: 14355 bytes
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 27.2492MiB
  Number pixels: 36.1523M
  Pixels per second: 29.3921MB
  User time: 1.230u
  Elapsed time: 0:02.230
  Version: ImageMagick 7.0.8-2 Q16 x86_64 2018-07-31 https://www.imagemagick.org
  ...
Does anyone of you have an idea why this happens?

Thanks in advance!

Re: Color profile missing after convert with -profil param

Posted: 2018-07-31T06:07:18-07:00
by snibgo
raedermmpro wrote:-colorspace rgb
Why are you doing this? If you really do want to convert to linear colorspace, I suggest you do it with a profile.

As a general rule, don't mix "-profile" and "-colorspace". Use one method or the other, but not both.

Re: Color profile missing after convert with -profil param

Posted: 2018-07-31T23:07:11-07:00
by raedermmpro
Thanks for you comment. I tried out just applying the profile and it seems to work. Now the new profile is embedded in the image. I wasn't aware that mixing "-profile" and "-colorspace" leads to problems. Thanks for the clarification.