Difference between revisions of "QtImageCodec"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
(Refined document)
m
Line 13: Line 13:
 
Put compiled '''"libCEGUIQtImageCodec-0.7.0.so"''' from '''"bin"''' to system directory for shared libraries. This can be '''"/usr/local/lib"''' for example. Then run '''"ldconfig"''' as administrator.
 
Put compiled '''"libCEGUIQtImageCodec-0.7.0.so"''' from '''"bin"''' to system directory for shared libraries. This can be '''"/usr/local/lib"''' for example. Then run '''"ldconfig"''' as administrator.
  
== Compile qt plugin for TGA support ==
+
== Compile Qt plugin for TGA support ==
  
 
Qt does not support TGA image loading, but there is a plugin for it in [http://www.kde.org KDE] that supports doing that. To compile it download its source from the following locations:
 
Qt does not support TGA image loading, but there is a plugin for it in [http://www.kde.org KDE] that supports doing that. To compile it download its source from the following locations:

Revision as of 14:23, 3 October 2009

Introduction

QtImageCodec - image codec for CEGUI, that loads images using Qt.

Installation

Compile image codec

Download image codec sources. Extract it. In extracted directory open terminal and type:

qmake
make

Put compiled "libCEGUIQtImageCodec-0.7.0.so" from "bin" to system directory for shared libraries. This can be "/usr/local/lib" for example. Then run "ldconfig" as administrator.

Compile Qt plugin for TGA support

Qt does not support TGA image loading, but there is a plugin for it in KDE that supports doing that. To compile it download its source from the following locations:

http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/kimgio/tga.h
http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/kimgio/tga.cpp

Put it into a separate directory, for example "qtga". In that directory open terminal and issue the following command:

qmake -project

Open generated project file ("qtga.pro") and make sure it contains the following statements:

TEMPLATE = lib
CONFIG += plugin

Then in the terminal type:

qmake
make

Put the built shared library ("libqtga.so") to "imageformats" subdirectory of qt plugin directory. For example this can be something like "/usr/lib64/qt4/plugins/imageformats" on 64 bit linux system.

Configure CEGUI library

In order to make this codec the default image codec used by CEGUI before compiling CEGUI configure it with the following command:

./configure --with-default-image-codec=QtImageCodec 

Alternatively image codec used by CEGUI system can be changed in the source code of an application:

CEGUI::System::getSingleton ().setImageCodec ("QtImageCodec");