Re: image crop throws SIGABRT

Shane Bishop <[email protected]> Thu, 22 Jul 2021 11:34:13 -0600
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CAOSZYLjQBwkBFh80N-PWx1Vymkof1+1Pr=Z6Sa7Goa9JTw4ngw@mail.gmail.com>
--===============3467849604462142213==
Content-Type: multipart/alternative; boundary="000000000000f8ad3a05c7b9b2a8"

--000000000000f8ad3a05c7b9b2a8
Content-Type: text/plain; charset="UTF-8"

Aha, when I was doing the CMYK to sRGB conversion, I cleared out all
profiles that matched 'icc', rather than '*'. Removing the profiles via '*'
solves the problem in the conversion, so that Gmagick isn't getting a
zero-size profile. Hurrah!
Thanks for all your help Bob, really appreciate it :)

Take care,
Shane

On Wed, Jul 21, 2021 at 6:44 PM Bob Friesenhahn <
[email protected]> wrote:

> On Wed, 21 Jul 2021, Shane Bishop wrote:
>
> > Oh shoot, I thought I had stripped the profiles after the conversion, how
> > were you able to see that? I ran exiftool on the image and it gives no
> > information about a color profile on there.
>
> I am not sure.  All I know is that the libwmf APIs used returned a
> zero size for a ICCP color profile even if the APIs were used entirely
> properly.  It says it has one but then reports zero size.
>
> Bob
>
> >
> > On Wed, Jul 21, 2021 at 4:45 PM Bob Friesenhahn <
> > [email protected]> wrote:
> >
> >> On Wed, 21 Jul 2021, Shane Bishop wrote:
> >>>
> >>> This is on Debian 10 with GM "1.4+really1.3.35-1~deb10u1" (the latest
> >>> stable on Debian).
> >>>
> >>> Now, the reason I say "of my own making", is that this image was
> >> originally
> >>> a CMYK JPG, and I used Imagick to convert it to sRGB and then to WebP,
> >>> since libwebp (via cwebp) doesn't otherwise tolerate CMYK images.
> >>> At any rate, another image produced with Imagick crops just fine, and
> has
> >>> no issues whatsoever, so I'm not sure how isolated this problem is.
> >>>
> >>> Any ideas, workarounds, things to try?
> >>
> >> The problem is that the webp file contains embedded profiles with a
> >> size of zero.  These should have been ignored.
> >>
> >> As a quick work-around, add
> >>
> >>    -strip
> >>
> >> or
> >>
> >>    +profile '*'
> >>
> >> Immediately after reading the WebP file.
> >>
> >> Bob
> >> --
> >> Bob Friesenhahn
> >> [email protected],
> http://www.simplesystems.org/users/bfriesen/
> >> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> >> Public Key,
> http://www.simplesystems.org/users/bfriesen/public-key.txt
> >>
> >>
> >> _______________________________________________
> >> Graphicsmagick-help mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
> >>
> >
>
> --
> Bob Friesenhahn
> [email protected], http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
>
>
> _______________________________________________
> Graphicsmagick-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
>

