Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXIFFImage.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * I F F I m a g e O b j e c t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2004,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXIFFImage.h,v 1.10 2006/01/22 17:58:04 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXIFFIMAGE_H
25 #define FXIFFIMAGE_H
26 
27 #ifndef FXIMAGE_H
28 #include "FXImage.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /**
35 * The IFF Image provides support for the EA/Amiga Image File Format.
36 */
37 class FXAPI FXIFFImage : public FXImage {
39 protected:
41 private:
42  FXIFFImage(const FXIFFImage&);
43  FXIFFImage &operator=(const FXIFFImage&);
44 public:
45  static const FXchar fileExt[];
46  static const FXchar mimeType[];
47 public:
48 
49  /// Construct an image from memory stream formatted as IFF format
50  FXIFFImage(FXApp* a,const void *pix=NULL,FXuint opts=0,FXint w=1,FXint h=1);
51 
52  /// Save pixels into stream in IFF format
53  virtual bool savePixels(FXStream& store) const;
54 
55  /// Load pixels from stream in IFF format
56  virtual bool loadPixels(FXStream& store);
57 
58  /// Destroy
59  virtual ~FXIFFImage();
60  };
61 
62 
63 
64 #ifndef FXLOADIFF
65 #define FXLOADIFF
66 
67 /**
68 * Check if stream contains a IFF, return TRUE if so.
69 */
70 extern FXAPI bool fxcheckIFF(FXStream& store);
71 
72 
73 /**
74 * Load an IFF (EA Image File Format) file from a stream.
75 * Upon successful return, the pixel array and size are returned.
76 * If an error occurred, the pixel array is set to NULL.
77 */
78 extern FXAPI bool fxloadIFF(FXStream& store,FXColor*& data,FXint& width,FXint& height);
79 
80 
81 #endif
82 
83 }
84 
85 #endif
char FXchar
Definition: fxdefs.h:387
bool fxcheckIFF(FXStream &store)
Check if stream contains a IFF, return TRUE if so.
unsigned int FXuint
Definition: fxdefs.h:396
The IFF Image provides support for the EA/Amiga Image File Format.
Definition: FXIFFImage.h:37
#define FXAPI
Definition: fxdefs.h:122
Application Object.
Definition: FXApp.h:158
#define NULL
Definition: fxdefs.h:41
FXuint FXColor
Definition: fxdefs.h:454
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:99
int FXint
Definition: fxdefs.h:397
An Image is a rectangular array of pixels.
Definition: FXImage.h:67
bool fxloadIFF(FXStream &store, FXColor *&data, FXint &width, FXint &height)
Load an IFF (EA Image File Format) file from a stream.
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp