- Added method
assign_thumbnail
forHeifContext
structure. - BREAKING: Added default feature
use-bindgen
to control that type of binding will be used bylibheif-sys
crate (pre-generated or generated on the fly bybindgen
)
- Fixed creating instance of
ColorProfileType
from instance ofheif_color_profile_type
on Windows.
- Added
ColorConversionOptions
structure. - Added
DecodingOptions
methods:decoder_id
set_decoder_id
color_conversion_options
set_color_conversion_options
- Added
EncodingOptions
methods:color_conversion_options
set_color_conversion_options
- Added enums:
ChromaDownsamplingAlgorithm
ChromaUpsamplingAlgorithm
- Added
DecoderDescriptor
structure. - Added method
decoder_descriptors
forLibHeif
structure. - Added method
item_id
forImageHandle
structure. - Added
HeifContext
methods:top_level_image_handles
encode_thumbnail
- Added
Image
methods:pixel_aspect_ratio
set_pixel_aspect_ratio
- BREAKING: Added new values of
CompressionFormat
enum:Vvc
Evc
Jpeg2000
Uncompressed
- BREAKING: Added new values of
HeifErrorSubCode
enum:InvalidRegionData
InvalidProperty
ItemReferenceCycle
EncoderInitialization
EncoderEncoding
EncoderCleanup
TooManyRegions
- Added support of cargo-vcpkg
to install
libheif
with help ofcargo
.
libheif-sys
updated to version 1.16.- BREAKING: Enums
HeifErrorCode
,HeifErrorSubCode
,CompressionFormat
marked asnon_exhaustive
- Fixed conversion of
profile
argument ofImage.set_color_profile_raw
method into C-version of this argument.
- BREAKING: Added lifetime for
HeifContext
structure to exclude "use after free" in case it is created from&[u8]
(#13).
- Added method
HeifContext::set_max_decoding_threads()
.
- Fixed
path_to_cstring()
function for building on Windows (#11).
- Added
LibHeif
structure to initialise internals oflibheif
, load plugins, get instances of encoders, decodeImageHandle
intoImage
, get version of linkedlibheif
. - Added
EncoderDescriptor
structure that describe some properties of encoder and may be used to getEncoder
instance fromLibHeif
. - Added
EncodingOptions::new()
method.
- BREAKING: Removed method
HeifContext::encoder_for_format()
. UseLibHeif::encoder_for_format()
method instead. - BREAKING: Removed method
ImageHandle::decode()
. UseLibHeif::decode()
method instead. - BREAKING: Lifetime of
Encoder
structure now bounds by lifetime ofLibHeif
instance. - BREAKING: Method
Encoder::name()
now returnsString
instead&str
. - Structure
DecodingOptions
was exposed in public interface of the crate.
- Added methods
add_generic_metadata()
,add_exif_metadata()
andadd_xmp_metadata()
forHeifContext
.
- BREAKING: Changed type of argument
type_filer
of methodsImageHandle::number_of_metadata_blocks()
andImageHandle::metadata_block_ids()
. Now it must be something that implementsInto<FourCC>
. For example -b"Exif"
. - BREAKING: Changed order of arguments of method
ImageHandle::metadata_block_ids()
.
- Added methods
Image::width()
andImage::height()
for receiving width and height of the main image channel (Y in YCbCr, or any in RGB). - Added method
Image::storage_bits_per_pixel()
. This method returns the number of bits used for storage of each pixel. - Added methods
Image::set_color_profile_raw()
andImage::set_color_profile_nclx()
. - Added field
storage_bits_per_pixel
into structurePlane
. - Added method
ColorProfileRaw::new()
. - Methods
new
andset_color_primaries
were added into structureColorProfileNCLX
.
- BREAKING: Old methods
Image::width(channel)
andImage::height(channel)
were renamed intoImage::channel_width(channel)
andImage::channel_height(channel)
. The return type of these methods was changed fromResult<u32>
toOption<u32>
. - BREAKING: The return type of method
Image::bits_per_pixel()
was changed fromResult<u8>
toOption<u8>
. - BREAKING: Method
Image::bits_per_pixel()
now returns the number of bits used for representing the pixel value, which might be smaller than the number of bits used in memory. - BREAKING: Fixed typo in name of field
Plane::bits_pre_pixel
. This field was renamed intoPlane::bits_per_pixel
. - Structures
Plane
andPlanes
were exposed in public interface of the crate.
libheif-sys
updated to version 1.14.2.- Added new value of
HeifErrorCode
enum -PluginLoadingError
. - Added new value of
HeifErrorSubCode
enum:UnknownNclxColorPrimaries
,UnknownNclxTransferCharacteristics
,UnknownNclxMatrixCoefficients
,UnsupportedHeaderCompressionMethod
,PluginLoadingError
,PluginIsNotLoaded
,CannotReadPluginDirectory
,Unknown
. - Struct
Encoder
exposed in public interface of the crate. - Added enum
ImageOrientation
. - Added methods
Encoder::image_orientation()
andEncoder::set_image_orientation()
. - Added struct
DecodingOptions
. - Added type
ColorProfleType
. - Added structs
ColorProfileRaw
andColorProfileNCLX
. - Added methods
Image::color_profile_raw()
andImage::color_profile_nclx()
. - Added methods
ImageHandle::color_profile_raw()
andImageHandle::color_profile_nclx()
.
- Argument
ignore_transformations
ofImageHandle::decode()
method was replaced on argumentdecoding_options
. - Removed deprecated methods:
ImageHandle::list_of_depth_image_ids()
,ImageHandle::list_of_thumbnail_ids()
,ImageHandle::list_of_metadata_block_ids()
.
- Added method
Encoder::set_parameter_value()
.
libheif-sys
updated to version 1.12.- Added new value of
HeifErrorSubCode
enum -WrongTileImagePixelDepth
. - Added methods:
Image::set_premultiplied_alpha()
,Image::is_premultiplied_alpha()
,ImageHandle::is_premultiplied_alpha()
.
- Added new methods:
ImageHandle::depth_image_ids()
,ImageHandle::thumbnail_ids()
,ImageHandle::metadata_block_ids()
. - Deprecated some methods:
ImageHandle::list_of_depth_image_ids()
,ImageHandle::list_of_thumbnail_ids()
,ImageHandle::list_of_metadata_block_ids()
. - Added new methods for getting top level images from
HeifContext
:HeifContext::top_level_image_ids()
,HeifContext::image_handle()
.
libheif-sys
updated to version 1.11.- Added methods:
EncodingOptions::mac_os_compatibility_workaround_no_nclx_profile()
,EncodingOptions::set_mac_os_compatibility_workaround_no_nclx_profile()
.
- Added new value of
HeifErrorCode
enum -ColorProfileDoesNotExist
.
libheif-sys
updated to version 1.10.
- All fields of
EncodingOptions
struct are made private. Added corresponding methods for access to these fields. - Method
HeifContext::encode_image()
now returnsResult<ImageHandle>
.
Image
has marked asSend
.
libheif-sys
updated to version 1.8.- Added new compression format -
CompressionFormat::Av1
. - Added new values of
HeifErrorSubCode
enum:InvalidFractionalNumber
,InvalidImageSize
,InvalidPixiBox
,NoAv1cBox
.
- Implemented
std::error::Error
forHeifError
(paolobarbolini).
- Removed
num
,num-traits
andnum-derive
from dependencies. - Added
enumn
as dependency.
- Updated versions of dependencies.
- Added argument
ignore_transformations
into methodImageHandle::decode()
.
- Added method
ImageHandle::set_primary()
.
- Removed dependency from
failure
crate. - Added type
Result<T>
as alias forstd::result::Result<T, HeifError>
. ImageHandle::is_primary_image
method renamed toImageHandle::is_primary
.
- Separate enums
ColorSpace
andChroma
replaced by one complex enumColorSpace
. libheif-sys
updated to version 1.5.
- Added function
check_file_type
that checks file type by it first bytes.
- Renamed some values of
HeifErrorCode
andHeifErrorSubCode
enums.
- Added method
HeifContext::read_from_reader()
to create context form any object that implements theReader
trait.
- Specified lifetime of
ImageHandle
. Now it depends onHeifContext
. HeifContext
implements theSend
trait now.
- Fixed filtering of metadata blocks by type.
- Changed URL of the crate documentation.
- Added small example of usage into README.md.
- Changed some enum values and name of methods to comply with the Rust naming conventions.
- Methods
Encoder::set_lossless()
andEncoder::set_lossy_quality()
replaced byEncoder::set_quality()
. - Added methods
Image::planes()
andImage::planes_mut()
.
- Initial version.