JWS C Library
C language utility library
imgblock_io.h
Go to the documentation of this file.
00001 /*
00002  * This work is licensed under a Creative Commons 
00003  * Attribution-Noncommercial-Share Alike 3.0 United States License.
00004  * 
00005  *    http://creativecommons.org/licenses/by-nc-sa/3.0/us/
00006  * 
00007  * You are free:
00008  * 
00009  *    to Share - to copy, distribute, display, and perform the work
00010  *    to Remix - to make derivative works
00011  * 
00012  * Under the following conditions:
00013  * 
00014  *    Attribution. You must attribute the work in the manner specified by the
00015  *    author or licensor (but not in any way that suggests that they endorse you
00016  *    or your use of the work).
00017  * 
00018  *    Noncommercial. You may not use this work for commercial purposes.
00019  * 
00020  *    Share Alike. If you alter, transform, or build upon this work, you may
00021  *    distribute the resulting work only under the same or similar license to
00022  *    this one.
00023  * 
00024  * For any reuse or distribution, you must make clear to others the license
00025  * terms of this work. The best way to do this is by including this header.
00026  * 
00027  * Any of the above conditions can be waived if you get permission from the
00028  * copyright holder.
00029  * 
00030  * Apart from the remix rights granted under this license, nothing in this
00031  * license impairs or restricts the author's moral rights.
00032  */
00033 
00034 
00046 #ifndef IMGBLOCK_IO_H
00047 #define IMGBLOCK_IO_H
00048 
00049 
00050 #include <jwsc/config.h>
00051 
00052 #include <stdlib.h>
00053 
00054 #include "jwsc/base/error.h"
00055 #include "jwsc/image/jiff.h"
00056 #include "jwsc/imgblock/imgblock.h"
00057 
00058 
00059 #ifdef __cplusplus
00060 namespace jwsc {
00061 extern "C" {
00062 #endif
00063 
00064 
00076 Error* read_imgblock_numbered_f
00077 (
00078     Imgblock_f** img_out, 
00079     const char*  fname_fmt,
00080     uint32_t     num_imgs
00081 );
00082 
00099 Error* read_imgblock_named_f
00100 (
00101     Imgblock_f**   img_out, 
00102     const char**   fnames,
00103     uint32_t       num_imgs
00104 );
00105 
00122 Error* write_imgblock_numbered_f
00123 (
00124     const Imgblock_f* img,
00125     const char*       fname_fmt
00126 );
00127 
00144 Error* write_imgblock_named_f
00145 (
00146     const Imgblock_f* img,
00147     const char**      fnames
00148 );
00149 
00166 Error* write_imgblock_as_numbered_jiff_f
00167 (
00168     const Imgblock_f*      img,
00169     const char*            fname_fmt,
00170     const JIFF_attributes* attrs
00171 );
00172 
00189 Error* write_imgblock_as_named_jiff_f
00190 (
00191     const Imgblock_f*      img,
00192     const char**           fnames,
00193     const JIFF_attributes* attrs
00194 );
00195 
00199 #ifdef __cplusplus
00200 }
00201 }
00202 #endif
00203 
00204 
00205 #endif