@@ -5,7 +5,7 @@ use crate::error::AsyncTiffResult;
5
5
use crate :: predictor:: { FloatingPointPredictor , HorizontalPredictor , NoPredictor , Unpredict } ;
6
6
use crate :: reader:: Endianness ;
7
7
use crate :: tiff:: tags:: {
8
- CompressionMethod , PhotometricInterpretation , PlanarConfiguration , Predictor , SampleFormat ,
8
+ CompressionMethod , PhotometricInterpretation , PlanarConfiguration , Predictor ,
9
9
} ;
10
10
use crate :: tiff:: { TiffError , TiffUnsupportedError } ;
11
11
@@ -17,33 +17,29 @@ use crate::tiff::{TiffError, TiffUnsupportedError};
17
17
/// Also provides convenience functions
18
18
///
19
19
#[ derive( Debug , Clone , Copy ) ]
20
- pub struct PredictorInfo < ' a > {
20
+ pub ( crate ) struct PredictorInfo < ' a > {
21
21
/// endianness
22
- pub endianness : Endianness ,
22
+ pub ( crate ) endianness : Endianness ,
23
23
/// width of the image in pixels
24
- pub image_width : u32 ,
24
+ pub ( crate ) image_width : u32 ,
25
25
/// height of the image in pixels
26
- pub image_height : u32 ,
26
+ pub ( crate ) image_height : u32 ,
27
27
/// chunk width in pixels
28
28
///
29
29
/// If this is a stripped tiff, `chunk_width=image_width`
30
- pub chunk_width : u32 ,
30
+ pub ( crate ) chunk_width : u32 ,
31
31
/// chunk height in pixels
32
- pub chunk_height : u32 ,
32
+ pub ( crate ) chunk_height : u32 ,
33
33
/// bits per sample, as an array
34
34
///
35
35
/// Can also be a single value, in which case it applies to all samples
36
- pub bits_per_sample : & ' a [ u16 ] , // maybe say that we only support a single bits_per_sample?
36
+ pub ( crate ) bits_per_sample : & ' a [ u16 ] , // maybe say that we only support a single bits_per_sample?
37
37
/// number of samples per pixel
38
- pub samples_per_pixel : u16 ,
39
- /// sample format for each sample
40
- ///
41
- /// There is no decoding implementation in this crate (or libtiff) for mixed sample formats
42
- pub sample_format : & ' a [ SampleFormat ] , // and a single sample_format?
38
+ pub ( crate ) samples_per_pixel : u16 ,
43
39
/// planar configuration
44
40
///
45
41
/// determines the bits per pixel
46
- pub planar_configuration : PlanarConfiguration ,
42
+ pub ( crate ) planar_configuration : PlanarConfiguration ,
47
43
}
48
44
49
45
impl PredictorInfo < ' _ > {
@@ -260,10 +256,7 @@ impl Tile<'_> {
260
256
261
257
#[ cfg( test) ]
262
258
mod test {
263
- use crate :: {
264
- reader:: Endianness ,
265
- tiff:: tags:: { PlanarConfiguration , SampleFormat } ,
266
- } ;
259
+ use crate :: { reader:: Endianness , tiff:: tags:: PlanarConfiguration } ;
267
260
268
261
use super :: PredictorInfo ;
269
262
@@ -277,7 +270,6 @@ mod test {
277
270
chunk_height : 8 ,
278
271
bits_per_sample : & [ 8 ] ,
279
272
samples_per_pixel : 1 ,
280
- sample_format : & [ SampleFormat :: Uint ] ,
281
273
planar_configuration : PlanarConfiguration :: Chunky ,
282
274
} ;
283
275
assert_eq ! ( info. bits_per_pixel( ) , 8 ) ;
0 commit comments