dm_gm_get_file_format Function

public function dm_gm_get_file_format(path, file_format) result(rc)

Uses GraphicsMagick to determine the image file format (JPEG, PNG, ...). On error, the string file_format is allocated but empty.

The function returns the followin error codes:

  • E_NOT_FOUND if image does not exist.
  • E_READ if reading dimensions failed.
  • E_SYSTEM if execution of GraphicsMagick failed.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path

Image file path.

character(len=:), intent(out), allocatable :: file_format

Image file format.

Return Value integer


Calls

proc~~dm_gm_get_file_format~~CallsGraph proc~dm_gm_get_file_format dm_gm_get_file_format proc~dm_file_exists dm_file_exists proc~dm_gm_get_file_format->proc~dm_file_exists proc~dm_is_error dm_is_error proc~dm_gm_get_file_format->proc~dm_is_error proc~dm_pipe_close dm_pipe_close proc~dm_gm_get_file_format->proc~dm_pipe_close proc~dm_pipe_open dm_pipe_open proc~dm_gm_get_file_format->proc~dm_pipe_open proc~dm_pipe_read dm_pipe_read proc~dm_gm_get_file_format->proc~dm_pipe_read c_pclose c_pclose proc~dm_pipe_close->c_pclose proc~dm_pipe_connected dm_pipe_connected proc~dm_pipe_close->proc~dm_pipe_connected c_popen c_popen proc~dm_pipe_open->c_popen proc~dm_pipe_open->proc~dm_pipe_connected c_fread c_fread proc~dm_pipe_read->c_fread

Called by

proc~~dm_gm_get_file_format~~CalledByGraph proc~dm_gm_get_file_format dm_gm_get_file_format proc~dm_gm_get_mime dm_gm_get_mime proc~dm_gm_get_mime->proc~dm_gm_get_file_format