ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* access image properties in Lua
@ 2023-07-11 12:22 Henning Hraban Ramm
  2023-07-13  7:19 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2023-07-11 12:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

What’s the current approved way to get image properties within a Lua 
function?

very old:
local pic = figures.getinfo(figures.current().status.fullname)

used to work in 2019:
local pic = img.scan{filename = figures.current().status.fullname}

if I understand this right, "img" isn’t valid anymore:
"""
token call, execute: grph-imagelib.lua:37: attempt to index a nil value 
(global 'img')
"""

I’d like to know the pixel size and if possible also the scaled target 
size of an image; either the "current" one or by name.


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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-18 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 12:22 access image properties in Lua Henning Hraban Ramm
2023-07-13  7:19 ` Hans Hagen
2023-07-17 13:44   ` [NTG-context] " Alan Braslau via ntg-context
2023-07-17 16:20     ` Henning Hraban Ramm
2023-07-17 17:10       ` Alan Braslau via ntg-context
     [not found]       ` <048d051e-c66f-3e0f-e3d2-48ef300b7280@icloud.com>
2023-07-18 11:39         ` Henning Hraban Ramm

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).