pub fn with_reader(reader: R) -> Result<Self> {
        unsafe {
            let mut stream = InputStream::new(reader);

            let mut codec: *mut PKImageDecode = std::ptr::null_mut();
            call(PKImageDecode_Create_WMP(std::mem::transmute(&mut codec)))?;
            call((*codec).Initialize.unwrap()(codec, stream.raw.as_mut()))?;

            Ok(Self {
                raw: codec,
                stream: Some(stream)
            })
        }
    }
///
/// Create a new JPEG XR image decoder for the given input.
/// This will consume the reader, and free it when done.
///
Create a new JPEG XR image decoder for the given input.
This will consume the reader, and free it when done.
Create a new JPEG XR image decoder for the given input . This will consume the reader and free it when done .
pub fn with_reader(reader: R) -> Result<Self> {
        unsafe {
            let mut stream = InputStream::new(reader);
            let mut codec: *mut PKImageDecode = std::ptr::null_mut();
            call(PKImageDecode_Create_WMP(std::mem::transmute(&mut codec)))?;
            call((*codec).Initialize.unwrap()(codec, stream.raw.as_mut()))?;
            Ok(Self {
                raw: codec,
                stream: Some(stream)
            })
        }
    }
pub fn with_reader ( reader : R ) -> Result < Self > { unsafe { let mut stream = InputStream :: new ( reader ) ; let mut codec : * mut PKImageDecode = std :: ptr :: null_mut ( ) ; call ( PKImageDecode_Create_WMP ( std :: mem :: transmute ( & mut codec ) ) ) ? ; call ( ( * codec ) . Initialize . unwrap ( ) ( codec , stream . raw . as_mut ( ) ) ) ? ; Ok ( Self { raw : codec , stream : Some ( stream ) } ) } }
Create a new JPEG XR image decoder for the given input.
Create a new JPEG XR image decoder for the given input .
reader
R
reader
R