/*******************************************************************
 * File:     ifc
 * Purpose:  ImageFileConvert interface library
 * Author:   Justin Fletcher
 * Date:     07 Jun 2003
 *
 * Copyright (C) 2003 Justin Fletcher
 *
 *  This software is provided 'as-is', without any express or implied
 *  warranty.  In no event will the authors be held liable for any damages
 *  arising from the use of this software.
 *
 *  Permission is granted to anyone to use this software for any purpose,
 *  including commercial applications, and to alter it and redistribute it
 *  freely, subject to the following restrictions:
 *
 *  1. The origin of this software must not be misrepresented; you must not
 *     claim that you wrote the original software. If you use this software
 *     in a product, an acknowledgment in the product documentation would be
 *     appreciated but is not required.
 *  2. Altered source versions must be plainly marked as such, and must not
 *     be misrepresented as being the original software.
 *  3. This notice may not be removed or altered from any source
 *     distribution.
 *
 ******************************************************************/

#ifndef IFC_H
#define IFC_H

/*************************************************** Gerph *********
 Function:     ifc_convert
 Description:  Convert a buffer from one format to another
 Parameters:   srcbuf-> the source buffer (word aligned)
               srclen = length of the source buffer
               srctype = the filetype of the source data
               desttype = the filetype of the destination data
               background = background colour to compose against, or
                            -1 for the natural background
               destbufp-> where to store the destination buffer pointer
                          will be allocated with malloc/realloc and must
                          therefore be freed with free.
               destlenp-> where to store the destination buffer length
 Returns:      pointer to error, or NULL if conversion successful
 ******************************************************************/
_kernel_oserror *ifc_convert(const char *srcbuf, size_t srclen,
                             unsigned long srctype, unsigned long desttype,
                             unsigned long background,
                             char **destbufp, size_t *destlenp);

#endif
