소스 검색

Better output filenames

Martijn Braam 4 년 전
부모
커밋
26fab100bb
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      main.c

+ 3 - 3
main.c

@@ -407,10 +407,10 @@ process_image(const int *p, int size)
 	if (capture) {
 		time(&rawtime);
 		tim = *(localtime(&rawtime));
-		strftime(timestamp, 30, "%F %T", &tim);
-		sprintf(fname, "%s/Pictures/Photo-%s.jpg", getenv("HOME"), timestamp);
+		strftime(timestamp, 30, "%Y%m%d%H%M%S", &tim);
+		sprintf(fname, "%s/Pictures/IMG%s.jpg", getenv("HOME"), timestamp);
 		printf("Saving image\n");
-		gdk_pixbuf_save(pixbufrot, fname, "jpeg", &error, "quality", "100", NULL);
+		gdk_pixbuf_save(pixbufrot, fname, "jpeg", &error, "quality", "95", NULL);
 		if (error != NULL) {
 			g_printerr(error->message);
 			g_clear_error(&error);