Factor tags into own module
Tag representations are not decoder- or encoder-specific, so should live in their own module accessible to both for reuse. The decoder::ifd module remains since this module is mainly dedicated to decoding the IFD.
This commit is contained in:
1 parent
f9cace84da
commit
f92be13f6c
9 files changed
+242
-238
No files matched your search
@@ -106,7 +106,7 @@ fn test_string_tags() {
|
||||
let path = PathBuf::from(TEST_IMAGE_DIR).join(filename);
|
||||
let img_file = File::open(path).expect("Cannot find test image!");
|
||||
let mut decoder = Decoder::new(img_file).expect("Cannot create decoder");
|
||||
let software = decoder.get_tag(ifd::Tag::Software).unwrap();
|
||||
let software = decoder.get_tag(tiff::tags::Tag::Software).unwrap();
|
||||
match software {
|
||||
ifd::Value::Ascii(s) => assert_eq!(
|
||||
&s,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
extern crate tiff;
|
||||
|
||||
use tiff::decoder::{Decoder, DecodingResult};
|
||||
use tiff::decoder::ifd::Tag;
|
||||
use tiff::encoder::{colortype, TiffEncoder, SRational};
|
||||
use tiff::ColorType;
|
||||
use tiff::tags::Tag;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::{Cursor, Seek, SeekFrom};
|
||||
|
||||
Reference in new issue
Block a user