Browse Source

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

tags/v1.8.0
Xerbo 2 years ago
parent
commit
093ae0be41
No known key found for this signature in database GPG Key ID: 34103F6D8F11CEB0
2 changed files with 7 additions and 5 deletions
  1. +2
    -2
      src/main.c
  2. +5
    -3
      src/pngio.c

+ 2
- 2
src/main.c View File

@@ -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); ImageOut(opts, &tmpimg, APT_CHB_OFFSET, APT_CH_WIDTH, "Temperature", Temperature, (char *)apt_TempPalette);
} }


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


// Perform visible calibration // Perform visible calibration
apt_calibrate_visible(opts->satnum, &tmpimg, APT_CHA_OFFSET, APT_CH_WIDTH); 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 // Linear equalise


+ 5
- 3
src/pngio.c View File

@@ -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++){ for(unsigned long int i = 0; i < strlen(opts->effects); i++){
switch (opts->effects[i]) { switch (opts->effects[i]) {
case Crop_Telemetry: 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; break;
case Precipitation_Overlay: case Precipitation_Overlay:
greyscale = 0; greyscale = 0;


Loading…
Cancel
Save