---
name: "TIFFDataWidth"
section: "3tiff"
platform: "linux"
package: "libtiff-dev"
version: "4.7.0-3+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/TIFFDataWidth"
---

# TIFFDataWidth(3tiff)

get the size of TIFF data types

## NAME

TIFFDataWidth - get the size of TIFF data types

## SYNOPSIS

```
#include <tiffio.h>
```

- **int TIFFDataWidth(TIFFDataType type)**

  ## DESCRIPTION

*TIFFDataWidth()* returns the size of *type* within TIFF file in bytes. Currently following data types are supported:

- •

  **TIFF\_BYTE**

- •

  **TIFF\_ASCII**

- •

  **TIFF\_SBYTE**

- •

  **TIFF\_UNDEFINED**

- •

  **TIFF\_SHORT**

- •

  **TIFF\_SSHORT**

- •

  **TIFF\_LONG**

- •

  **TIFF\_SLONG**

- •

  **TIFF\_FLOAT**

- •

  **TIFF\_IFD**

- •

  **TIFF\_RATIONAL**

- •

  **TIFF\_SRATIONAL**

- •

  **TIFF\_DOUBLE**

- •

  **TIFF\_LONG8**

- •

  **TIFF\_SLONG8**

- •

  **TIFF\_IFD8**

## RETURN VALUES

*TIFFDataWidth()* returns a number of bytes occupied by the item of given type within the TIFF file. 0 returned when unknown data type supplied.

## SEE ALSO

*libtiff* (3tiff)

## AUTHOR

LibTIFF contributors

## COPYRIGHT

1988-2022, LibTIFF contributors
