@@ -5,7 +5,7 @@ use crate::error::AsyncTiffResult;
55use crate :: predictor:: { FloatingPointPredictor , HorizontalPredictor , NoPredictor , Unpredict } ;
66use crate :: reader:: Endianness ;
77use crate :: tiff:: tags:: {
8- CompressionMethod , PhotometricInterpretation , PlanarConfiguration , Predictor , SampleFormat ,
8+ CompressionMethod , PhotometricInterpretation , PlanarConfiguration , Predictor ,
99} ;
1010use crate :: tiff:: { TiffError , TiffUnsupportedError } ;
1111
@@ -17,33 +17,29 @@ use crate::tiff::{TiffError, TiffUnsupportedError};
1717/// Also provides convenience functions
1818///
1919#[ derive( Debug , Clone , Copy ) ]
20- pub struct PredictorInfo < ' a > {
20+ pub ( crate ) struct PredictorInfo < ' a > {
2121 /// endianness
22- pub endianness : Endianness ,
22+ pub ( crate ) endianness : Endianness ,
2323 /// width of the image in pixels
24- pub image_width : u32 ,
24+ pub ( crate ) image_width : u32 ,
2525 /// height of the image in pixels
26- pub image_height : u32 ,
26+ pub ( crate ) image_height : u32 ,
2727 /// chunk width in pixels
2828 ///
2929 /// If this is a stripped tiff, `chunk_width=image_width`
30- pub chunk_width : u32 ,
30+ pub ( crate ) chunk_width : u32 ,
3131 /// chunk height in pixels
32- pub chunk_height : u32 ,
32+ pub ( crate ) chunk_height : u32 ,
3333 /// bits per sample, as an array
3434 ///
3535 /// 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?
3737 /// 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 ,
4339 /// planar configuration
4440 ///
4541 /// determines the bits per pixel
46- pub planar_configuration : PlanarConfiguration ,
42+ pub ( crate ) planar_configuration : PlanarConfiguration ,
4743}
4844
4945impl PredictorInfo < ' _ > {
@@ -260,10 +256,7 @@ impl Tile<'_> {
260256
261257#[ cfg( test) ]
262258mod test {
263- use crate :: {
264- reader:: Endianness ,
265- tiff:: tags:: { PlanarConfiguration , SampleFormat } ,
266- } ;
259+ use crate :: { reader:: Endianness , tiff:: tags:: PlanarConfiguration } ;
267260
268261 use super :: PredictorInfo ;
269262
@@ -277,7 +270,6 @@ mod test {
277270 chunk_height : 8 ,
278271 bits_per_sample : & [ 8 ] ,
279272 samples_per_pixel : 1 ,
280- sample_format : & [ SampleFormat :: Uint ] ,
281273 planar_configuration : PlanarConfiguration :: Chunky ,
282274 } ;
283275 assert_eq ! ( info. bits_per_pixel( ) , 8 ) ;
0 commit comments