Skip to content

Commit

Permalink
Update libspng to master and expose RawContext for now
Browse files Browse the repository at this point in the history
  • Loading branch information
aloucks committed May 27, 2020
1 parent dc88f66 commit 2b43ddd
Show file tree
Hide file tree
Showing 5 changed files with 490 additions and 93 deletions.
3 changes: 3 additions & 0 deletions spng-sys/build.rs
Expand Up @@ -6,6 +6,9 @@ fn main() {
if let Some(libz_include) = env::var_os("DEP_Z_INCLUDE") {
build.include(libz_include);
}
if cfg!(target_feature = "ssse3") {
build.define("SPNG_SSE", Some("3"));
}
build.compile("spng");

// DEP_SPNG_INCLUDE
Expand Down
12 changes: 12 additions & 0 deletions spng-sys/src/ffi.rs
Expand Up @@ -122,8 +122,20 @@ pub const spng_color_type_SPNG_COLOR_TYPE_INDEXED: spng_color_type = 3;
pub const spng_color_type_SPNG_COLOR_TYPE_GRAYSCALE_ALPHA: spng_color_type = 4;
pub const spng_color_type_SPNG_COLOR_TYPE_TRUECOLOR_ALPHA: spng_color_type = 6;
pub type spng_color_type = i32;
pub const spng_filter_SPNG_FILTER_NONE: spng_filter = 0;
pub const spng_filter_SPNG_FILTER_SUB: spng_filter = 1;
pub const spng_filter_SPNG_FILTER_UP: spng_filter = 2;
pub const spng_filter_SPNG_FILTER_AVERAGE: spng_filter = 3;
pub const spng_filter_SPNG_FILTER_PAETH: spng_filter = 4;
pub type spng_filter = i32;
pub const spng_interlace_method_SPNG_INTERLACE_NONE: spng_interlace_method = 0;
pub const spng_interlace_method_SPNG_INTERLACE_ADAM7: spng_interlace_method = 1;
pub type spng_interlace_method = i32;
pub const spng_format_SPNG_FMT_RGBA8: spng_format = 1;
pub const spng_format_SPNG_FMT_RGBA16: spng_format = 2;
pub const spng_format_SPNG_FMT_RGB8: spng_format = 4;
pub const spng_format_SPNG_FMT_PNG: spng_format = 16;
pub const spng_format_SPNG_FMT_RAW: spng_format = 32;
pub type spng_format = i32;
pub const spng_ctx_flags_SPNG_CTX_IGNORE_ADLER32: spng_ctx_flags = 1;
pub type spng_ctx_flags = i32;
Expand Down

0 comments on commit 2b43ddd

Please sign in to comment.