From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/115896 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Keith McKay via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: =?utf-8?q?setupexternalfigures_and_reso=C4=BAution?= Date: Fri, 2 Sep 2022 09:39:59 +0100 Message-ID: References: <9c7e4457-2cd7-c849-fcf8-eaf259c4fce9@mailbox.org> <6082bf77-0407-6bcb-18b9-8e195b7e5283@fiee.net> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5305194994494033359==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12265"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Keith McKay To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 02 10:41:08 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oU2Ed-00034d-LE for gctc-ntg-context-518@m.gmane-mx.org; Fri, 02 Sep 2022 10:41:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EA5252A4081; Fri, 2 Sep 2022 10:40:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pG-bUsC0MwFl; Fri, 2 Sep 2022 10:40:29 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F0D782A4085; Fri, 2 Sep 2022 10:40:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DD4602A4081 for ; Fri, 2 Sep 2022 10:40:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B2tBoyW-6ssD for ; Fri, 2 Sep 2022 10:40:16 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.41; helo=mail-lf1-f41.google.com; envelope-from=mckaymeister@gmail.com; receiver= Original-Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 195D7259 for ; Fri, 2 Sep 2022 10:40:16 +0200 (CEST) Original-Received: by mail-lf1-f41.google.com with SMTP id g7so2234933lfe.11 for ; Fri, 02 Sep 2022 01:40:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=xD5AFp9r1QQGOr68Asnn3ODLY4r54mbC+ar9X08bDAM=; b=X8ZxHEjILJxI48YS6rXGX4moqKfvF7QzWEwl8xXXqr59HEFay8l/8Da4/JyujXPxOW ONca5h6R7U68wKpORUsFIbnNfdd9SzFz9qH3aVYAyTYIwbO6PO2xEL4HfuiLUjx30rhO zJgjxJrmvOR3f1ms2aMrdzXBz6vVbH4ApjqvJN6NepGKlOex+WtZCh+ICL1ug0FXnS+H gSZV24gIZUKuMNTw/SqP+hizlIVzwdreNFh2bcAyDXbbLkMXxdK6bz209t5pRcHZjnBo 8A6G3uJkEJpRsPaFYVzKTwb3QyzOdLKQUDcCMNDfdByCPE6KBpydgtsatEgKA0tIduR3 w6hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=xD5AFp9r1QQGOr68Asnn3ODLY4r54mbC+ar9X08bDAM=; b=1gibJMi8V73l1b8z/YIUkoQJTsOMxE1Rna4T+mZdPIYlmHyAojb9bXFJ89ZlGt3oiM aMSDrTurvAuyfbuO4xNU1s4Fu2jn6lwkH0f9JCUIISWwU2y9rVEHDQkTMcixr/J7jUBb Sk0XsxdmwUCzsp0e4/rvq2zrpXx5qXsURLHcaKerQlhjYyF1XJ8BP7p69Zoo8QMoCWFS LbOTAJz+02Q6KtY5V6354wETTcsQck8Yeqi1m49BJswKKpHivjnmk0ysC8UwoIZpQp34 iGZ6rbG9/LE2DPbWGzyaIoU7bfdJ09F6J6tuBXtKGn4zReR+93IXoSXpkpPMGhZTU8To 8HSA== X-Gm-Message-State: ACgBeo02ni/wb+W6vsgDg0ygAIVcK3xZ+l9FW9jxJEOhAgAGPRJdxCpM ZwZnxyx0lNX9jVMBzG8fPIVSS4zv7oXM+wUVibLFN6jD X-Google-Smtp-Source: AA6agR6kK2fb+OiQsBUIUxeklv8sxwzqI2ckpmgA505rTKrhK3pfxy42EeyJSB9Ank+5r7E4Of+WWxEB60ts4Bcmdaw= X-Received: by 2002:a05:6512:23a1:b0:48a:fde8:ce8c with SMTP id c33-20020a05651223a100b0048afde8ce8cmr12640729lfv.393.1662108011856; Fri, 02 Sep 2022 01:40:11 -0700 (PDT) In-Reply-To: <6082bf77-0407-6bcb-18b9-8e195b7e5283@fiee.net> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:115896 Archived-At: --===============5305194994494033359== Content-Type: multipart/alternative; boundary="000000000000a0085b05e7adad72" --000000000000a0085b05e7adad72 Content-Type: text/plain; charset="UTF-8" Thanks for this code Hraban. I tried this last night and it worked really well. I did have one stumbling block when I noticed that those image files with a space in their names were not found, however renaming without a space solved the problem. Is this a bug or a feature? Thanks Keith McKay On Thu, 1 Sep 2022, 09:52 Henning Hraban Ramm via ntg-context, < ntg-context@ntg.nl> wrote: > Am 01.09.22 um 10:44 schrieb juh+ntg-context--- via ntg-context: > > > > Hi, > > > > what is resolution meant to do? > > > > Whatever I insert as resolution, I get no change. > > > > \setupexternalfigure[location={default,local},resolution=30] > > \starttext > > \externalfigure[hacker] > > \stoptext > > > > What am I missing? > > The resolution parameter is still not used by default ConTeXt, sorry. > > But you can use it with the attached lua file like: > > > \loadluafile[grph-downsample] > \doifmodeelse{print}{% > \def\Resolution{300} > }{% > \def\Resolution{96} > }% > > \setupexternalfigures[ > %directory={./Logos,img}, > conversion=lowres.jpg, > resolution=\Resolution, > ] > > > Hraban > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___________________________________________________________________________________ > --000000000000a0085b05e7adad72 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for this code Hraban. I tried this last night= and it worked really well. I did have one stumbling block when I noticed t= hat those image files with a space in their names were not found, however r= enaming=C2=A0 without a space solved the problem. Is this a bug or a featur= e?
Thanks
Keith McKay

=
On Thu, 1 Sep 2022, 09:52 Henning Hraban Ramm via ntg-context, <ntg-context@ntg.nl> wrote:
Am 01.09.22 um 10:44 schrieb juh+ntg-contex= t--- via ntg-context:
>
> Hi,
>
> what is resolution meant to do?
>
> Whatever I insert as resolution, I get no change.
>
> \setupexternalfigure[location=3D{default,local},resolution=3D30]
> \starttext
> \externalfigure[hacker]
> \stoptext
>
> What am I missing?

The resolution parameter is still not used by default ConTeXt, sorry.

But you can use it with the attached lua file like:


\loadluafile[grph-downsample]
\doifmodeelse{print}{%
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \def\Resolution{300}
}{%
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \def\Resolution{96}
}%

\setupexternalfigures[
=C2=A0 =C2=A0%directory=3D{./Logos,img},
=C2=A0 =C2=A0conversion=3Dlowres.jpg,
=C2=A0 =C2=A0resolution=3D\Resolution,
]


Hraban
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / https:= //www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : https://www.pragma-ade.nl / http:= //context.aanhet.net
archive=C2=A0 : https://bitbucket.org/ph= g/context-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: https://contextgarden.net
___________________________________________________________________________= ________
--000000000000a0085b05e7adad72-- --===============5305194994494033359== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============5305194994494033359==--