# Tiler

Command-line tool for generating deepzoom tiles.

## Environment

- Node.js v24.11.1 (LTS)
- npm 11.6.2

### Upgrade Information

Upgraded from Node.js v10.16.3 to support modern Node.js LTS versions

## Install

```bash
npm i -g @ou-imdt/tiler
```

## Command to Sanitise File names

The following command expects a filepath to a directory, it will attempt to recursively parse through any subfolders sanitising file names by removing spaces, commas and setting them to lower-case.

This is to be used on a folder of source images before tile processing.

**Command signature:**

```bash
tiler sanitise [filepath]
```

**Example:**

```bash
tiler sanitise ./path/to/folder
```

## Command to Process Tiles

**Command signature:**

```bash
tiler tile [input] [output] [format]
```

**Command example 1:**

```bash
tiler tile ./source-folder ./output-folder zoomify
```

**Command example 2:**

```bash
tiler tile ./source-folder ./output-folder deepzoom
```

**Command example 3 (defaults to deepzoom):**

```bash
tiler tile ./source-folder ./output-folder
```

## Supported Formats

- **deepzoom** (default) - Microsoft Deep Zoom format
- **zoomify** - Zoomify format

## Supported Image Formats

- JPEG (.jpg, .jpeg)
- PNG (.png) 
- TIFF (.tiff)

## Requirements

This tool requires:
- Node.js v20+ (LTS)
- Sharp library for image processing
- VIPS binaries (included)

## Version History

- **2.0.0-beta.1** - Upgraded to Node.js LTS, modern dependencies
- **1.0.2** - Legacy version (Node.js v10)
