I have see that decode will be deprecated but with the lib I use today with my rust code it is the only way I found to make it works.
Now, I can have a image that is rotated. So If I use this way, I have only a part of a image.
I would like to check the width and the height of the original image to see if I need to rotate it or not.
But I do not found a way to get the original size of the image in my typst code.
Is there a way to do that, or maybe a auto rotate to take all the place ?
/// Create an image that can be used with the magnify functions.
/// Must be used with `source()` function.
///
/// Note. You can use standard `image` by providing both width and height.
#let image(source, ..args) = {
assert(
type(source) == bytes,
message: "Use source() function as the first argument",
)
let image = std.image.with(source, ..args)
context image(..measure(image()))
}