diff --git a/Cargo.toml b/Cargo.toml index 81da835..71748de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "magick_rust" -version = "0.2.0" +version = "0.2.3" authors = ["Nathan Fiedler "] description = "Selection of Rust bindings for the ImageMagick library." homepage = "https://github.com/nlfiedler/magick-rust" @@ -11,4 +11,4 @@ keywords = ["magickwand", "imagemagick"] build = "build.rs" [dependencies] -libc = "0.1.8" +libc = "0.2.4" diff --git a/src/lib.rs b/src/lib.rs index 610d808..85256fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,7 +33,7 @@ extern crate libc; use std::ffi::CString; use std::ptr; -use libc::{c_uint, size_t, c_double, c_void}; +use libc::{c_uint, c_double, c_void}; use filters::FilterType; mod bindings; @@ -107,7 +107,7 @@ impl MagickWand { filter: FilterType, blur_factor: f64) { unsafe { bindings::MagickResizeImage( - self.wand, width as size_t, height as size_t, + self.wand, width as u64, height as u64, filter as c_uint, blur_factor as c_double ); } @@ -132,7 +132,7 @@ impl MagickWand { unsafe { bindings::MagickResetIterator(self.wand); while bindings::MagickNextImage(self.wand) != bindings::MagickFalse { - bindings::MagickResizeImage(self.wand, new_width as size_t, new_height as size_t, + bindings::MagickResizeImage(self.wand, new_width as u64, new_height as u64, FilterType::LanczosFilter as c_uint, 1.0); } } @@ -156,7 +156,7 @@ impl MagickWand { /// format (e.g. GIF, JPEG, PNG, etc). pub fn write_image_blob(&self, format: &str) -> Result, &'static str> { let c_format = CString::new(format).unwrap(); - let mut length: size_t = 0; + let mut length: u64 = 0; let blob = unsafe { bindings::MagickSetImageFormat(self.wand, c_format.as_ptr()); bindings::MagickResetIterator(self.wand);