FLTK logo

Documentation

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]
 

class Fl_RGB_Image


Class Hierarchy

Include Files

    #include <FL/Fl_RGB_Image.H>
    

Description

The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of color information. Images with an even number of channels are assumed to contain alpha information, which is used to blend the image with the contents of the screen.

Fl_RGB_Image is defined in <FL/Fl_Image.H>, however for compatibility reasons <FL/Fl_RGB_Image.H> should be included.

Methods

Fl_RGB_Image::Fl_RGB_Image(const unsigned char *array, int W, int H, int D = 3, int LD = 0);

The constructor creates a new image from the specified data.

Fl_RGB_Image::~Fl_RGB_Image();

The destructor free all memory and server resources that are used by the image.


User Comments [ Add Comment ]

From XLoom, 05:31 Feb 07, 2004 (score=3)

In Dev-C FLTK package the Fl_RGB_Image class declaration is not in #include <FL/Fl_RGB_Image.H>, but in #include <FL/Fl_Image.H> with Fl_Image. Just thought it might be useful for someone.
Reply ]

From Anonymous, 19:46 Jun 10, 2004 (score=1)

It is important to note that the image data is NOT copied.

The image structure just maintains a pointer to the array.

If you change the array, the image will also change.  If the array goes out of scope, then the image will get random data at best, and crash the program at worst.
Reply ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.