Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/draw_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mod fk {
#[cfg(feature = "png")]
use std::fs::*;
#[cfg(feature = "png")]
use std::io::BufWriter;
use std::io::{BufWriter, Write};

use crate::stroke::*;
use crate::{IntRect, IntPoint, Point, Transform, Vector};
Expand Down Expand Up @@ -1102,7 +1102,7 @@ impl<Backing : AsRef<[u32]> + AsMut<[u32]>> DrawTarget<Backing> {

/// Saves the current pixels to a png and writes it to `w`
#[cfg(feature = "png")]
pub fn write_png_to_writer<W: Write>(&self, w: Write) -> Result<(), png::EncodingError> {
pub fn write_png_to_writer<W: Write>(&self, w: W) -> Result<(), png::EncodingError> {
let mut encoder = png::Encoder::new(w, self.width as u32, self.height as u32);
encoder.set_color(png::ColorType::Rgba);
encoder.set_depth(png::BitDepth::Eight);
Expand Down