소스 검색

Changed the output to go to stdout to more conform to the unix philosophy

Dan Hintz - Arch 5 년 전
부모
커밋
318714c0fe
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      frames2img.c

+ 3 - 3
frames2img.c

@@ -35,8 +35,8 @@ int main(int argc, char **argv){
 		free(buffer);
 		png_image_free(&image);
 
-		fprintf(stdout, "%d%% Complete\r", ++percent * 100 / argc);
-		fflush(stdout);
+		fprintf(stderr, "%d%% Complete\r", ++percent * 100 / argc);
+		fflush(stderr);
 	}
 	uint8 *imgPointer = malloc(height*width*3*sizeof(uint8 *));
 
@@ -55,7 +55,7 @@ int main(int argc, char **argv){
 	output.width = width;
 	output.height = height;
 
-	png_image_write_to_file(&output, imageFileName, 0, imgPointer, 0, NULL);
+	png_image_write_to_stdio(&output, stdout, 0, imgPointer, 0, NULL);
 
 	free(imgPointer);
 	free(frames);