No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

common.h 1.7 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. // Useful macros
  22. #define CLIP(v, lo, hi) (v > hi ? hi : (v > lo ? v : lo))
  23. #define CONTAINS(str, char) (strchr(str, (int) char) != NULL)
  24. // Typedefs
  25. #ifndef STRUCTS_DEFINED
  26. #define STRUCTS_DEFINED
  27. typedef struct {
  28. char *type; // Output image type
  29. char *effects; // Effects on the image
  30. int satnum; // The satellite number
  31. char *map; // Path to a map file
  32. char *path; // Output directory
  33. int realtime; // Realtime decoding
  34. char *filename; // Output filename
  35. char *palette; // Filename of palette
  36. float gamma; // Gamma
  37. int mapOffset;
  38. } options_t;
  39. enum imagetypes {
  40. Raw_Image='r',
  41. MCIR='m',
  42. Palleted='p',
  43. Temperature='t',
  44. Channel_A='a',
  45. Channel_B='b',
  46. Distribution='d'
  47. };
  48. enum effects {
  49. Crop_Telemetry='t',
  50. Histogram_Equalise='h',
  51. Denoise='d',
  52. Precipitation_Overlay='p',
  53. Flip_Image='f',
  54. Linear_Equalise='l',
  55. Crop_Noise='c'
  56. };
  57. #endif