summaryrefslogtreecommitdiff
path: root/src/library/insert.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-11-27 20:01:54 +0100
committerLaurenz <laurmaedje@gmail.com>2020-11-27 20:01:54 +0100
commitbc997b7c3380d5f516f0aa58efc3dd513d75fafb (patch)
tree7c16e93800f6e27bb90d87a1d2caefdfedc4e1de /src/library/insert.rs
parentb4f809f1ea8a469d0bdee225f47d7f09bc22aa61 (diff)
Export images in PDF 🖼
Diffstat (limited to 'src/library/insert.rs')
-rw-r--r--src/library/insert.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/insert.rs b/src/library/insert.rs
index 9fe719c7..2904c958 100644
--- a/src/library/insert.rs
+++ b/src/library/insert.rs
@@ -3,7 +3,7 @@ use std::fs::File;
use std::io::BufReader;
use image::io::Reader;
-use image::RgbaImage;
+use image::RgbImage;
use crate::layout::*;
use crate::prelude::*;
@@ -25,7 +25,7 @@ pub fn image(mut args: Args, ctx: &mut EvalContext) -> Value {
.with_guessed_format()
.map_err(|err| err.into())
.and_then(|reader| reader.decode())
- .map(|img| img.into_rgba8())
+ .map(|img| img.into_rgb8())
{
Ok(buf) => {
ctx.push(Image {
@@ -49,7 +49,7 @@ pub fn image(mut args: Args, ctx: &mut EvalContext) -> Value {
#[derive(Clone, PartialEq)]
struct Image {
/// The image.
- buf: RgbaImage,
+ buf: RgbImage,
/// The fixed width, if any.
width: Option<Linear>,
/// The fixed height, if any.