Make the error module public

This commit is contained in:
SethDusek 2017-06-19 01:47:51 +05:00
parent b82445711f
commit 9026c1504d
2 changed files with 2 additions and 23 deletions

View file

@ -1,21 +0,0 @@
#!/usr/bin/env python
import subprocess;
from time import time;
from sys import exit;
from os.path import isfile;
results = [];
filename = "bench.png"
if not isfile(filename):
print("Invalid file");
exit(1);
for opt_level in range(1, 7):
start_time = time();
command = subprocess.Popen(["oxipng", "-o", str(opt_level), "-q", "--stdout", filename], stdout=subprocess.PIPE);
size = len(command.communicate()[0]);
result_time = time()-start_time;
results.append({"program": "oxipng", "opt_level": opt_level, "time": result_time, "size": size});
for result in results:
print("%s -o%s: \n Time: %ss \n Size: %s bytes" % (result["program"], result["opt_level"], result["time"], result["size"]));

View file

@ -13,7 +13,7 @@ extern crate rayon;
extern crate zopfli;
use deflate::Deflaters;
use error::PngError;
pub use error::PngError;
use image::{GenericImage, Pixel, ImageFormat};
use headers::Headers;
use png::PngData;
@ -25,7 +25,7 @@ use std::path::{Path, PathBuf};
pub mod colors;
pub mod deflate;
mod error;
pub mod error;
mod filters;
pub mod headers;
mod interlace;