Search for usage in LXR

#include <imageloader.h>

Inherited by khtmlImLoad::GIFLoader, khtmlImLoad::JPEGLoader, khtmlImLoad::PNGLoader, and khtmlImLoad::QImageIOLoader.

Public Types

enum  { DefaultFrame = 0, FinalVersionID = 0xff }
enum  Status { Done = -2, Error = -1 }

Public Member Functions

virtual int processData (uchar *data, int length)=0
virtual int processEOF ()
void setImage (Image *_image)

Protected Member Functions

void notifyAppendFrame (int fwidth, int fheight, const ImageFormat &format)
void notifyImageInfo (int width, int height)
void notifyQImage (unsigned char version, const QImage *qimage)
void notifyScanline (unsigned char version, unsigned char *line)
void notifySingleFrameImage (int width, int height, const ImageFormat &format)
PixmapPlanerequestFrame0 ()
void requestScanline (unsigned int lineNum, unsigned char *lineBuf)

Protected Attributes


Detailed Description

A base class for decoders.

The decoders should inherit off this, and use the protected functions to feed their images data

Definition at line 40 of file imageloader.h.

Member Function Documentation

◆ notifyAppendFrame()

void khtmlImLoad::ImageLoader::notifyAppendFrame ( int  fwidth,
int  fheight,
const ImageFormat &  format 

Call to declare frame geometry, should be called for each frame.

Definition at line 61 of file imageloader.h.

◆ notifyImageInfo()

void khtmlImLoad::ImageLoader::notifyImageInfo ( int  width,
int  height 

Call to declare canvas geometry and format.

May only be called once

Definition at line 53 of file imageloader.h.

◆ notifyScanline()

void khtmlImLoad::ImageLoader::notifyScanline ( unsigned char  version,
unsigned char *  line 

Call to provide a scanline, for active frame, and given "version".

The decoder must feed multiple versions of the image inside here, top-to-bottom, and incrementing versions. When it's done, it should either feed the last version with FinalVersionID, or call notifyFinished() separately.

Definition at line 81 of file imageloader.h.

◆ notifySingleFrameImage()

void khtmlImLoad::ImageLoader::notifySingleFrameImage ( int  width,
int  height,
const ImageFormat &  format 

wrapper for the above method for single-frame images

Definition at line 69 of file imageloader.h.

◆ processData()

virtual int khtmlImLoad::ImageLoader::processData ( uchar *  data,
int  length 
pure virtual

Decodes a portion of the image, and returns the appropriate status, or the number of bytes read.

◆ processEOF()

virtual int khtmlImLoad::ImageLoader::processEOF ( )

This method is called to notify the decoder that the input is done, if the decoder has not already indicated some sort of completion on the stream; this is intended mostly for non-incremental decoders.

It should return Done if all is OK. Note that the "if" above should mean that the non-incremental decoders should just return the bytes read in processData

Definition at line 140 of file imageloader.h.

◆ requestFrame0()

PixmapPlane* khtmlImLoad::ImageLoader::requestFrame0 ( )

Call this to get the first frame.

Definition at line 102 of file imageloader.h.

◆ requestScanline()

void khtmlImLoad::ImageLoader::requestScanline ( unsigned int  lineNum,
unsigned char *  lineBuf 

Call this to exract the current state of a scanline to the provided bufer.

Definition at line 94 of file imageloader.h.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 03:57:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.