- ⌂ #IMAGE
- Operations
#IMAGE GetMime
Get the file MIME Type (aka Media Type) typically used to indicate the format of a file that contains the image bytes.
Prototype
#IMAGE($image_bytes, GetMime)
Return
A string with the two part Media Type, such as "image/gif", "image/jpeg", "image/png".
Example
#/ get the Media Type and file extension
#NEW($mime)#IMAGE($img,GetMime)#ENDNEW
#NEW($ext)#IMAGE($img,GetExtension)#ENDNEW
#HEADER
Content-Type: $mime
Content-Disposition: attachment; filename=thumb.$ext
#ENDHEADER
$img