• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KImgIO

Defines | Functions

pic_write.cpp File Reference

#include "pic_rw.h"
#include <netinet/in.h>
#include <iostream>
#include <qimage.h>
Include dependency graph for pic_write.cpp:

Go to the source code of this file.

Defines

#define FAIL()

Functions

unsigned convertABGRtoRGBA (unsigned pixel)
static bool encodeRLE (const unsigned *image, unsigned char *output, bool rgb, unsigned max, unsigned &oConsumed, unsigned &oProduced)
void pic_write (QIODevice *dev, const QImage *img)
static bool writeHeader (QIODevice *dev, std::string msg, unsigned width, unsigned height, bool alpha)
static bool writeRow (QIODevice *dev, unsigned *row, unsigned width, bool alpha)

Define Documentation

#define FAIL ( )
Value:
{ \
    std::cout << "ERROR Writing PIC!" << std::endl; \
    return; \
}

Definition at line 206 of file pic_write.cpp.


Function Documentation

unsigned convertABGRtoRGBA ( unsigned  pixel) [inline]

Definition at line 84 of file pic_write.cpp.

static bool encodeRLE ( const unsigned *  image,
unsigned char *  output,
bool  rgb,
unsigned  max,
unsigned &  oConsumed,
unsigned &  oProduced 
) [static]

Encodes a portion of the image in RLE coding.

Parameters:
imageThe image that we want to encode
outputThe output buffer
channelsThe number of channels to write
offsetOffset in bytes to copy
maxThe maximum number of pixels to write
oConsumedThe number of pixels consumed from image
oProducedThe number of bytes produced in out
Returns:
True on success

Definition at line 103 of file pic_write.cpp.

void pic_write ( QIODevice *  dev,
const QImage *  img 
)

Pic write handler for Qt / KDE.

Definition at line 213 of file pic_write.cpp.

static bool writeHeader ( QIODevice *  dev,
std::string  msg,
unsigned  width,
unsigned  height,
bool  alpha 
) [static]

PIC_RW - Qt PIC Support Copyright (C) 2007 Ruben Lopez <r.lopez@bren.es>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---------------------------------------------------------------------------- Writes the PIC header info.

Parameters:
devIO Device
msgHeader message
widthImage width
heightImage height
alphaImage has alpha?
Returns:
True on success

Definition at line 42 of file pic_write.cpp.

static bool writeRow ( QIODevice *  dev,
unsigned *  row,
unsigned  width,
bool  alpha 
) [static]

Writes a row to the file.

Returns:
True on success

Definition at line 168 of file pic_write.cpp.

KImgIO

Skip menu "KImgIO"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal