1 /*****************************************************************************
2 * This file is part of gfxprim library. *
4 * Gfxprim is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU Lesser General Public *
6 * License as published by the Free Software Foundation; either *
7 * version 2.1 of the License, or (at your option) any later version. *
9 * Gfxprim is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * Lesser General Public License for more details. *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with gfxprim; if not, write to the Free Software *
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17 * Boston, MA 02110-1301 USA *
19 * Copyright (C) 2009-2014 Cyril Hrubis <metan@ucw.cz> *
21 *****************************************************************************/
25 Paint Shop Pro image loader.
27 Loads composite image from a PSP file.
31 #ifndef LOADERS_GP_PSP_H
32 #define LOADERS_GP_PSP_H
34 #include "loaders/GP_Loader.h"
37 * Reads a BMP from an IO stream.
39 * Returns newly allocated pixmap cotaining the loaded image or in case of
40 * failure NULL and errno is set.
42 GP_Pixmap
*GP_ReadPSP(GP_IO
*io
, GP_ProgressCallback
*callback
);
45 * Loads a PSP image from a file.
47 GP_Pixmap
*GP_LoadPSP(const char *src_path
, GP_ProgressCallback
*callback
);
49 int GP_ReadPSPEx(GP_IO
*io
, GP_Pixmap
**img
,
50 GP_DataStorage
*storage
, GP_ProgressCallback
*callback
);
52 int GP_LoadPSPEx(const char *src_path
, GP_Pixmap
**img
,
53 GP_DataStorage
*storage
, GP_ProgressCallback
*callback
);
56 * Looks for PSP file signature. Returns non-zero if found.
58 int GP_MatchPSP(const void *buf
);
60 extern GP_Loader GP_PSP
;
62 #endif /* LOADERS_GP_PSP_H */