@@ -200,7 +200,6 @@ impl ImageFileDirectory {
200
200
let ( tag_name, tag_value) = read_tag ( cursor, bigtiff) . await ?;
201
201
tags. insert ( tag_name, tag_value) ;
202
202
}
203
- dbg ! ( & tags) ;
204
203
205
204
// Tag 2 bytes
206
205
// Type 2 bytes
@@ -283,7 +282,6 @@ impl ImageFileDirectory {
283
282
let mut other_tags = HashMap :: new ( ) ;
284
283
285
284
tag_data. drain ( ) . try_for_each ( |( tag, value) | {
286
- dbg ! ( & tag) ;
287
285
match tag {
288
286
Tag :: NewSubfileType => new_subfile_type = Some ( value. into_u32 ( ) ?) ,
289
287
Tag :: ImageWidth => image_width = Some ( value. into_u32 ( ) ?) ,
@@ -297,17 +295,11 @@ impl ImageFileDirectory {
297
295
PhotometricInterpretation :: from_u16 ( value. into_u16 ( ) ?)
298
296
}
299
297
Tag :: ImageDescription => image_description = Some ( value. into_string ( ) ?) ,
300
- Tag :: StripOffsets => {
301
- dbg ! ( & value) ;
302
- strip_offsets = Some ( value. into_u64_vec ( ) ?)
303
- }
298
+ Tag :: StripOffsets => strip_offsets = Some ( value. into_u64_vec ( ) ?) ,
304
299
Tag :: Orientation => orientation = Some ( value. into_u16 ( ) ?) ,
305
300
Tag :: SamplesPerPixel => samples_per_pixel = Some ( value. into_u16 ( ) ?) ,
306
301
Tag :: RowsPerStrip => rows_per_strip = Some ( value. into_u32 ( ) ?) ,
307
- Tag :: StripByteCounts => {
308
- dbg ! ( & value) ;
309
- strip_byte_counts = Some ( value. into_u64_vec ( ) ?)
310
- }
302
+ Tag :: StripByteCounts => strip_byte_counts = Some ( value. into_u64_vec ( ) ?) ,
311
303
Tag :: MinSampleValue => min_sample_value = Some ( value. into_u16_vec ( ) ?) ,
312
304
Tag :: MaxSampleValue => max_sample_value = Some ( value. into_u16_vec ( ) ?) ,
313
305
Tag :: XResolution => match value {
@@ -447,9 +439,6 @@ impl ImageFileDirectory {
447
439
// https://web.archive.org/web/20240329145253/https://www.awaresystems.be/imaging/tiff/tifftags/planarconfiguration.html
448
440
PlanarConfiguration :: Chunky
449
441
} else {
450
- dbg ! ( planar_configuration) ;
451
- dbg ! ( samples_per_pixel) ;
452
- println ! ( "planar_configuration not found and samples_per_pixel not 1" ) ;
453
442
PlanarConfiguration :: Chunky
454
443
} ;
455
444
Ok ( Self {
@@ -853,7 +842,6 @@ async fn read_tag(cursor: &mut AsyncCursor, bigtiff: bool) -> AsyncTiffResult<(T
853
842
let tag_type = Type :: from_u16 ( tag_type_code) . expect (
854
843
"Unknown tag type {tag_type_code}. TODO: we should skip entries with unknown tag types." ,
855
844
) ;
856
- dbg ! ( tag_name, tag_type) ;
857
845
let count = if bigtiff {
858
846
cursor. read_u64 ( ) . await ?
859
847
} else {
@@ -902,7 +890,6 @@ async fn read_tag_value(
902
890
// Case 2: there is one value.
903
891
if count == 1 {
904
892
// 2a: the value is 5-8 bytes and we're in BigTiff mode.
905
- dbg ! ( "case 2a" ) ;
906
893
if bigtiff && value_byte_length > 4 && value_byte_length <= 8 {
907
894
let mut data = cursor. read ( value_byte_length) . await ?;
908
895
@@ -932,7 +919,6 @@ async fn read_tag_value(
932
919
let mut data = cursor. read ( value_byte_length) . await ?;
933
920
934
921
// 2b: the value is at most 4 bytes or doesn't fit in the offset field.
935
- dbg ! ( "case 2b" ) ;
936
922
return Ok ( match tag_type {
937
923
Type :: BYTE | Type :: UNDEFINED => Value :: Byte ( data. read_u8 ( ) ?) ,
938
924
Type :: SBYTE => Value :: Signed ( data. read_i8 ( ) ? as i32 ) ,
@@ -989,7 +975,6 @@ async fn read_tag_value(
989
975
990
976
// Case 3: There is more than one value, but it fits in the offset field.
991
977
if value_byte_length <= 4 || bigtiff && value_byte_length <= 8 {
992
- dbg ! ( "case 3" ) ;
993
978
let mut data = cursor. read ( value_byte_length) . await ?;
994
979
if bigtiff {
995
980
cursor. advance ( 8 - value_byte_length) ;
@@ -1091,7 +1076,6 @@ async fn read_tag_value(
1091
1076
cursor. seek ( offset) ;
1092
1077
1093
1078
// Case 4: there is more than one value, and it doesn't fit in the offset field.
1094
- dbg ! ( "case 4" ) ;
1095
1079
match tag_type {
1096
1080
// TODO check if this could give wrong results
1097
1081
// at a different endianess of file/computer.
0 commit comments