瀏覽代碼

Dont crop channel images when crop telemetry is on, close #11

tags/v1.8.0
Xerbo 2 年之前
父節點
當前提交
093ae0be41
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 34103F6D8F11CEB0
共有 2 個文件被更改,包括 7 次插入5 次删除
  1. +2
    -2
      src/main.c
  2. +5
    -3
      src/pngio.c

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

@@ -226,7 +226,7 @@ static int processAudio(char *filename, options_t *opts){
ImageOut(opts, &tmpimg, APT_CHB_OFFSET, APT_CH_WIDTH, "Temperature", Temperature, (char *)apt_TempPalette);
}

// Temperature
// Visible
if (CONTAINS(opts->type, Visible) && img.chA <= 2) {
// Create another buffer as to not modify the orignal
apt_image_t tmpimg = img;
@@ -237,7 +237,7 @@ static int processAudio(char *filename, options_t *opts){

// Perform visible calibration
apt_calibrate_visible(opts->satnum, &tmpimg, APT_CHA_OFFSET, APT_CH_WIDTH);
ImageOut(opts, &tmpimg, APT_CHA_OFFSET, APT_CH_WIDTH, "Visible", Visible, (char *)apt_TempPalette);
ImageOut(opts, &tmpimg, APT_CHA_OFFSET, APT_CH_WIDTH, "Visible", Visible, NULL);
}

// Linear equalise


+ 5
- 3
src/pngio.c 查看文件

@@ -223,9 +223,11 @@ int ImageOut(options_t *opts, apt_image_t *img, int offset, int width, char *des
for(unsigned long int i = 0; i < strlen(opts->effects); i++){
switch (opts->effects[i]) {
case Crop_Telemetry:
width -= APT_TOTAL_TELE;
offset += APT_SYNC_WIDTH + APT_SPC_WIDTH;
crop_telemetry = 1;
if (width == 2080) {
width -= APT_TOTAL_TELE;
offset += APT_SYNC_WIDTH + APT_SPC_WIDTH;
crop_telemetry = 1;
}
break;
case Precipitation_Overlay:
greyscale = 0;


Loading…
取消
儲存