NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_imgsize(n) 4.99.30 naviserver "NaviServer Built-in Commands"

Name

ns_imgsize - Determine the width and height of a JPEG, GIF or PNG image

Table Of Contents

Synopsis

Description

Returns a list of two elements, the width and height of the file specified by filename. Currently files of type JPEG, GIF or PNG are supported. An error is generated if the file does not exist. If the filetype is not supported the resulting list returns width and height set to 0 (Whereas ns_jpegsize, ns_gifsize and ns_pngsize would generate an error).

COMMANDS

ns_imgsize filename

EXAMPLES

 % ns_imgsize screenshot.jpg
 1024 768
 % file exists test.html
 1
 % ns_imgsize test.html
 0 0

See Also

ns_gifsize, ns_imgmime, ns_imgtype, ns_jpegsize, ns_pngsize

Keywords

global built-in, images