Documentation
¶
Overview ¶
Package tiffutil provides utilities for TIFF image handling, specifically for converting EPO patent TIFF images to PNG format.
EPO patent images are often in TIFF format with various compressions:
- CCITT Group 3/4 (for black and white technical drawings)
- LZW compression
- CMYK color model (for color images)
This package uses github.com/hhrutter/tiff which provides enhanced TIFF support including CMYK color model handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchTIFFToPNG ¶
BatchTIFFToPNG converts multiple TIFF images to PNG format.
This is useful for converting all pages of a multi-page patent document. Returns a slice of PNG byte slices, one for each input TIFF.
If an error occurs during conversion of any image, the error is returned and processing stops. Successfully converted images up to that point are returned.
func DecodeTIFF ¶
DecodeTIFF decodes TIFF data and returns the image.
This is useful if you need to perform additional image processing beyond simple PNG conversion.
func TIFFToPNG ¶
TIFFToPNG converts TIFF image data to PNG format.
This function handles various TIFF formats commonly used in patent images:
- CCITT Group 3/4 compression (black and white)
- LZW compression
- CMYK color model
- Uncompressed TIFF
Landscape images (width > height) are automatically rotated 90 degrees counterclockwise to portrait orientation, which is standard for patent drawings.
Returns the PNG image data as bytes.
func TIFFToPNGNoRotate ¶
TIFFToPNGNoRotate converts TIFF to PNG without automatic rotation.
Use this function when you want to preserve the original orientation of the image without automatic landscape-to-portrait conversion.
Types ¶
This section is empty.