⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winimage.txt

📁 动态gif控件AnimatedGif动态gif控件
💻 TXT
字号:
*******************************************************************************
                                   WINIMAGE
                 CPlusPlus.com Generic Classes for Raster Image
                                (November 2000)

                      Juan Soulie <jsoulie@cplusplus.com>
*******************************************************************************


1. Description
--------------
  The WINIMAGE Library defines classes to store raster images (C_image) and
sets of them (C_ImageSet). It also provides a Window Class specifically
designed to display C_ImageSet objects as animations.

  A "Raster" is an Image composed of a array of single pixels. Each pixel can
describe either a Color by itself (24bpp rasters) or be an index of a Palette
array.

  A "Palette" is an array of colors such that each element of a paletted raster
image is an index of this array.

  Additionally, the library also implements as class members of C_Image and
C_ImageSet capabilities to load and save files of some standard graphic formats,
storing its content into WINIMAGE (or compatible) objects. These file format
support functions have been developed in a platform-independent basis, allowing
these to be easily portable just by modifying the other C_Image and C_ImageSet
Windows-specific class members.



2. C_Image
----------
  C_Image is a storage class designed to store single Raster Images. Under
the Windows specialization these are stored following a Windows-GDI compatible
structure (BITMAPINFO), but still allowing the direct access to both its Raster
and Palette elements.

  The Raster member is an array of char elements. In the case of paletted
rasters each char element corresponds to an index in the Palette. Independently
of the number of bits used as index (up to 8), each char element corresponds
to a pixel. In the case of non-paletted rasters, the class supports
24 bits-per-pixel rasters, being a color described by each set of three char
elements.

  The Palette member is an array of COLOR elements. COLOR is a structure that
has -at least- three relevant members: r, g and b, corresponding to the red,
green and blue values of the color. Under the WinImage specialization this
structure is defined as a set of 4 bytes in order to be compatible with the
RGBQUAD structure used by GDI functions.



3. C_ImageSet
-------------
  C_ImageSet is a storage class designed to store sets of C_Image objects,
generally animations.



4. C_AnimationWindow
--------------------
  Describes a class to manage a child window designed to display C_ImageSet
objects as animations.

  Some of the members of this class are:
 - Create: Creates a new window, initially hidden.
 - Display: Displays a previously created window in a given position.
 - Message: This function processeses the window messages. It's virtual so
it can be redefined in derived classes.



5. Graphic Format Files Support
-------------------------------
  The Winimage library implements function to load and save BMP files and
to load GIF files, the most popular formats for raster images. Because
BMP files are single images, LoadBMP and SaveBMP have been implemented as
members of class C_Image, and because of the possibility that GIF files
may contain animations, LoadGIF has been implemented as a member of
C_ImageSet. Anyway noticing that C_ImageSet contains a "vector" of
C_Image objects and that the C_Image class implements a copy function
it is an easy task to translate objects from class C_ImageSet to C_Image:

  image_object = *imageset_object.img[0];

The reverse operation can be performed safely in the following way:

  C_Image* x = new C_Image; *x = image_object; imageset_object.AddImage(x);

* Patent notice:
  The GIF format uses LZW compression method. This compression method was
patented in XXXX by Unisys, patent that expires in XXXX. As by the moment this
document was written unisys grants the use of LZW decompression algorithms
without fee but requires the payment of a fee for the use of the corresponding
compression algorithm. Accordingly I provide the LZW/GIF decompressor but not
the compressor.



5. FAQ, Frequently Asked Questions
----------------------------------
- I try to compile a sample program that uses the WINIMAGE library but it
doesn't work and I can't figure out why. Shall I write the author with my
troubles?
 * Probably no, if you do, your message will probably be ignored. It is likely
that the author has done his/her best explaining his/her code in the companion
readme files and embedded comments in the source code. Please refer to that
information and/or to your compiler's documentation.

- Where can I get the latest version of the WINIMAGE library?
 * The following web-address will be updated with the latest info and links to
the library:
     http://www.cplusplus.com/src/winimage

- Do you plan to include support for platforms other than Windows?
 * Probably in a future.

- Why does this library supports so few graphic formats?
 * The library can be considered "under construction" in that matter.

- I can improve the existing code. Can I contribute?
 * Sure. Contact the author.

-------------------------------------------------------------------------------
 Copyright 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -