Re: bug in ReadGIFImage when using local colormaps
莫红波 <[email protected]> Wed, 2 Dec 2015 16:17:09 +0800
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <CACghtk08TUM_Z4N=8jygHU_yzGDU0H5p1_D4K+_pLjuPcbd1LA@mail.gmail.com> |
--===============2755079412476509995== Content-Type: multipart/alternative; boundary=001a11492e4892f7d80525e5e6b8 --001a11492e4892f7d80525e5e6b8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It's STRANGE in sourceforge. Some GIFs set transparent color index equal to size of colormaps which is an invalid value. 1011 if (opacity >=3D (long) image->colors) 1012 image->colors=3Dopacity+1; As code above, Graphicsmagick will set image->colors equal to opacity+1. However, this is a bug when reading colormaps from image blob. 1067 if (ReadBlob(image,3*image->colors,(char *) colormap) !=3D 3*image->colors) ReadBlob will read more colors which are not real color. BTW, I can't upload GIF Image as it's too large. On Wed, Dec 2, 2015 at 4:07 PM, =E8=8E=AB=E7=BA=A2=E6=B3=A2 <hongbo.mo@upai= .com> wrote: > Some GIFs set transparent color index equal to size of colormaps which is > an invalid value. > > 1011 if (opacity >=3D (long) image->colors) > 1012 image->colors=3Dopacity+1; > > As code above, Graphicsmagick will set image->colors equal to opacity+1. > However, this is a bug when reading colormaps from image blob. > > 1067 if (ReadBlob(image,3*image->colors,(char *) colormap) !=3D > 3*image->colors) > > ReadBlob will read more colors which are not real color. > > BTW, I can't upload GIF Image as it's too large. > --001a11492e4892f7d80525e5e6b8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><span style=3D"font-size:12.8px">It's STRANGE in = sourceforge.</span></div><span style=3D"font-size:12.8px"><div><span style= =3D"font-size:12.8px"><br></span></div>Some GIFs set transparent color inde= x equal to size of colormaps which is an invalid value.</span><div style=3D= "font-size:12.8px"><br></div><div style=3D"font-size:12.8px"><div>1011 =C2= =A0 =C2=A0 if (opacity >=3D (long) image->colors)</div><div>1012 =C2= =A0 =C2=A0 =C2=A0 image->colors=3Dopacity+1;</div></div><div style=3D"fo= nt-size:12.8px"><br></div><div style=3D"font-size:12.8px">As code above, Gr= aphicsmagick will set image->colors equal to opacity+1.</div><div style= =3D"font-size:12.8px">However, this is a bug when reading colormaps from im= age blob.</div><div style=3D"font-size:12.8px"><br></div><div style=3D"font= -size:12.8px">1067 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (ReadBlob(image,3*image-&= gt;colors,(char *) colormap) !=3D 3*image->colors)<br></div><div style= =3D"font-size:12.8px"><br></div><div style=3D"font-size:12.8px">ReadBlob wi= ll read more colors which are not real color.</div><div style=3D"font-size:= 12.8px"><br></div><div style=3D"font-size:12.8px">BTW, I can't upload G= IF Image as it's too large.</div></div><div class=3D"gmail_extra"><br><= div class=3D"gmail_quote">On Wed, Dec 2, 2015 at 4:07 PM, =E8=8E=AB=E7=BA= =A2=E6=B3=A2 <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" ta= rget=3D"_blank">[email protected]</a>></span> wrote:<br><blockquote cla= ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa= dding-left:1ex"><div dir=3D"ltr"><span style=3D"font-size:12.8px">Some GIFs= set transparent color index equal to size of colormaps which is an invalid= value.</span><div style=3D"font-size:12.8px"><br></div><div style=3D"font-= size:12.8px"><div>1011 =C2=A0 =C2=A0 if (opacity >=3D (long) image->c= olors)</div><div>1012 =C2=A0 =C2=A0 =C2=A0 image->colors=3Dopacity+1;</d= iv></div><div style=3D"font-size:12.8px"><br></div><div style=3D"font-size:= 12.8px">As code above, Graphicsmagick will set image->colors equal to op= acity+1.</div><div style=3D"font-size:12.8px">However, this is a bug when r= eading colormaps from image blob.</div><div style=3D"font-size:12.8px"><br>= </div><div style=3D"font-size:12.8px">1067 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (= ReadBlob(image,3*image->colors,(char *) colormap) !=3D 3*image->color= s)<br></div><div style=3D"font-size:12.8px"><br></div><div style=3D"font-si= ze:12.8px">ReadBlob will read more colors which are not real color.</div><d= iv style=3D"font-size:12.8px"><br></div><div style=3D"font-size:12.8px">BTW= , I can't upload GIF Image as it's too large.</div></div> </blockquote></div><br></div> --001a11492e4892f7d80525e5e6b8-- --===============2755079412476509995== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 --===============2755079412476509995== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Graphicsmagick-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-bugs --===============2755079412476509995==--