From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Thangalin <thangalin@gmail.com>
Subject: Re: GraphicsMagick corrupts TIFF upon PDF conversion
Date: Mon, 16 Dec 2019 10:37:43 +0100 [thread overview]
Message-ID: <1ac1c04f-1ac5-a606-99a5-e97d77625cdb@xs4all.nl> (raw)
In-Reply-To: <CAANrE7r0em8EAasMzSTtMdqEDnwGTJTwJ5e+S8RZNuX1nC-ysA@mail.gmail.com>
On 12/16/2019 7:59 AM, Thangalin wrote:
> FYI, there appears to be a bug with GraphicsMagick.
>
> gm convert -density 600x600 illustration.tif m_k_i_v_illustration.tif.pdf
>
> Produces:
>
> 38812848 Dec 15 22:51 m_k_i_v_illustration.tif.pdf
> https://i.imgur.com/EByrH6r.png
>
> Whereas ImageMagck:
>
> convert -density 600x600 illustration.tif m_k_i_v_illustration.tif.pdf
>
> Produces:
>
> 42343236 Dec 15 22:52 m_k_i_v_illustration.tif.pdf
> https://i.imgur.com/9DxRVW2.png
>
> Re: https://wiki.contextgarden.net/Using_Graphics#Image_Conversion
>
> Since GraphicsMagick is used by ConTeXt, is there a way to force
> ConTeXt to use ImageMagick instead?
something like this
\startluacode
figures.converters["jpg"]["lowres.jpg"] =
function(oldname,newname,resolution)
os.execute(string.format(
'gm convert -density %ix%i "%s" "%s"',
resolution,resolution,oldname,newname))
end
\stopluacode
\starttext
\externalfigure
[t:/sources/hacker.jpg]
[conversion=lowres.jpg,resolution=50,width=10cm]
\stoptext
with gm replaced by whatever is needed to call imagemagick
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2019-12-16 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 6:59 Thangalin
2019-12-16 9:37 ` Hans Hagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ac1c04f-1ac5-a606-99a5-e97d77625cdb@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=ntg-context@ntg.nl \
--cc=thangalin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).