blob: 6ba1ebbb452e2a44cbd16e8117d62a1386d9bf5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
$NetBSD: patch-ai,v 1.1 2002/12/21 11:10:02 wiz Exp $
--- batch_mode.c.orig Sat Oct 23 15:50:35 1999
+++ batch_mode.c
@@ -154,6 +154,8 @@ static void DoStreamVideo( TV_BATCH_PARM
if ( STREQ( parm->frame_fmt, "TIFF" ) )
fmt = TV_STILL_FMT_TIFF;
+ else if ( STREQ( parm->frame_fmt, "PNG" ) )
+ fmt = TV_STILL_FMT_PNG;
else if ( STREQ( parm->frame_fmt, "PPM" ) )
fmt = TV_STILL_FMT_PPM;
else if ( STREQ( parm->frame_fmt, "YUV" ) )
@@ -175,6 +177,7 @@ static void DoStreamVideo( TV_BATCH_PARM
if ( parm->video_target && !video2stdout )
switch ( fmt ) {
case TV_STILL_FMT_TIFF : frame_ext = "tif"; break;
+ case TV_STILL_FMT_PNG : frame_ext = "png"; break;
case TV_STILL_FMT_PPM : frame_ext = "ppm"; break;
case TV_STILL_FMT_YUV : frame_ext = "yuv"; break;
default: abort();
@@ -209,7 +212,8 @@ static void DoStreamVideo( TV_BATCH_PARM
return;
/* Sanity check raw data with save type */
- if ( ((( fmt == TV_STILL_FMT_TIFF ) || ( fmt == TV_STILL_FMT_PPM )) &&
+ if ( ((( fmt == TV_STILL_FMT_TIFF ) || ( fmt == TV_STILL_FMT_PNG )
+ || ( fmt == TV_STILL_FMT_PPM )) &&
( img.pix_geom.type != TV_PIXELTYPE_RGB )) ||
(( fmt == TV_STILL_FMT_YUV ) &&
( img.pix_geom.type != TV_PIXELTYPE_YUV )) ) {
|