浏览代码

Stack image types as much as you want

Create a copy of the image before modifying it for temperature calibration
tags/v1.8.0
Xerbo 4 年前
父节点
当前提交
2213e46ddf
共有 2 个文件被更改,包括 11 次插入4 次删除
  1. +1
    -2
      README.md
  2. +10
    -2
      src/main.c

+ 1
- 2
README.md 查看文件

@@ -62,7 +62,7 @@ Apply a falsecolor palette
### Arguments

```
-i [r|a|b|t|m|p] Output type (stackable*)
-i [r|a|b|t|m|p] Output type (stackable)
-e [t|h|l|d|p|f] Effects (stackable)
-o <path> Output filename
-d <path> Destination directory
@@ -73,7 +73,6 @@ Apply a falsecolor palette
-g Gamma adjustment (1.0 = off)
-k Map offset (in px, default: 0)
```
\* Should work with all combinations, but temperature needs to be done last as it calibrates the buffer

### Image output types



+ 10
- 2
src/main.c 查看文件

@@ -227,8 +227,16 @@ static int processAudio(char *filename, options_t *opts){

// Temperature
if (CONTAINS(opts->type, Temperature) && img.chB >= 4) {
temperature(opts, &img, CHB_OFFSET, CH_WIDTH);
ImageOut(opts, &img, CHB_OFFSET, CH_WIDTH, "Temperature", Temperature, (char *)TempPalette);
// Create another buffer as to not modify the orignal
image_t tmpimg = img;
for(int i = 0; i < img.nrow; i++){
tmpimg.prow[i] = (float *) malloc(sizeof(float) * 2150);
memcpy(tmpimg.prow[i], img.prow[i], sizeof(float) * 2150);
}

// Perform temperature calibration
temperature(opts, &tmpimg, CHB_OFFSET, CH_WIDTH);
ImageOut(opts, &tmpimg, CHB_OFFSET, CH_WIDTH, "Temperature", Temperature, (char *)TempPalette);
}

// MCIR


正在加载...
取消
保存