Re: RGB colorspace question
Bob Friesenhahn <[email protected]> Fri, 5 Jan 2024 18:14:32 -0600
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <CA+rFc3177Wzx4qdkbitx50cqVuFz6HNh-DoxUHw0NF8PkQ6bpw@mail.gmail.com> |
--===============7895165009976342549== Content-Type: multipart/alternative; boundary="000000000000ffda85060e3bd9b8" --000000000000ffda85060e3bd9b8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The most likely cause of the difference is if the PNG has an embedded ICC CMS profile, or is marked to be in an unusual colorspace. Perhaps ImageMagick is applying a colorspace transformation. Try doing convert infile -strip -colorspace rgb foo.txt So in this case, the input file does matter, and the versions of the software do matter since different versions of ImageMagick work differently= . Bob On Fri, Jan 5, 2024 at 4:13=E2=80=AFPM Michael Orlitzky <[email protected]= om> wrote: > While working on > > https://github.com/gap-packages/hap/issues/115 > > I noticed that, > > convert foo.png -colorspace RGB foo.txt > > produces different results with ImageMagick vs. GraphicsMagick. For > example, > > $ head -n2 foo-im-rgb.txt > # ImageMagick pixel enumeration: 640,480,0,255,rgb > 0,0: (220,110,7) #DC6F07 rgb(86.3157%,43.415%,2.84276%) > > $ head -n2 foo-gm-rgb.txt > 0,0: (239,176, 47) #EFB02F > 1,0: (239,176, 47) #EFB02F > > (If you want the source image, I'm happy to provide it, but I don't > think this is at all tricky to reproduce.) > > I won't embarrass myself by speculating. Does anyone know what's going > on with the different colors? > > > > _______________________________________________ > Graphicsmagick-help mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help > --000000000000ffda85060e3bd9b8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>The most likely cause of the difference is if the PNG= has an embedded ICC CMS profile, or is marked to be in an unusual colorspa= ce.=C2=A0 Perhaps ImageMagick is applying a colorspace transformation.<br><= /div><div><br></div><div>Try doing</div><div><br></div><div>convert infile = -strip -colorspace rgb foo.txt</div><div><br></div><div>So in this case, th= e input file does matter, and the versions of the software do matter since = different versions of ImageMagick work differently.<br></div><div><br></div= ><div>Bob<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" cl= ass=3D"gmail_attr">On Fri, Jan 5, 2024 at 4:13=E2=80=AFPM Michael Orlitzky = <<a href=3D"mailto:[email protected]">[email protected]</a>> wr= ote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px= 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">While worki= ng on<br> <br> =C2=A0 <a href=3D"https://github.com/gap-packages/hap/issues/115" rel=3D"no= referrer" target=3D"_blank">https://github.com/gap-packages/hap/issues/115<= /a><br> <br> I noticed that,<br> <br> =C2=A0 convert foo.png -colorspace RGB foo.txt<br> <br> produces different results with ImageMagick vs. GraphicsMagick. For<br> example,<br> <br> =C2=A0 $ head -n2 foo-im-rgb.txt<br> =C2=A0 # ImageMagick pixel enumeration: 640,480,0,255,rgb<br> =C2=A0 0,0: (220,110,7)=C2=A0 #DC6F07=C2=A0 rgb(86.3157%,43.415%,2.84276%)<= br> <br> =C2=A0 $ head -n2 foo-gm-rgb.txt<br> =C2=A0 0,0: (239,176, 47) #EFB02F<br> =C2=A0 1,0: (239,176, 47) #EFB02F<br> <br> (If you want the source image, I'm happy to provide it, but I don't= <br> think this is at all tricky to reproduce.)<br> <br> I won't embarrass myself by speculating. Does anyone know what's go= ing<br> on with the different colors?<br> <br> <br> <br> _______________________________________________<br> Graphicsmagick-help mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help= " rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/= listinfo/graphicsmagick-help</a><br> </blockquote></div> --000000000000ffda85060e3bd9b8-- --===============7895165009976342549== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============7895165009976342549== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Graphicsmagick-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help --===============7895165009976342549==--