Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

71 rader
2.0 KiB

  1. /*
  2. * This file is part of Aptdec.
  3. * Copyright (c) 2004-2009 Thierry Leconte (F4DWV), Xerbo (xerbo@protonmail.com) 2019-2020
  4. *
  5. * Aptdec is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. *
  18. */
  19. // Constants
  20. #define VERSION "Aptdec; (c) 2004-2009 Thierry Leconte F4DWV, Xerbo (xerbo@protonmail.com) 2019-2020"
  21. #define MAX_HEIGHT 3000
  22. // Useful macros
  23. #define CLIP(v, lo, hi) (v > hi ? hi : (v > lo ? v : lo))
  24. #define CONTAINS(str, char) (strchr(str, (int) char) != NULL)
  25. // Typedefs
  26. typedef struct {
  27. float r, g, b;
  28. } rgb_t;
  29. typedef struct {
  30. float *prow[MAX_HEIGHT]; // Row buffers
  31. int nrow; // Number of rows
  32. int zenith; // Row in image where satellite reaches peak elevation
  33. int chA, chB; // ID of each channel
  34. char name[256]; // Stripped filename
  35. char *palette; // Filename of palette
  36. } image_t;
  37. typedef struct {
  38. char *type; // Output image type
  39. char *effects; // Effects on the image
  40. int satnum; // The satellite number
  41. char *map; // Path to a map file
  42. char *path; // Output directory
  43. int realtime; // Realtime decoding
  44. char *filename; // Output filename
  45. char *palette; // Filename of palette
  46. float gamma; // Gamma
  47. int mapOffset;
  48. } options_t;
  49. enum imagetypes {
  50. Raw_Image='r',
  51. MCIR='m',
  52. Palleted='p',
  53. Temperature='t',
  54. Channel_A='a',
  55. Channel_B='b',
  56. Distribution='d'
  57. };
  58. enum effects {
  59. Crop_Telemetry='t',
  60. Histogram_Equalise='h',
  61. Denoise='d',
  62. Precipitation_Overlay='p',
  63. Flip_Image='f',
  64. Linear_Equalise='l',
  65. Crop_Noise='c'
  66. };