jpg-sdr v1.0.0
jpg-sdr
Converts JPEGS from HDR to SDR. Built by @jumpcutking.
Functions
findJpgFiles(dir, fileList) ⇒
Finds all JPG files in a directory and its subdirectories.
Kind: global function
Returns: A list of JPG files found in the directory and its subdirectories
| Param | Type | Description |
|---|---|---|
| dir | * | The directory to search in. |
| fileList | * | The list of JPG files found so far. |
convertToSDR(jpgPath)
Converts an HDR JPG image to an SDR
Kind: global function
| Param | Type | Description |
|---|---|---|
| jpgPath | * | The path to the HDR JPG image |
lg(item, ...obj)
Log function that also stores the log messages in an array. Uses Silent mode to not log to the console.
Kind: global function
| Param | Type |
|---|---|
| item | * |
| ...obj | any |
archiveHDR(directoryPath)
After converting the HDR image to SDR, we need to archive the HDR image. We'll check any jpg file that has a .sdr.jpg file with the same name. If it does will move it to a folder called 'HDR' in the same directory.
Kind: global function
| Param | Type | Description |
|---|---|---|
| directoryPath | * | The directory to search in. |
compressFolder(sourceDir, outputFile, excludePatterns)
Compresses a folder into a ZIP archive while excluding certain files and directories. Example: .old, hdr, node_modules
Kind: global function
| Param | Type | Description |
|---|---|---|
| sourceDir | * | The source directory to compress. |
| outputFile | * | The output ZIP file. |
| excludePatterns | * | An array of patterns to exclude files and directories. |
setSilentMode(silent)
Set the Silent mode to true or false
Kind: global function
| Param | Type |
|---|---|
| silent | boolean |
test()
Example usage
Kind: global function
2 years ago