how to convert an image to sRGB color profile ?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
loki5100
Posts: 35
Joined: 2018-02-24T14:51:41-07:00
Authentication code: 1152

how to convert an image to sRGB color profile ?

Post by loki5100 » 2019-05-04T07:45:22-07:00

Hello,

I have an .heic image (with come from an iOS device). How to convert it to sRGB ?
Before I was doing like this :

To convert to sRGB:
MagickProfileImage(Wand, 'icc', <sRGB2014.icc>);
then I immediately delete the sRGB profile to win space
MagickProfileImage(Wand, 'icc', nil);

but it's seam to not work :(
After doing this the colors are completely wrong ...

thanks by advance
stéphane

snibgo
Posts: 11798
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to convert an image to sRGB color profile ?

Post by snibgo » 2019-05-04T09:01:01-07:00

What colorspace was the input image? Did it have an ICC profile? If it didn't, you need to assign one before converting to another profile.

There are many versions of sRGB, so deleting the profile is a bad idea.
snibgo's IM pages: im.snibgo.com

Post Reply