1.0.0 • Published 11 months ago

jpg-sdr v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

ParamTypeDescription
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

ParamTypeDescription
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

ParamType
item*
...objany

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

ParamTypeDescription
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

ParamTypeDescription
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

ParamType
silentboolean

test()

Example usage

Kind: global function

1.0.0

11 months ago