Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

67 linhas
1.9 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;
  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. } options_t;
  47. enum imagetypes {
  48. Raw_Image='r',
  49. MCIR='m',
  50. Palleted='p',
  51. Temperature='t',
  52. Channel_A='a',
  53. Channel_B='b',
  54. Distribution='d'
  55. };
  56. enum effects {
  57. Crop_Telemetry='t',
  58. Histogram_Equalise='h',
  59. Denoise='d',
  60. Precipitation_Overlay='p',
  61. Flip_Image='f',
  62. Linear_Equalise='l'
  63. };