TIFF files contain metadata about images in their TIFF tags. This function is for reading this information without reading the actual image.
Examples
read_tags(system.file("img", "Rlogo.tif", package = "ijtiff"))
#> $frame1
#> $frame1$width
#> [1] 100
#>
#> $frame1$length
#> [1] 76
#>
#> $frame1$bits_per_sample
#> [1] 8
#>
#> $frame1$samples_per_pixel
#> [1] 4
#>
#> $frame1$sample_format
#> [1] "uint"
#>
#> $frame1$planar_config
#> [1] "contiguous"
#>
#> $frame1$rows_per_strip
#> [1] 76
#>
#> $frame1$compression
#> [1] "LZW"
#>
#> $frame1$x_resolution
#> [1] 299.99
#>
#> $frame1$y_resolution
#> [1] 299.99
#>
#> $frame1$resolution_unit
#> [1] "inch"
#>
#> $frame1$orientation
#> [1] "top_left"
#>
#> $frame1$color_space
#> [1] "RGB"
#>
#>
read_tags(system.file("img", "Rlogo-banana.tif", package = "ijtiff"),
frames = c(2, 4)
)
#> $frame2
#> $frame2$width
#> [1] 100
#>
#> $frame2$length
#> [1] 78
#>
#> $frame2$bits_per_sample
#> [1] 8
#>
#> $frame2$samples_per_pixel
#> [1] 3
#>
#> $frame2$sample_format
#> [1] "uint"
#>
#> $frame2$planar_config
#> [1] "contiguous"
#>
#> $frame2$rows_per_strip
#> [1] 78
#>
#> $frame2$compression
#> [1] "deflate"
#>
#> $frame2$software
#> [1] "ijtiff package, R 4.0.0"
#>
#> $frame2$color_space
#> [1] "black is zero"
#>
#>
#> $frame4
#> $frame4$width
#> [1] 100
#>
#> $frame4$length
#> [1] 78
#>
#> $frame4$bits_per_sample
#> [1] 8
#>
#> $frame4$samples_per_pixel
#> [1] 3
#>
#> $frame4$sample_format
#> [1] "uint"
#>
#> $frame4$planar_config
#> [1] "contiguous"
#>
#> $frame4$rows_per_strip
#> [1] 78
#>
#> $frame4$compression
#> [1] "deflate"
#>
#> $frame4$software
#> [1] "ijtiff package, R 4.0.0"
#>
#> $frame4$color_space
#> [1] "black is zero"
#>
#>