On Sun, 27 May 2012, Rogers, Michael K wrote:

I don't know if this helps but the following tells what the type of the image file is. (In my case I copied a jpg to img1 and a png to img2, without extensions of course.)


Hans implemented a version of unix file command for checking the type of images, but using the inbuilt library is definely simpler!

userdata = userdata or { }
function userdata.mytype(s)

@Hans, btw I also noticed that \locfilename does not work for files without extension. Create a file "one" in the current directory and then run:



If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net

Reply via email to