CaptureScreenshotAlt

From GECK
Jump to: navigation, search


A function added by the SUP NVSE Plugin.

Description

Outputs contents of current screen into an image file to specified folder. Additional elements to draw can be specified.

Syntax

[help]
CaptureScreenshotAlt Folder:string File:string XStart:float XEnd:float YStart:float YEnd:float Format:int Use Game Res:int Image Quality:int DrawElements:array

Formats

0 - .JPG;
1 - .BMP;
2 - .GIF;
3 - .TIFF;
4 - .PNG;
5 - .DDS(see notes);
6 - .DDS - smaller size(see notes);

Example

CaptureScreenshotAlt "MyMod" "MyImage" 0 1000 0 1200 1 0

Will output screen contents from Screen position X of 0 to 1000 and Screen position Y from 0 to 1200 to "MyImage.bmp" which will be located in "Data\\textures\\SUPScreenshots\\MyMod" folder. UI(XML) screen resolution is used.

CaptureScreenshotAlt "MyMod" "MyImage" 300 2000 300 1400 6 0 50

Will output screen contents from Screen position X of 300 to 2000 and Screen position Y from 3 to 1400 to "MyImage.dds" which will be located in "Data\\textures\\SUPScreenshots\\MyMod" folder. Real screen resolution is used. Quality of captured image is set to 50.

Notes

  • All folders and files are outputted to "Data\\textures\\SUPScreenshots\\" folder. If you're using MO2 - they will be written into MO2 "Overwrite" folder.
  • .DDS format is not real DDS texture but it can be read by game XML files so you can use it in UI mods just after extracting.
  • .DDS format #6 is recommended to use for UI elements purposes.
  • If there is a file in folder with the same name - it will be overwritten.
  • Quality parameter only works for .JPG(#0) and .DDS(#6) formats.
  • To get screen resolution - use GetScreenTrait.
  • From SUP V8.20 and later 10th parameter is added which allows drawing elements on the screenshot. Array provided must match structure for DrawGraphicsToDDSTextureAndSave. List of elements are also mentioned in the article.

See Also