Two small docs improvements

This commit is contained in:
Laurenz 2025-01-30 19:40:23 +01:00
parent 776c6d1923
commit 1e641be5b2
2 changed files with 12 additions and 2 deletions

View File

@ -84,13 +84,22 @@ pub struct ImageElem {
/// ///
/// ```example /// ```example
/// #image( /// #image(
/// read(
/// "tetrahedron.svg",
/// encoding: none,
/// ),
/// format: "svg",
/// width: 2cm,
/// )
///
/// #image(
/// bytes(range(16).map(x => x * 16)), /// bytes(range(16).map(x => x * 16)),
/// format: ( /// format: (
/// encoding: "luma8", /// encoding: "luma8",
/// width: 4, /// width: 4,
/// height: 4, /// height: 4,
/// ), /// ),
/// width: 1cm, /// width: 2cm,
/// ) /// )
/// ``` /// ```
pub format: Smart<ImageFormat>, pub format: Smart<ImageFormat>,

View File

@ -221,7 +221,8 @@ pub enum ExchangeFormat {
Png, Png,
/// Lossy raster format suitable for photos. /// Lossy raster format suitable for photos.
Jpg, Jpg,
/// Raster format that is typically used for short animated clips. /// Raster format that is typically used for short animated clips. Typst can
/// load GIFs, but they will become static.
Gif, Gif,
} }