Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

nojpeg.c

Go to the documentation of this file.
00001 /*===========================================================================*
00002  * nojpeg.c                                                                  *
00003  *                                                                           *
00004  *      procedures to deal with JPEG files                                   *
00005  *                                                                           *
00006  * EXPORTED PROCEDURES:                                                      *
00007  *      JMovie2JPEG                                                          *
00008  *      ReadJPEG                                                             *
00009  *                                                                           *
00010  *===========================================================================*/
00011 
00012 /*
00013  * Copyright (c) 1995 The Regents of the University of California.
00014  * All rights reserved.
00015  *
00016  * Permission to use, copy, modify, and distribute this software and its
00017  * documentation for any purpose, without fee, and without written agreement is
00018  * hereby granted, provided that the above copyright notice and the following
00019  * two paragraphs appear in all copies of this software.
00020  *
00021  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
00022  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
00023  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
00024  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00025  *
00026  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
00027  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
00028  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
00029  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
00030  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
00031  */
00032 
00033 /*  
00034  *  $Header: /misc/elrond0/share/cvs/AFNI/src/mpeg_encodedir/nojpeg.c,v 1.4 2004/04/02 15:12:40 rwcox Exp $
00035  *  $Log: nojpeg.c,v $
00036  *  Revision 1.4  2004/04/02 15:12:40  rwcox
00037  *  Cput
00038  *
00039  *  Revision 1.3  2003/12/23 13:50:08  rwcox
00040  *  Cput
00041  *
00042  *  Revision 1.2  2003/12/03 14:46:14  rwcox
00043  *  Cput
00044  *
00045  *  Revision 1.1  2001/12/17 16:11:55  rwcox
00046  *  Cadd
00047  *
00048  * Revision 1.2  1995/01/19  23:08:55  eyhung
00049  * Changed copyrights
00050  *
00051  * Revision 1.1  1994/03/15  00:27:11  keving
00052  * nothing
00053  *
00054  * Revision 1.2  1993/12/22  19:19:01  keving
00055  * nothing
00056  *
00057  * Revision 1.1  1993/07/22  22:23:43  keving
00058  * nothing
00059  *
00060  */
00061 
00062 /*==============*
00063  * HEADER FILES *
00064  *==============*/
00065 
00066 #include "all.h"
00067 #include "mtypes.h"
00068 #include "frames.h"
00069 #include "prototypes.h"
00070 #include "param.h"
00071 #include "readframe.h"
00072 #include "fsize.h"
00073 #include "rgbtoycc.h"
00074 #include "jpeg.h"
00075 
00076 
00077 
00078 /*=======================================================================*
00079  *                                                                       *
00080  * JMovie2JPEG                                                           *
00081  *                                                                       *
00082  *      Splits up a Parallax J_Movie into a set of JFIF image files      *
00083  *                                                                       *
00084  * RETURNS:     nothing                                                  *
00085  *                                                                       *
00086  * SIDE EFFECTS:    none                                                 *
00087  *                                                                       *
00088  *   Contributed By James Boucher(jboucher@flash.bu.edu)                 *
00089  *               Boston University Multimedia Communications Lab         *
00090  * This code was adapted from the Berkeley Playone.c and Brian Smith's   *
00091  * JGetFrame code after being modified on 10-7-93 by Dinesh Venkatesh    *
00092  * of BU.                                                                *
00093  *       This code converts a version 2 Parallax J_Movie into a          *
00094  * set of JFIF compatible JPEG images. It works for all image            *
00095  * sizes and qualities.                                                  *
00096  ************************************************************************/
00097 void
00098 JMovie2JPEG(infilename,obase,start,end)
00099     char *infilename;       /* input filename string */
00100     char *obase;            /* output filename base string=>obase##.jpg */ 
00101     int start;              /* first frame to be extracted */
00102     int end;                /* last frame to be extracted */
00103 {
00104     fprintf(stderr, "ERROR:  This has not been compiled with JPEG support\n");
00105     exit(1);
00106 }
00107 
00108 
00109 
00110 
00111 /*===========================================================================*
00112  *
00113  * ReadJPEG  contributed by James Arthur Boucher of Boston University's
00114  *                                Multimedia Communications Lab
00115  *
00116  *      read a JPEG file and copy data into frame original data arrays
00117  *
00118  * RETURNS:     mf modified
00119  *
00120  * SIDE EFFECTS:    none
00121  *
00122  *===========================================================================*/
00123 /*************************JPEG LIBRARY INTERFACE*********************/
00124 /*
00125  * THE BIG PICTURE:
00126  *
00127  * The rough outline this JPEG decompression operation is:
00128  *
00129  *      allocate and initialize JPEG decompression object
00130  *      specify data source (eg, a file)
00131  *      jpeg_read_header();     // obtain image dimensions and other parameters
00132  *      set parameters for decompression
00133  *      jpeg_start_decompress();
00134  *      while (scan lines remain to be read)
00135  *              jpeg_read_scanlines(...);
00136  *      jpeg_finish_decompress();
00137  *      release JPEG decompression object
00138  *
00139  */
00140 void
00141 ReadJPEG(mf, fp)
00142     MpegFrame *mf;
00143     FILE *fp;
00144 {
00145     fprintf(stderr, "ERROR:  This has not been compiled with JPEG support\n");
00146     exit(1);
00147 }
 

Powered by Plone

This site conforms to the following standards: