dmio 0.1.2

A shared library providing functionality to read, write and modify files saved in the DigitalMicrograph file format (version 3 or 4)
Documentation
/*
 * Copyright 2018 Christian Ebner
 *
 * This file is part of dmio.
 *
 * dmio is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * dmio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with dmio.  If not, see <http://www.gnu.org/licenses/>.
 */

extern crate log;
extern crate log4rs;
extern crate dmio;

#[test]
fn test_dmimage_open_and_save_as() {
    log4rs::init_file("./tests/log4rs.yaml", Default::default()).unwrap();

    let mut img1 = dmio::DMImage::open("./testfiles/dm3_image.dm3").unwrap();
    let mut img2 = dmio::DMImage::open("./testfiles/dm4_image.dm4").unwrap();
    img1.save_as::<dmio::DM3Writer>("./testfiles/dmimage_save_as_dm3.dm3").unwrap();
    img2.save_as::<dmio::DM4Writer>("./testfiles/dmimage_save_as_dm4.dm4").unwrap();
}