args.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. Comapre Args
  3. Copyright (C) 2006 Yangli Hector Yee
  4. This program is free software; you can redistribute it and/or modify it under the terms of the
  5. GNU General Public License as published by the Free Software Foundation; either version 2 of the License,
  6. or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  8. without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. See the GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License along with this program;
  11. if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
  12. */
  13. #ifndef _ARGS_H
  14. #define _ARGS_H
  15. #include "pdiff.h"
  16. /* Args to pass into the comparison function */
  17. typedef struct _args
  18. {
  19. cairo_surface_t *surface_a; /* Image A */
  20. cairo_surface_t *surface_b; /* Image B */
  21. bool Verbose; /* Print lots of text or not */
  22. float FieldOfView; /* Field of view in degrees */
  23. float Gamma; /* The gamma to convert to linear color space */
  24. float Luminance; /* the display's luminance */
  25. unsigned int ThresholdPixels; /* How many pixels different to ignore */
  26. } args_t;
  27. void
  28. args_init (args_t *args);
  29. void
  30. args_fini (args_t *args);
  31. bool
  32. args_parse (args_t *args, int argc, char **argv);
  33. void
  34. args_print (args_t *args);
  35. #endif