Skip to content

Instantly share code, notes, and snippets.

@SamWhited
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamWhited/598a6a2dd2a56d6077e0 to your computer and use it in GitHub Desktop.
Save SamWhited/598a6a2dd2a56d6077e0 to your computer and use it in GitHub Desktop.
Print all cameras supported by the currently linked version of libraw
#include <libraw.h>
#include <stdio.h>
int main()
{
const char** list = libraw_cameraList();
for (int i = 0; i < libraw_cameraCount(); i++) {
printf(list[i]);
printf("\n");
}
return 0;
}
.PHONY: build
all: cameras
cameras: cameras.c
gcc -I/usr/include/libraw $< -o $@ -lraw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment