NuiImage( json, json, json, json )

From NWN Lexicon
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.

A image, with no border or padding.


// A image, with no border or padding.
json                     // Element
NuiImage(
  json jResRef,          // Bind:ResRef
  json jAspect,          // Bind:Int:NUI_ASPECT_*
  json jHAlign,          // Bind:Int:NUI_HALIGN_*
  json jVAlign           // Bind:Int:NUI_VALIGN_*
);

Returns

json Element


Parameters

jResRef
Resref of the image file
jAspect
NUI_ASPECT_*
jHAlign
NUI_HALIGN_*
jVAlign
NUI_VALIGN_*


Description

A image, with no border or padding.

Image file formats supported, in this priority order:

  • JPG - JPEG file a lossy photo-like image file, but much lower size then PNG or TGA/DDS
  • TGA - Used for a lot of NWN textures (although DDS is now more common)
  • PNG - standard high quality lossless compressed image format
  • GIF - can be animated, but otherwise a lossy compressed image format
  • WBM - WebM files, technically video so can be animated, but won't play sound.

Note DDS and PLT are not supported by the NUI image loader.


Remarks

You can't rotate images so for something like a minimap replacement you will need to duplicate all images 4 times for all directions.


Version

This function was added in 1.85.8193.31 of NWN:EE.


Example

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.


See Also

functions:

NUI Functions