Oasys.D3PLOT.Image class

Constants

3D (D3PLOT viewer types

Image.GLBU

Uncompressed GLB animation file

3D (D3PLOT viewer) types

Image.GLB

GLB animation file

image types

Image.BMP

24-bit uncompressed BMP file

Image.BMP8

8-bit uncompressed BMP file

Image.BMP8C

8-bit compressed BMP file

Image.GIF

8-bit GIF file

Image.JPEG

JPEG file

Image.PNG

24-bit PNG file

Image.PNG8

8-bit PNG file

Image.PPM

PPM file

movie types

Image.AGIF

8-bit animated GIF file

Image.AVI

AVI movie file

Image.MP4

MP4 movie file

resolution

Image.SCREEN

Image will be created at screen resolution

Image.X2

Image will be created at 2x screen resolution

Image.X4

Image will be created at 4x screen resolution

state selection

Image.ALL_STATES

Use all states

Static methods

classmethod Image.Write3D(name, options=Oasys.gRPC.defaultArg)

Writes a 3D (GLB) file

Parameters:
  • name (string) – Filename for the movie

  • options (dict) –

    Optional. Dictionary containing options for writing movie. Can be any of:

    anonymise:

    (boolean) Anonymise part tree (default = false)

    format:

    (constant) The format for the 3D file. Either Image.GLB (default) or Image.GLBU

    frameRate:

    (integer) The frame rate if multiple states are written (default = 25)

    graphicsWindow:

    (GraphicsWindow) An individual GraphicsWindow to write 3D data for. If not given (default) all the windows on the current page will be written

    state:

    (integer) The state number to write or Image.ALL_STATES (default)

Returns:

No return value

Return type:

None

Example

To write a 3D file “example.glb” for graphics window gw:

Oasys.D3PLOT.Image.Write3D("example.glb", { 'graphicsWindow': gw } )
classmethod Image.WriteImage(name, options=Oasys.gRPC.defaultArg)

Writes a static image file

Parameters:
  • name (string) – Filename for the image

  • options (dict) –

    Optional. Dictionary containing options for writing image. Can be any of:

    dither:

    (boolean) Whether to dither 8 bit images or not (default is false)

    format:

    (constant) The format for the image. One of Image.BMP8C, Image.BMP8, Image.BMP, Image.JPEG, Image.PPM, Image.PNG (default), Image.PNG8 or Image.GIF

    graphicsWindow:

    (GraphicsWindow) An individual GraphicsWindow to write image for. If not given (default) all the windows on the current page will be written

    optimise:

    (boolean) Whether to optimise the colour palette for 8 bit images or not (default is true)

    quality:

    (integer) The quality for JPEG images (1 - 100) (default = 90)

    resolution:

    (constant) The resolution for the image. One of Image.SCREEN (default), Image.X2 or Image.X4

Returns:

No return value

Return type:

None

Example

To write an image “example.png”

Oasys.D3PLOT.Image.WriteImage("example.png")
classmethod Image.WriteMovie(name, options=Oasys.gRPC.defaultArg)

Writes a movie file

Parameters:
  • name (string) – Filename for the movie

  • options (dict) –

    Optional. Dictionary containing options for writing movie. Can be any of:

    aviFormat:

    (constant) The AVI format for the movie if writing an AVI file. One of Image.JPEG (default), Image.BMP8C, Image.BMP8 or Image.BMP

    dither:

    (boolean) Whether to dither 8 bit images or not (default is false)

    format:

    (constant) The format for the movie. One of Image.MP4 (default), Image.AVI or Image.AGIF

    frameRate:

    (integer) The frame rate (default = 25)

    graphicsWindow:

    (GraphicsWindow) An individual GraphicsWindow to write movie for. If not given (default) all the windows on the current page will be written

    quality:

    (integer) The quality for AVI MJPEG images (1 - 100) (default = 90)

    repeat:

    (integer) The number of repeats for the movie. 0 is infinite (default = 0)

Returns:

No return value

Return type:

None

Example

To write a movie “example.mp4”:

Oasys.D3PLOT.Image.WriteMovie("example.mp4")