dm_image Module

Image type module.


Uses

  • module~~dm_image~~UsesGraph module~dm_image dm_image module~dm_error dm_error module~dm_image->module~dm_error module~dm_id dm_id module~dm_image->module~dm_id module~dm_kind dm_kind module~dm_image->module~dm_kind module~dm_mime dm_mime module~dm_image->module~dm_mime module~dm_node dm_node module~dm_image->module~dm_node module~dm_sensor dm_sensor module~dm_image->module~dm_sensor module~dm_target dm_target module~dm_image->module~dm_target module~dm_time dm_time module~dm_image->module~dm_time module~dm_uuid dm_uuid module~dm_image->module~dm_uuid module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_node->module~dm_id module~dm_node->module~dm_kind module~dm_sensor->module~dm_id module~dm_sensor->module~dm_kind module~dm_sensor->module~dm_node module~dm_target->module~dm_id module~dm_target->module~dm_kind module~dm_util dm_util module~dm_target->module~dm_util module~dm_time->module~dm_error module~dm_time->module~dm_kind module~dm_time->module~dm_util unix unix module~dm_time->unix module~dm_util->module~dm_error module~dm_util->module~dm_kind

Used by

  • module~~dm_image~~UsedByGraph module~dm_image dm_image module~dmpack dmpack module~dmpack->module~dm_image proc~dm_db_insert_image dm_db_insert_image proc~dm_db_insert_image->module~dm_image proc~dm_db_select_image dm_db_select_image proc~dm_db_select_image->module~dm_image proc~dm_test_dummy_image dm_test_dummy_image proc~dm_test_dummy_image->module~dm_image proc~dm_z_compress_type dm_z_compress_type proc~dm_z_compress_type->module~dm_image

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: IMAGE_ID_LEN = UUID_LEN

Interfaces

public interface operator (==)

Returns whether images are equal.

  • public pure elemental function dm_image_equals(image1, image2) result(equals)

    Returns .true. if given images are equal.

    Arguments

    Type IntentOptional Attributes Name
    type(image_type), intent(in) :: image1

    The first image.

    type(image_type), intent(in) :: image2

    The second image.

    Return Value logical


Derived Types

type, public ::  image_type

Image type.

Components

Type Visibility Attributes Name Initial
character(len=IMAGE_ID_LEN), public :: id = ' '

Image id (UUIDv4).

character(len=NODE_ID_LEN), public :: node_id = ' '

Node id.

character(len=SENSOR_ID_LEN), public :: sensor_id = ' '

Sensor id.

character(len=TARGET_ID_LEN), public :: target_id = ' '

Target id.

character(len=TIME_LEN), public :: timestamp = TIME_DEFAULT

Image timestamp (ISO 8601).

character(len=MIME_LEN), public :: mime = ' '

Image format (MIME type).

integer, public :: width = 0

Image width [px].

integer, public :: height = 0

Image height [px].

integer(kind=i8), public :: size = 0_i8

Image file size [byte].


Functions

public pure elemental function dm_image_equals(image1, image2) result(equals)

Returns .true. if given images are equal.

Arguments

Type IntentOptional Attributes Name
type(image_type), intent(in) :: image1

The first image.

type(image_type), intent(in) :: image2

The second image.

Return Value logical

public pure elemental function dm_image_is_valid(image) result(valid)

Returns .true. if passed image is valid.

Arguments

Type IntentOptional Attributes Name
type(image_type), intent(in) :: image

Image type.

Return Value logical

public pure function dm_image_path(image, base) result(path)

Returns path of image file from image id, MIME type, and base path: <base>/<id>.<suffix>. On error, the returned string is allocated but empty.

Arguments

Type IntentOptional Attributes Name
type(image_type), intent(in) :: image

Image type.

character(len=*), intent(in), optional :: base

Image base path.

Return Value character(len=:), allocatable

Image path.


Subroutines

public subroutine dm_image_out(image, unit)

Prints image to standard output or given file unit.

Arguments

Type IntentOptional Attributes Name
type(image_type), intent(inout) :: image
integer, intent(in), optional :: unit

public pure elemental subroutine dm_image_set(image, id, node_id, sensor_id, target_id, timestamp, mime, width, height, size)

Sets image attributes.

Arguments

Type IntentOptional Attributes Name
type(image_type), intent(inout) :: image

Image type.

character(len=UUID_LEN), intent(in), optional :: id

Image id.

character(len=*), intent(in), optional :: node_id

Node id.

character(len=*), intent(in), optional :: sensor_id

Sensor id.

character(len=*), intent(in), optional :: target_id

Target id.

character(len=TIME_LEN), intent(in), optional :: timestamp

Image timestamp.

character(len=*), intent(in), optional :: mime

Image format.

integer, intent(in), optional :: width

Image width [px].

integer, intent(in), optional :: height

Image height [px].

integer(kind=i8), intent(in), optional :: size

Image size [byte].