--000000000000f8ad3a05c7b9b2a8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Aha, when I was doing the CMYK to sRGB conversion, I clear=
ed out all profiles that matched &#39;icc&#39;, rather than &#39;*&#39;. Re=
moving the profiles via &#39;*&#39; solves the problem in the conversion, s=
o that Gmagick isn&#39;t getting a zero-size profile. Hurrah!=C2=A0<div>Tha=
nks for all your help Bob, really appreciate it :)</div><div><br></div><div=
>Take care,</div><div>Shane</div></div><br><div class=3D"gmail_quote"><div =
dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 21, 2021 at 6:44 PM Bob Friese=
nhahn &lt;<a href=3D"mailto:[email protected]">[email protected]=
allas.tx.us</a>&gt; wrote:<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">On Wed, 21 Jul 2021, Shane Bishop wrote:<br>
<br>
&gt; Oh shoot, I thought I had stripped the profiles after the conversion, =
how<br>
&gt; were you able to see that? I ran exiftool on the image and it gives no=
<br>
&gt; information about a color profile on there.<br>
<br>
I am not sure.=C2=A0 All I know is that the libwmf APIs used returned a <br=
>
zero size for a ICCP color profile even if the APIs were used entirely <br>
properly.=C2=A0 It says it has one but then reports zero size.<br>
<br>
Bob<br>
<br>
&gt;<br>
&gt; On Wed, Jul 21, 2021 at 4:45 PM Bob Friesenhahn &lt;<br>
&gt; <a href=3D"mailto:[email protected]" target=3D"_blank">bfri=
[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; On Wed, 21 Jul 2021, Shane Bishop wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This is on Debian 10 with GM &quot;1.4+really1.3.35-1~deb10u1&=
quot; (the latest<br>
&gt;&gt;&gt; stable on Debian).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Now, the reason I say &quot;of my own making&quot;, is that th=
is image was<br>
&gt;&gt; originally<br>
&gt;&gt;&gt; a CMYK JPG, and I used Imagick to convert it to sRGB and then =
to WebP,<br>
&gt;&gt;&gt; since libwebp (via cwebp) doesn&#39;t otherwise tolerate CMYK =
images.<br>
&gt;&gt;&gt; At any rate, another image produced with Imagick crops just fi=
ne, and has<br>
&gt;&gt;&gt; no issues whatsoever, so I&#39;m not sure how isolated this pr=
oblem is.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Any ideas, workarounds, things to try?<br>
&gt;&gt;<br>
&gt;&gt; The problem is that the webp file contains embedded profiles with =
a<br>
&gt;&gt; size of zero.=C2=A0 These should have been ignored.<br>
&gt;&gt;<br>
&gt;&gt; As a quick work-around, add<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 -strip<br>
&gt;&gt;<br>
&gt;&gt; or<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 +profile &#39;*&#39;<br>
&gt;&gt;<br>
&gt;&gt; Immediately after reading the WebP file.<br>
&gt;&gt;<br>
&gt;&gt; Bob<br>
&gt;&gt; --<br>
&gt;&gt; Bob Friesenhahn<br>
&gt;&gt; <a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a>, <a href=3D"http://www.simplesystems.org/u=
sers/bfriesen/" rel=3D"noreferrer" target=3D"_blank">http://www.simplesyste=
ms.org/users/bfriesen/</a><br>
&gt;&gt; GraphicsMagick Maintainer,=C2=A0 =C2=A0 <a href=3D"http://www.Grap=
hicsMagick.org/" rel=3D"noreferrer" target=3D"_blank">http://www.GraphicsMa=
gick.org/</a><br>
&gt;&gt; Public Key,=C2=A0 =C2=A0 =C2=A0<a href=3D"http://www.simplesystems=
.org/users/bfriesen/public-key.txt" rel=3D"noreferrer" target=3D"_blank">ht=
tp://www.simplesystems.org/users/bfriesen/public-key.txt</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Graphicsmagick-help mailing list<br>
&gt;&gt; <a href=3D"mailto:[email protected]" targe=
t=3D"_blank">[email protected]</a><br>
&gt;&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/graphicsma=
gick-help" rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.n=
et/lists/listinfo/graphicsmagick-help</a><br>
&gt;&gt;<br>
&gt;<br>
<br>
-- <br>
Bob Friesenhahn<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">bfriesen@=
simple.dallas.tx.us</a>, <a href=3D"http://www.simplesystems.org/users/bfri=
esen/" rel=3D"noreferrer" target=3D"_blank">http://www.simplesystems.org/us=
ers/bfriesen/</a><br>
GraphicsMagick Maintainer,=C2=A0 =C2=A0 <a href=3D"http://www.GraphicsMagic=
k.org/" rel=3D"noreferrer" target=3D"_blank">http://www.GraphicsMagick.org/=
</a><br>
Public Key,=C2=A0 =C2=A0 =C2=A0<a href=3D"http://www.simplesystems.org/user=
s/bfriesen/public-key.txt" rel=3D"noreferrer" target=3D"_blank">http://www.=
simplesystems.org/users/bfriesen/public-key.txt</a><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>

--000000000000f8ad3a05c7b9b2a8--


--===============3467849604462142213==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3467849604462142213==
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

--===============3467849604462142213==--