Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Retrieves a copy of the image of an existing, open file

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5F_GET_FILE_IMAGE (file_id, buf_ptr, buf_len)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">ssize_t H5Fget_file_image( hid_t file_id, void *buf_ptr, size_t buf_len )</code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran

HTML
<pre><code class="language-fortran">  SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size)
    USE, INTRINSIC :: ISO_C_BINDING
    IMPLICIT NONE
    INTEGER(HID_T) , INTENT(IN)              :: file_id
    TYPE(C_PTR)    , INTENT(INOUT)           :: buf_ptr
    INTEGER(SIZE_T), INTENT(IN)              :: buf_len
    INTEGER        , INTENT(OUT)             :: hdferr
    INTEGER(SIZE_T), INTENT(OUT)  , OPTIONAL :: buf_size</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t file_idIN: Target file identifier
void *buf_ptrIN: Pointer to the buffer into which the image of the HDF5 file is to be copied

If buf_ptr is NULL, no data will be copied but the function’s return value will still indicate the buffer size required (or a negative value on error).

size_t buf_lenIN: Size of the supplied buffer

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5F_GET_FILE_IMAGE retrieves a copy of the image of an existing, open file. This routine can be used with files opened using the SEC2 (or POSIX), STDIO, and Core (or Memory) virtual file drivers (VFDs).

If the return value of H5F_GET_FILE_IMAGE is a positive value, it will be the length in bytes of the buffer required to store the file image. So if the file size is unknown, it can be safely determined with an initial  H5F_GET_FILE_IMAGE call with buf_ptr set to NULL. The file image can then be retrieved with a second H5F_GET_FILE_IMAGE call with buf_len set to the initial call’s return value.

While the current file size can also be retrieved with H5F_GET_FILESIZE, that call may produce a larger value than is needed. The value returned by H5F_GET_FILESIZE includes the user block, if it exists, and any unallocated space at the end of the file. It is safe in all situations to get the file size with H5F_GET_FILE_IMAGE and it often produces a value that is more appropriate for the size of a file image buffer.

Info

Recommended Reading:This function is part of the file image operations feature set. It is highly recommended to study the guide “HDF5 File Image Operations” before using this feature set.

See the “See Also” section below for links to other elements of HDF5 file image operations.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

If successful, returns the size in bytes of the buffer required to store the file image if successful; otherwise returns a negative value.

Warning

Failure Modes: H5P_GET_FILE_IMAGE will fail, returning a negative value, if the file is too large for the supplied buffer.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming soon!

Comment (Hide)
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNameseealso

See Also:
HTML Wrap
classhdf-rm-section
H5LT_OPEN_FILE_IMAGE 
  
H5P_SET_FILE_IMAGE
H5P_GET_FILE_IMAGE 
  
H5P_SET_FILE_IMAGE_CALLBACKS 
H5P_GET_FILE_IMAGE_CALLBACKS

HDF5 File Image Operations” 
  

Within H5P_SET_FILE_IMAGE_CALLBACKS: 
Callback struct   H5_file_image_callbacks_t 
Callback ENUM   H5_file_image_op_t

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    Change
1.8.13Fortran subroutine added in this release.
1.8.9C function introduced in this release.