fosgra.h
Go to the documentation of this file.
/*
* FOS libfosgra: Smaky [.IMAGE|.COLOR] decoder
* Copyright (C) 2009-2010 Mathieu Schroeter <mathieu@schroetersa.ch>
*
* Thanks to Pierre Arnaud for his help and the documentation
* And to Epsitec SA for the Smaky computers
*
* This file is part of Fosfat.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef FOSGRA_H
#define FOSGRA_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <inttypes.h>
#include <fosfat.h>
uint32_t fosgra_color_get (fosfat_t *fosfat, const char *path, uint8_t idx);
uint8_t *fosgra_get_buffer (fosfat_t *fosfat,
const char *path, int offset, int size);
void fosgra_get_info (fosfat_t *fosfat,
const char *path, uint16_t *x, uint16_t *y, uint8_t *bpp);
int fosgra_is_image (fosfat_t *fosfat, const char *path);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* FOSGRA_H */
fosfat.h
fosfat_t
struct fosfat_s fosfat_t
Definition fosfat.h:104
fosgra_is_image
int fosgra_is_image(fosfat_t *fosfat, const char *path)
Test if the file is a .IMAGE|.COLOR.
fosgra_get_buffer
uint8_t * fosgra_get_buffer(fosfat_t *fosfat, const char *path, int offset, int size)
Get decoded .IMAGE|.COLOR buffer.
fosgra_get_info
void fosgra_get_info(fosfat_t *fosfat, const char *path, uint16_t *x, uint16_t *y, uint8_t *bpp)
Get informations on the .IMAGE|.COLOR.
fosgra_color_get
uint32_t fosgra_color_get(fosfat_t *fosfat, const char *path, uint8_t idx)
Get the color RGB24 from a .COLOR index.