I actually wanted to remove the colorspace of the image. However, which colorspace type should I use in the transformimagecolorspace method COLORSPACE_UNDEFINED or any thing else?
Asked
Active
Viewed 105 times
0
-
This question does not make sense to me. All images have a colorspace: rgb, cmyk, grayscale, etc. Your question is too vague. Why would you need to remove the colorspace? ImageMagick cannot remove the colorspace. It can convert it to some other colorspace, but not remove it. What are you actually trying to achieve in the long run by removing the colorspace. That is what is your ultimate goal – fmw42 Jun 14 '18 at 16:39
-
i want remove colorspace metadata – Sainath Jun 14 '18 at 18:29
-
If you really want to do that, you can try using EXIFTOOLS. See https://www.sno.phy.queensu.ca/~phil/exiftool/. But you have not explained why you need to do that! – fmw42 Jun 14 '18 at 19:44
-
What i want is to compress the image filesize by stripping the colorspace metadata which IMGIX does!! and i wanted to do it using gomagick!! – Sainath Jun 14 '18 at 19:47
-
In ImageMagick, you can try using -strip to remove all meta data. But I do not know if it will remove the colorspace. I think what IMGIX is doing is just removing the colorspace profile. But that does not remove the colorspace per se. The image still will be either rgb or cmyk. The -strip in imagemagick removes all profiles and any other meta data that is not needed with the image. Sorry, I do not know gomagick – fmw42 Jun 14 '18 at 20:15