pub struct SubBlock(/* private fields */);Expand description
sub-block object.
Implementations§
Source§impl SubBlock
impl SubBlock
Sourcepub fn create_bitmap(&self) -> Result<Bitmap, Error>
pub fn create_bitmap(&self) -> Result<Bitmap, Error>
Create a bitmap object from the specified sub-block object. The bitmap object can be used to access the pixel data contained in the sub-block. If the subblock contains compressed data, then decompression will be performed in this call.
\param sub_block_object The sub-block object. \param [out] bitmap_object If successful, the handle to the newly created bitmap object is put here.
\returns An error-code indicating success or failure of the operation.
Sourcepub fn get_info(&self) -> Result<SubBlockInfo, Error>
pub fn get_info(&self) -> Result<SubBlockInfo, Error>
Get Information about the sub-block.
\param sub_block_object The sub-block object. \param [out] sub_block_info If successful, information about the sub-block object is put here.
\returns An error-code indicating success or failure of the operation.
Sourcepub fn get_raw_data(
&self,
tp: RawDataType,
size: i32,
) -> Result<(i32, Vec<u8>), Error>
pub fn get_raw_data( &self, tp: RawDataType, size: i32, ) -> Result<(i32, Vec<u8>), Error>
Copy the raw data from the specified sub-block object to the specified memory buffer. The value of the ‘size’ parameter on input is the size of the buffer pointed to by ‘data’. On output, the value of ‘size’ is the actual size of the data. At most the initial value of ‘size’ bytes are copied to the buffer. If the initial value of ‘size’ is zero (0) or ‘data’ is null, then no data is copied. For the ‘type’ parameter, the following values are valid: 0 (data) and 1 (metadata). For 0 (data), the data is the raw pixel data of the bitmap. This data may be compressed. For 1 (metadata), the data is the raw metadata in XML-format (UTF8-encoded).
\param sub_block_object The sub block object. \param type The type - 0 for "pixel-data", 1 for "sub-block metadata". \param [in,out] size On input, the size of the memory block pointed to by ‘data’, on output the actual size of the available data. \param [out] data Pointer where the data is to be copied to. At most the initial content of ‘size’ bytes are copied.
\returns An error-code indicating success or failure of the operation.