fuzz.c 855 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <stdlib.h>
  2. #include "qcms.h"
  3. int main()
  4. {
  5. unsigned char outt[3];
  6. #define LENGTH 256*256*256
  7. static unsigned char src[LENGTH*3];
  8. static unsigned char output[LENGTH*3];
  9. int i,j,k,l=0;
  10. qcms_profile *input_profile, *output_profile;
  11. qcms_transform *transform;
  12. input_profile = qcms_profile_from_path("lcms_test/input.icc");
  13. output_profile = qcms_profile_from_path("lcms_test/output.icc");
  14. transform = qcms_transform_create(input_profile, QCMS_DATA_RGB_8, output_profile, QCMS_DATA_RGB_8, QCMS_INTENT_PERCEPTUAL);
  15. for (i=0; i<256; i++) {
  16. for (j=0; j<256; j++) {
  17. for (k=0; k<256; k++) {
  18. src[l++] = i;
  19. src[l++] = j;
  20. src[l++] = k;
  21. }
  22. }
  23. }
  24. qcms_transform_data(transform, src, output, LENGTH);
  25. qcms_transform_release(transform);
  26. qcms_profile_release(input_profile);
  27. qcms_profile_release(output_profile);
  28. return 0;
  29. }