Output file extension ignored using PerlMagic::Write & gm convert
Jeffrey Berger <[email protected]> Thu, 1 Dec 2016 18:34:25 -0600
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
--===============5387895518969327534== Content-Type: multipart/alternative; boundary="Apple-Mail=_7F4630B8-9FEC-4423-A6B0-A854E6A2348B" --Apple-Mail=_7F4630B8-9FEC-4423-A6B0-A854E6A2348B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99m trying to use PerlMagic::Write to convert PDF input to PNG = output. I=E2=80=99m working in an Ubuntu, Amazon EC2 instance.=20 On checking the output file via 'gm identify' or opening it in a text = editor, I see that the file format of the output is identified as PDF in = spite of the =E2=80=98.png=E2=80=99 file extension. This is also true when I use =E2=80=98gm convert=E2=80=99 on the command = line. This is code that works on other Ubuntu platforms and worked earlier in = the day on this platform. (!) Between the time the code worked on this platform and the point at which = it stopped working, I did the following: installed npm, svgo, and pdf2svg. symlinked /usr/bin/node to /usr/bin/nodejs (required to fix a 0.6.x npm = problem on ubuntu) These changes were required by a separate part of the code that uses a = messy script to convert the same PDF file to SVG. (That script now works = properly.) I performed an =E2=80=98apt-get purge graphicsmagick=E2=80=99 followed = by =E2=80=98apt-get install graphicsmagick=E2=80=99 hoping that would = fix the problem, but it didn=E2=80=99t. I=E2=80=99ve verified the failing behavior of =E2=80=98gm convert=E2=80=99= on other PDFs.=20 I=E2=80=99ve verified that =E2=80=98gm convert=E2=80=99 fails similarly = to convert to JPG and TIF.=20 However, =E2=80=98gm convert=E2=80=99 works for GIF, BMP and PPM = formats. It seems that something has broken the GraphicsMagick installation.=20 Thanks for any suggestions! Jeffrey Berger, Software Developer Clockwork Active Media Systems (612) 845 5535 jeff@clockwork. <mailto:[email protected]>com Strategy | Design | Technology | Content Put us to work for you. Contact Michael Opperman <[email protected] = <mailto:[email protected]>> --Apple-Mail=_7F4630B8-9FEC-4423-A6B0-A854E6A2348B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D"">I=E2=80=99m trying to use PerlMagic::Write to convert PDF = input to PNG output. I=E2=80=99m working in an Ubuntu, Amazon EC2 = instance. <div class=3D""><br class=3D""></div><div class=3D"">On = checking the output file via 'gm identify' or opening it in a text = editor, I see that the file format of the output is identified as PDF in = spite of the =E2=80=98.png=E2=80=99 file extension.</div><div = class=3D""><br class=3D""></div><div class=3D"">This is also true when I = use =E2=80=98gm convert=E2=80=99 on the command line.</div><div = class=3D""><br class=3D""></div><div class=3D"">This is code that works = on other Ubuntu platforms and worked earlier in the day on this = platform. (!)</div><div class=3D""><br class=3D""></div><div = class=3D"">Between the time the code worked on this platform and the = point at which it stopped working, I did the following:</div><div = class=3D""><ol class=3D"MailOutline"><li class=3D"">installed npm, svgo, = and pdf2svg.</li><li class=3D"">symlinked /usr/bin/node to = /usr/bin/nodejs (required to fix a 0.6.x npm problem on = ubuntu)</li></ol><div class=3D""><br class=3D""></div></div><div = class=3D"">These changes were required by a separate part of the code = that uses a messy script to convert the same PDF file to SVG. (That = script now works properly.)</div><div class=3D""><br class=3D""></div><div= class=3D"">I performed an =E2=80=98apt-get purge graphicsmagick=E2=80=99 = followed by =E2=80=98apt-get install graphicsmagick=E2=80=99 hoping that = would fix the problem, but it didn=E2=80=99t.</div><div class=3D""><br = class=3D""></div><div class=3D"">I=E2=80=99ve verified the failing = behavior of =E2=80=98gm convert=E2=80=99 on other PDFs. </div><div = class=3D""><br class=3D""></div><div class=3D"">I=E2=80=99ve verified = that =E2=80=98gm convert=E2=80=99 fails similarly to convert to JPG and = TIF. </div><div class=3D""><br class=3D""></div><div = class=3D"">However, =E2=80=98gm convert=E2=80=99 works for GIF, BMP and = PPM formats.</div><div class=3D""><br class=3D""></div><div class=3D"">It = seems that something has broken the GraphicsMagick = installation. </div><div class=3D""><br class=3D""></div><div = class=3D"">Thanks for any suggestions!</div><div class=3D""><br = class=3D""></div><div class=3D""><br class=3D""></div><div class=3D""> <div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: = auto; text-align: start; text-indent: 0px; text-transform: none; = white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><span class=3D"Apple-style-span" style=3D"border-collapse: = separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: = normal; font-variant: normal; font-weight: normal; letter-spacing: = normal; line-height: normal; orphans: 2; text-align: -webkit-auto; = text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = word-spacing: 0px; border-spacing: 0px; = -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: = 0px;"><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D""><div class=3D"">Jeffrey= Berger, Software Developer</div><div class=3D""><div style=3D"word-wrap: = break-word; -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space;" class=3D"">Clockwork Active Media Systems</div><div = style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D"">(612) 845 = 5535</div><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D"">jeff<a = href=3D"mailto:[email protected]" class=3D"">@clockwork.</a>com<br = class=3D""><br class=3D"">Strategy | Design | = Technology | Content</div><div style=3D"word-wrap: = break-word; -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space;" class=3D""><br class=3D""><span style=3D"orphans: = auto; widows: auto;" class=3D"">Put us to work for you. = Contact Michael Opperman <</span><a = href=3D"mailto:[email protected]" class=3D"" style=3D"orphans: auto; = widows: auto;">[email protected]</a><span style=3D"orphans: auto; = widows: auto;" class=3D"">></span></div></div></div></span></div> </div> <br class=3D""></body></html>= --Apple-Mail=_7F4630B8-9FEC-4423-A6B0-A854E6A2348B-- --===============5387895518969327534== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot --===============5387895518969327534== 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 --===============5387895518969327534==--