--- /srv/reproducible-results/rbuild-debian/r-b-build.dixmtRq1/b1/silly_0.1.0-8.1_i386.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.dixmtRq1/b2/silly_0.1.0-8.1_i386.changes ├── Files │ @@ -1,5 +1,5 @@ │ │ fbd3c0270943cb1c827387a94d0b577a 61580 debug optional libsilly-dbgsym_0.1.0-8.1_i386.deb │ 7571df71a02b947b0d09aef3eadc471e 25712 libdevel extra libsilly-dev_0.1.0-8.1_i386.deb │ - a0bc3b12bd31cacb77f6e7849af910cb 181412 doc extra libsilly-doc_0.1.0-8.1_all.deb │ + 1a61c88194c18cf900ef4e3f8f16c7fc 181512 doc extra libsilly-doc_0.1.0-8.1_all.deb │ c456aea5738c7a42710c2dff9d415809 16092 libs extra libsilly_0.1.0-8.1_i386.deb ├── libsilly-doc_0.1.0-8.1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2021-01-03 15:26:07.000000 debian-binary │ │ --rw-r--r-- 0 0 0 3788 2021-01-03 15:26:07.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 177432 2021-01-03 15:26:07.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 3784 2021-01-03 15:26:07.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 177536 2021-01-03 15:26:07.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -3,56 +3,56 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-03 15:26:07.000000 ./usr/share/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-03 15:26:07.000000 ./usr/share/doc/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 643 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 387 2006-08-11 08:21:50.000000 ./usr/share/doc/libsilly-doc/changelog.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3404 2012-04-10 11:20:35.000000 ./usr/share/doc/libsilly-doc/copyright │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15570 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00002_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10691 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00005_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10691 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00002_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35541 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00005_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 21186 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00008_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 53959 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00011_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35541 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00014_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15570 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00014_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 28390 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00017_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12053 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00020_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22457 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00023_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17157 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00026_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15811 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00029_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10528 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00032_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12316 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00035_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23008 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00038_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15219 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00041_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14655 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00044_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18660 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00047_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15713 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00050_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7622 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00053_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16111 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00056_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7621 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00059_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8505 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00062_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14670 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00065_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7626 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00068_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15428 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00071_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7631 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00074_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13542 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00077_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15585 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00080_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7626 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00083_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18236 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00086_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9011 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00089_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14015 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00092_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8597 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00095_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23209 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00098_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8701 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00101_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17896 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00104_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10562 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00107_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13435 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00110_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8592 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00113_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8998 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00116_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12721 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00119_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10525 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00122_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17143 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00125_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10528 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00020_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17157 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00023_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23008 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00026_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12316 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00029_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22457 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00032_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12053 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00035_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15811 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00038_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13435 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00041_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8597 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00044_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18236 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00047_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7622 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00050_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15713 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00053_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13542 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00056_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16111 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00059_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7626 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00062_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7631 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00065_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14670 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00068_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7626 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00071_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15585 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00074_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8505 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00077_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15428 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00080_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7621 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00083_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15219 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00086_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14015 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00089_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23209 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00092_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8592 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00095_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17896 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00098_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10562 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00101_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8998 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00104_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14655 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00107_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18660 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00110_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12721 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00113_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10525 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00116_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17143 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00119_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8701 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00122_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9011 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00125_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 32596 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00129.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6963 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00942.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 17148 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00943.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4253 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00944.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 18861 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00945.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4475 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00946.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3277 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00947.png │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00002_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageContext.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYTGAImageContext.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYPNGImageContext.cpp
│ │ │ │ +
SILLYTGAImageContext.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYPNGImageContext.cpp
│ │ │ │ +
2 filename: SILLYTGAImageContext.cpp
│ │ │ │
3 created: 11 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Definition of PNGImageContext methods
│ │ │ │ +
6 purpose: Definition of the TGAImageContext methods
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,66 +75,31 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "loaders/SILLYPNGImageContext.h"
│ │ │ │ +
34#include "loaders/SILLYTGAImageContext.h"
│ │ │ │
35
│ │ │ │
36#ifndef SILLY_OPT_INLINE
│ │ │ │
37#define inline
│ │ │ │ -
38#include "loaders/SILLYPNGImageContext.icpp"
│ │ │ │ +
38#include "loaders/SILLYTGAImageContext.icpp"
│ │ │ │
39#undef inline
│ │ │ │ -
40#endif
│ │ │ │ -
41#include <string.h>
│ │ │ │ -
42
│ │ │ │ +
40#endif
│ │ │ │ +
41#include <cstring>
│ │ │ │ +
42#include <cstdio>
│ │ │ │
43// Start section of namespace SILLY
│ │ │ │
44namespace SILLY
│ │ │ │
45{
│ │ │ │ -
46int PNGImageContext::read(png_bytep data, png_size_t length)
│ │ │ │ -
47{
│ │ │ │ -
48 //printf("PNG Read: %d bytes offset: %d, size %d\n",
│ │ │ │ -
49 // length, d_offset, d_data->getSize());
│ │ │ │ -
50
│ │ │ │ -
51 if (d_offset + length > d_data->getSize())
│ │ │ │ -
52 return -1;
│ │ │ │ -
53 memcpy(data, d_data->getDataPtr() + d_offset, length);
│ │ │ │ -
54 d_offset += length;
│ │ │ │ -
55 return length;
│ │ │ │ -
56}
│ │ │ │ -
57
│ │ │ │ -
58
│ │ │ │ -
59PNGImageContext::PNGImageContext(DataSource* data)
│ │ │ │ -
60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0)
│ │ │ │ -
61{
│ │ │ │ -
62
│ │ │ │ -
63}
│ │ │ │ -
64
│ │ │ │ -
65PNGImageContext::~PNGImageContext()
│ │ │ │ -
66{
│ │ │ │ -
67 if (d_info_ptr)
│ │ │ │ -
68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0);
│ │ │ │ -
69 if (d_png_ptr)
│ │ │ │ -
70 png_destroy_read_struct(&d_png_ptr, 0, 0);
│ │ │ │ -
71}
│ │ │ │ -
72
│ │ │ │ -
73
│ │ │ │ -
74void PNGImageContext::setImageSize()
│ │ │ │ -
75{
│ │ │ │ -
76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr));
│ │ │ │ -
77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr));
│ │ │ │ -
78
│ │ │ │ -
79}
│ │ │ │ -
80
│ │ │ │ -
81
│ │ │ │ -
82} // End section of namespace SILLY
│ │ │ │ +
46
│ │ │ │ +
47
│ │ │ │ +
48
│ │ │ │ +
49} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
virtual size_t getSize() const =0
Return the size of the data.
│ │ │ │ -
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ * loaders │ │ │ │ │ -SILLYPNGImageContext.cpp │ │ │ │ │ +SILLYTGAImageContext.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYPNGImageContext.cpp │ │ │ │ │ + 2 filename: SILLYTGAImageContext.cpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Definition of PNGImageContext methods │ │ │ │ │ + 6 purpose: Definition of the TGAImageContext methods │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -40,68 +40,29 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "loaders/SILLYPNGImageContext.h" │ │ │ │ │ + 34#include "loaders/SILLYTGAImageContext.h" │ │ │ │ │ 35 │ │ │ │ │ 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ 37#define inline │ │ │ │ │ - 38#include "loaders/SILLYPNGImageContext.icpp" │ │ │ │ │ + 38#include "loaders/SILLYTGAImageContext.icpp" │ │ │ │ │ 39#undef inline │ │ │ │ │ 40#endif │ │ │ │ │ - 41#include │ │ │ │ │ - 42 │ │ │ │ │ + 41#include │ │ │ │ │ + 42#include │ │ │ │ │ 43// Start section of namespace SILLY │ │ │ │ │ 44namespace SILLY │ │ │ │ │ 45{ │ │ │ │ │ - 46int PNGImageContext::read(png_bytep data, png_size_t length) │ │ │ │ │ - 47{ │ │ │ │ │ - 48 //printf("PNG Read: %d bytes offset: %d, size %d\n", │ │ │ │ │ - 49 // length, d_offset, d_data->getSize()); │ │ │ │ │ - 50 │ │ │ │ │ - 51 if (d_offset + length > d_data->getSize()) │ │ │ │ │ - 52 return -1; │ │ │ │ │ - 53 memcpy(data, d_data->getDataPtr() + d_offset, length); │ │ │ │ │ - 54 d_offset += length; │ │ │ │ │ - 55 return length; │ │ │ │ │ - 56} │ │ │ │ │ - 57 │ │ │ │ │ - 58 │ │ │ │ │ - 59PNGImageContext::PNGImageContext(DataSource* data) │ │ │ │ │ - 60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0) │ │ │ │ │ - 61{ │ │ │ │ │ - 62 │ │ │ │ │ - 63} │ │ │ │ │ - 64 │ │ │ │ │ - 65PNGImageContext::~PNGImageContext() │ │ │ │ │ - 66{ │ │ │ │ │ - 67 if (d_info_ptr) │ │ │ │ │ - 68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0); │ │ │ │ │ - 69 if (d_png_ptr) │ │ │ │ │ - 70 png_destroy_read_struct(&d_png_ptr, 0, 0); │ │ │ │ │ - 71} │ │ │ │ │ - 72 │ │ │ │ │ - 73 │ │ │ │ │ - 74void PNGImageContext::setImageSize() │ │ │ │ │ - 75{ │ │ │ │ │ - 76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr)); │ │ │ │ │ - 77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr)); │ │ │ │ │ - 78 │ │ │ │ │ - 79} │ │ │ │ │ - 80 │ │ │ │ │ - 81 │ │ │ │ │ - 82} // End section of namespace SILLY │ │ │ │ │ + 46 │ │ │ │ │ + 47 │ │ │ │ │ + 48 │ │ │ │ │ + 49} // End section of namespace SILLY │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::DataSource::getSize │ │ │ │ │ -virtual size_t getSize() const =0 │ │ │ │ │ -Return the size of the data. │ │ │ │ │ -SILLY::DataSource::getDataPtr │ │ │ │ │ -virtual const byte * getDataPtr() const =0 │ │ │ │ │ -Get raw access to the image data. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00005_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYTGAImageContext.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageLoader.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYTGAImageContext.cpp
│ │ │ │ +
SILLYPNGImageLoader.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYTGAImageContext.cpp
│ │ │ │ +
2 filename: SILLYPNGImageLoader.cpp
│ │ │ │
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Definition of the TGAImageContext methods
│ │ │ │ +
6 purpose: Definition of the PNGImageLoader methods
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -73,33 +73,198 @@ │ │ │ │
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │ -
32#endif
│ │ │ │ -
33
│ │ │ │ -
34#include "loaders/SILLYTGAImageContext.h"
│ │ │ │ -
35
│ │ │ │ -
36#ifndef SILLY_OPT_INLINE
│ │ │ │ -
37#define inline
│ │ │ │ -
38#include "loaders/SILLYTGAImageContext.icpp"
│ │ │ │ -
39#undef inline
│ │ │ │ -
40#endif
│ │ │ │ -
41#include <cstring>
│ │ │ │ -
42#include <cstdio>
│ │ │ │ -
43// Start section of namespace SILLY
│ │ │ │ -
44namespace SILLY
│ │ │ │ -
45{
│ │ │ │ -
46
│ │ │ │ -
47
│ │ │ │ -
48
│ │ │ │ -
49} // End section of namespace SILLY
│ │ │ │ +
32#include <string.h>
│ │ │ │ +
33#endif
│ │ │ │ +
34
│ │ │ │ +
35#include "loaders/SILLYPNGImageLoader.h"
│ │ │ │ +
36
│ │ │ │ +
37#ifndef SILLY_OPT_INLINE
│ │ │ │ +
38#define inline
│ │ │ │ +
39#include "loaders/SILLYPNGImageLoader.icpp"
│ │ │ │ +
40#undef inline
│ │ │ │ +
41#endif
│ │ │ │ +
42
│ │ │ │ +
43#include "loaders/SILLYPNGImageContext.h"
│ │ │ │ +
44#include <png.h>
│ │ │ │ +
45// Start section of namespace SILLY
│ │ │ │ +
46namespace SILLY
│ │ │ │ +
47{
│ │ │ │ +
48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t length)
│ │ │ │ +
49{
│ │ │ │ +
50 PNGImageContext* png = reinterpret_cast<PNGImageContext*>(png_get_io_ptr(png_ptr));
│ │ │ │ +
51 int readed = png->read(data, length);
│ │ │ │ +
52 if (readed != (int)length)
│ │ │ │ +
53 {
│ │ │ │ +
54 png_error(png_ptr, "PNG_read_function error");
│ │ │ │ +
55 }
│ │ │ │ +
56}
│ │ │ │ +
57
│ │ │ │ +
58void PNG_warning_function(png_structp png_ptr,
│ │ │ │ +
59 png_const_charp error)
│ │ │ │ +
60{
│ │ │ │ +
61// printf("PNG Warning: %s\n", error);
│ │ │ │ +
62}
│ │ │ │ +
63
│ │ │ │ +
64void PNG_error_function(png_structp png_ptr,
│ │ │ │ +
65 png_const_charp error)
│ │ │ │ +
66{
│ │ │ │ +
67 // printf("PNG Error: %s\n", error);
│ │ │ │ +
68 // copied from libpng's pngerror.cpp
│ │ │ │ +
69 jmp_buf buf;
│ │ │ │ +
70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
│ │ │ │ +
71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf));
│ │ │ │ +
72#else
│ │ │ │ +
73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
│ │ │ │ +
74#endif
│ │ │ │ +
75 longjmp(buf, 1);
│ │ │ │ +
76}
│ │ │ │ +
77
│ │ │ │ +
78
│ │ │ │ +
79PNGImageLoader::PNGImageLoader()
│ │ │ │ +
80 : ImageLoader("PNG Image Loader based on libpng")
│ │ │ │ +
81{
│ │ │ │ +
82}
│ │ │ │ +
83PNGImageLoader::~PNGImageLoader()
│ │ │ │ +
84{
│ │ │ │ +
85}
│ │ │ │ +
86
│ │ │ │ +
87
│ │ │ │ +
88ImageContext* PNGImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
│ │ │ │ +
89{
│ │ │ │ +
90 PNGImageContext* png = new PNGImageContext(data);
│ │ │ │ +
91 if (!png)
│ │ │ │ +
92 {
│ │ │ │ +
93 return 0;
│ │ │ │ +
94
│ │ │ │ +
95 }
│ │ │ │ +
96 // Prepare png loading
│ │ │ │ +
97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
│ │ │ │ +
98 if (png->d_png_ptr == 0)
│ │ │ │ +
99 {
│ │ │ │ +
100 delete png;
│ │ │ │ +
101 return 0;
│ │ │ │ +
102 }
│ │ │ │ +
103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr);
│ │ │ │ +
104 if (png->d_info_ptr == 0)
│ │ │ │ +
105 {
│ │ │ │ +
106 delete png;
│ │ │ │ +
107 return 0;
│ │ │ │ +
108 }
│ │ │ │ +
109 if (setjmp(png_jmpbuf(png->d_png_ptr)))
│ │ │ │ +
110 {
│ │ │ │ +
111 delete png;
│ │ │ │ +
112 return 0;
│ │ │ │ +
113 }
│ │ │ │ +
114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function, PNG_warning_function);
│ │ │ │ +
115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function);
│ │ │ │ +
116 //png_set_sig_bytes(png->d_png_ptr, 8);
│ │ │ │ +
117
│ │ │ │ +
118
│ │ │ │ +
119
│ │ │ │ +
120 // Read header Check whether PNG can depaletize transparently or not
│ │ │ │ +
121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND;
│ │ │ │ +
122 //printf("Start reading png\n");
│ │ │ │ +
123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0);
│ │ │ │ +
124 png->setImageSize();
│ │ │ │ +
125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr);
│ │ │ │ +
126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr);
│ │ │ │ +
127 //printf("PNG Info: width: %d height: %d bpp: %d channels: %d\n", png->getWidth(), png->getHeight(), png->d_bit_depth, png->d_num_channels);
│ │ │ │ +
128 if (png->d_bit_depth == 8)
│ │ │ │ +
129 {
│ │ │ │ +
130 if (png->d_num_channels == 4)
│ │ │ │ +
131 {
│ │ │ │ +
132 formatSource = PF_RGBA;
│ │ │ │ +
133 }
│ │ │ │ +
134 else if (png->d_num_channels == 3)
│ │ │ │ +
135 {
│ │ │ │ +
136 formatSource = PF_RGB;
│ │ │ │ +
137 }
│ │ │ │ +
138 else
│ │ │ │ +
139 {
│ │ │ │ +
140 delete png;
│ │ │ │ +
141 return 0;
│ │ │ │ +
142 }
│ │ │ │ +
143 }
│ │ │ │ +
144 // Paletized or grayscale not yet handled
│ │ │ │ +
145 else
│ │ │ │ +
146 {
│ │ │ │ +
147 delete png;
│ │ │ │ +
148 return 0;
│ │ │ │ +
149 }
│ │ │ │ +
150 return png;
│ │ │ │ +
151}
│ │ │ │ +
152
│ │ │ │ +
153
│ │ │ │ +
154bool PNGImageLoader::loadImageData(PixelOrigin origin,
│ │ │ │ +
155 DataSource* data,
│ │ │ │ +
156 ImageContext* context)
│ │ │ │ +
157{
│ │ │ │ +
158 PNGImageContext* png = static_cast<PNGImageContext*>(context);
│ │ │ │ +
159 byte red;
│ │ │ │ +
160 byte green;
│ │ │ │ +
161 byte blue;
│ │ │ │ +
162 byte alpha;
│ │ │ │ +
163 size_t width = png->getWidth();
│ │ │ │ +
164 size_t height = png->getHeight();
│ │ │ │ +
165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr);
│ │ │ │ +
166 if (png->d_bit_depth == 8)
│ │ │ │ +
167 {
│ │ │ │ +
168 // Read RGBA
│ │ │ │ +
169 if (png->d_num_channels == 4)
│ │ │ │ +
170 {
│ │ │ │ +
171 for (size_t j = 0 ; j < height ; ++j)
│ │ │ │ +
172 {
│ │ │ │ +
173 for(size_t i = 0 ; i < width ; ++i)
│ │ │ │ +
174 {
│ │ │ │ +
175 size_t pixel_offset = 4 * i;
│ │ │ │ +
176 red = *(row_pointers[j] + pixel_offset);
│ │ │ │ +
177 green = *(row_pointers[j] + pixel_offset + 1);
│ │ │ │ +
178 blue = *(row_pointers[j] + pixel_offset + 2);
│ │ │ │ +
179 alpha = *(row_pointers[j] + pixel_offset + 3);
│ │ │ │ +
180 png->setNextPixel(red, green, blue, alpha);
│ │ │ │ +
181 }
│ │ │ │ +
182 }
│ │ │ │ +
183 }
│ │ │ │ +
184 else if (png->d_num_channels == 3)
│ │ │ │ +
185 {
│ │ │ │ +
186 alpha = 0xff;
│ │ │ │ +
187 for (size_t j = 0 ; j < height ; ++j)
│ │ │ │ +
188 {
│ │ │ │ +
189 for(size_t i = 0 ; i < width ; ++i)
│ │ │ │ +
190 {
│ │ │ │ +
191 size_t pixel_offset = 3 * i;
│ │ │ │ +
192 red = *(row_pointers[j] + pixel_offset);
│ │ │ │ +
193 green = *(row_pointers[j] + pixel_offset + 1);
│ │ │ │ +
194 blue = *(row_pointers[j] + pixel_offset + 2);
│ │ │ │ +
195 png->setNextPixel(red, green, blue, alpha);
│ │ │ │ +
196 }
│ │ │ │ +
197 }
│ │ │ │ +
198
│ │ │ │ +
199 }
│ │ │ │ +
200 }
│ │ │ │ +
201 if (origin == PO_BOTTOM_LEFT)
│ │ │ │ +
202 return png->flipVertically();
│ │ │ │ +
203
│ │ │ │ +
204 return true;
│ │ │ │ +
205}
│ │ │ │ +
206
│ │ │ │ +
207} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
Image Context for PNG Image Loader.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
│ │ │ │ +
bool flipVertically()
Flip pixel ordering.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ * loaders │ │ │ │ │ -SILLYTGAImageContext.cpp │ │ │ │ │ +SILLYPNGImageLoader.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYTGAImageContext.cpp │ │ │ │ │ + 2 filename: SILLYPNGImageLoader.cpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Definition of the TGAImageContext methods │ │ │ │ │ + 6 purpose: Definition of the PNGImageLoader methods │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -38,31 +38,218 @@ │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ - 32#endif │ │ │ │ │ - 33 │ │ │ │ │ - 34#include "loaders/SILLYTGAImageContext.h" │ │ │ │ │ - 35 │ │ │ │ │ - 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ - 37#define inline │ │ │ │ │ - 38#include "loaders/SILLYTGAImageContext.icpp" │ │ │ │ │ - 39#undef inline │ │ │ │ │ - 40#endif │ │ │ │ │ - 41#include │ │ │ │ │ - 42#include │ │ │ │ │ - 43// Start section of namespace SILLY │ │ │ │ │ - 44namespace SILLY │ │ │ │ │ - 45{ │ │ │ │ │ - 46 │ │ │ │ │ - 47 │ │ │ │ │ - 48 │ │ │ │ │ - 49} // End section of namespace SILLY │ │ │ │ │ + 32#include │ │ │ │ │ + 33#endif │ │ │ │ │ + 34 │ │ │ │ │ + 35#include "loaders/SILLYPNGImageLoader.h" │ │ │ │ │ + 36 │ │ │ │ │ + 37#ifndef SILLY_OPT_INLINE │ │ │ │ │ + 38#define inline │ │ │ │ │ + 39#include "loaders/SILLYPNGImageLoader.icpp" │ │ │ │ │ + 40#undef inline │ │ │ │ │ + 41#endif │ │ │ │ │ + 42 │ │ │ │ │ + 43#include "loaders/SILLYPNGImageContext.h" │ │ │ │ │ + 44#include │ │ │ │ │ + 45// Start section of namespace SILLY │ │ │ │ │ + 46namespace SILLY │ │ │ │ │ + 47{ │ │ │ │ │ + 48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t │ │ │ │ │ +length) │ │ │ │ │ + 49{ │ │ │ │ │ + 50 PNGImageContext* png = reinterpret_cast(png_get_io_ptr │ │ │ │ │ +(png_ptr)); │ │ │ │ │ + 51 int readed = png->read(data, length); │ │ │ │ │ + 52 if (readed != (int)length) │ │ │ │ │ + 53 { │ │ │ │ │ + 54 png_error(png_ptr, "PNG_read_function error"); │ │ │ │ │ + 55 } │ │ │ │ │ + 56} │ │ │ │ │ + 57 │ │ │ │ │ + 58void PNG_warning_function(png_structp png_ptr, │ │ │ │ │ + 59 png_const_charp error) │ │ │ │ │ + 60{ │ │ │ │ │ + 61// printf("PNG Warning: %s\n", error); │ │ │ │ │ + 62} │ │ │ │ │ + 63 │ │ │ │ │ + 64void PNG_error_function(png_structp png_ptr, │ │ │ │ │ + 65 png_const_charp error) │ │ │ │ │ + 66{ │ │ │ │ │ + 67 // printf("PNG Error: %s\n", error); │ │ │ │ │ + 68 // copied from libpng's pngerror.cpp │ │ │ │ │ + 69 jmp_buf buf; │ │ │ │ │ + 70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 │ │ │ │ │ + 71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf)); │ │ │ │ │ + 72#else │ │ │ │ │ + 73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf)); │ │ │ │ │ + 74#endif │ │ │ │ │ + 75 longjmp(buf, 1); │ │ │ │ │ + 76} │ │ │ │ │ + 77 │ │ │ │ │ + 78 │ │ │ │ │ + 79PNGImageLoader::PNGImageLoader() │ │ │ │ │ + 80 : ImageLoader("PNG Image Loader based on libpng") │ │ │ │ │ + 81{ │ │ │ │ │ + 82} │ │ │ │ │ + 83PNGImageLoader::~PNGImageLoader() │ │ │ │ │ + 84{ │ │ │ │ │ + 85} │ │ │ │ │ + 86 │ │ │ │ │ + 87 │ │ │ │ │ +88ImageContext* PNGImageLoader::loadHeader(PixelFormat& formatSource, │ │ │ │ │ +DataSource* data) │ │ │ │ │ + 89{ │ │ │ │ │ + 90 PNGImageContext* png = new PNGImageContext(data); │ │ │ │ │ + 91 if (!png) │ │ │ │ │ + 92 { │ │ │ │ │ + 93 return 0; │ │ │ │ │ + 94 │ │ │ │ │ + 95 } │ │ │ │ │ + 96 // Prepare png loading │ │ │ │ │ + 97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); │ │ │ │ │ + 98 if (png->d_png_ptr == 0) │ │ │ │ │ + 99 { │ │ │ │ │ + 100 delete png; │ │ │ │ │ + 101 return 0; │ │ │ │ │ + 102 } │ │ │ │ │ + 103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr); │ │ │ │ │ + 104 if (png->d_info_ptr == 0) │ │ │ │ │ + 105 { │ │ │ │ │ + 106 delete png; │ │ │ │ │ + 107 return 0; │ │ │ │ │ + 108 } │ │ │ │ │ + 109 if (setjmp(png_jmpbuf(png->d_png_ptr))) │ │ │ │ │ + 110 { │ │ │ │ │ + 111 delete png; │ │ │ │ │ + 112 return 0; │ │ │ │ │ + 113 } │ │ │ │ │ + 114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function, │ │ │ │ │ +PNG_warning_function); │ │ │ │ │ + 115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function); │ │ │ │ │ + 116 //png_set_sig_bytes(png->d_png_ptr, 8); │ │ │ │ │ + 117 │ │ │ │ │ + 118 │ │ │ │ │ + 119 │ │ │ │ │ + 120 // Read header Check whether PNG can depaletize transparently or not │ │ │ │ │ + 121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND; │ │ │ │ │ + 122 //printf("Start reading png\n"); │ │ │ │ │ + 123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0); │ │ │ │ │ + 124 png->setImageSize(); │ │ │ │ │ + 125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr); │ │ │ │ │ + 126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr); │ │ │ │ │ + 127 //printf("PNG Info: width: %d height: %d bpp: %d channels: %d\n", png- │ │ │ │ │ +>getWidth(), png->getHeight(), png->d_bit_depth, png->d_num_channels); │ │ │ │ │ + 128 if (png->d_bit_depth == 8) │ │ │ │ │ + 129 { │ │ │ │ │ + 130 if (png->d_num_channels == 4) │ │ │ │ │ + 131 { │ │ │ │ │ + 132 formatSource = PF_RGBA; │ │ │ │ │ + 133 } │ │ │ │ │ + 134 else if (png->d_num_channels == 3) │ │ │ │ │ + 135 { │ │ │ │ │ + 136 formatSource = PF_RGB; │ │ │ │ │ + 137 } │ │ │ │ │ + 138 else │ │ │ │ │ + 139 { │ │ │ │ │ + 140 delete png; │ │ │ │ │ + 141 return 0; │ │ │ │ │ + 142 } │ │ │ │ │ + 143 } │ │ │ │ │ + 144 // Paletized or grayscale not yet handled │ │ │ │ │ + 145 else │ │ │ │ │ + 146 { │ │ │ │ │ + 147 delete png; │ │ │ │ │ + 148 return 0; │ │ │ │ │ + 149 } │ │ │ │ │ + 150 return png; │ │ │ │ │ + 151} │ │ │ │ │ + 152 │ │ │ │ │ + 153 │ │ │ │ │ +154bool PNGImageLoader::loadImageData(PixelOrigin origin, │ │ │ │ │ + 155 DataSource* data, │ │ │ │ │ + 156 ImageContext* context) │ │ │ │ │ + 157{ │ │ │ │ │ + 158 PNGImageContext* png = static_cast(context); │ │ │ │ │ + 159 byte red; │ │ │ │ │ + 160 byte green; │ │ │ │ │ + 161 byte blue; │ │ │ │ │ + 162 byte alpha; │ │ │ │ │ + 163 size_t width = png->getWidth(); │ │ │ │ │ + 164 size_t height = png->getHeight(); │ │ │ │ │ + 165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr); │ │ │ │ │ + 166 if (png->d_bit_depth == 8) │ │ │ │ │ + 167 { │ │ │ │ │ + 168 // Read RGBA │ │ │ │ │ + 169 if (png->d_num_channels == 4) │ │ │ │ │ + 170 { │ │ │ │ │ + 171 for (size_t j = 0 ; j < height ; ++j) │ │ │ │ │ + 172 { │ │ │ │ │ + 173 for(size_t i = 0 ; i < width ; ++i) │ │ │ │ │ + 174 { │ │ │ │ │ + 175 size_t pixel_offset = 4 * i; │ │ │ │ │ + 176 red = *(row_pointers[j] + pixel_offset); │ │ │ │ │ + 177 green = *(row_pointers[j] + pixel_offset + 1); │ │ │ │ │ + 178 blue = *(row_pointers[j] + pixel_offset + 2); │ │ │ │ │ + 179 alpha = *(row_pointers[j] + pixel_offset + 3); │ │ │ │ │ + 180 png->setNextPixel(red, green, blue, alpha); │ │ │ │ │ + 181 } │ │ │ │ │ + 182 } │ │ │ │ │ + 183 } │ │ │ │ │ + 184 else if (png->d_num_channels == 3) │ │ │ │ │ + 185 { │ │ │ │ │ + 186 alpha = 0xff; │ │ │ │ │ + 187 for (size_t j = 0 ; j < height ; ++j) │ │ │ │ │ + 188 { │ │ │ │ │ + 189 for(size_t i = 0 ; i < width ; ++i) │ │ │ │ │ + 190 { │ │ │ │ │ + 191 size_t pixel_offset = 3 * i; │ │ │ │ │ + 192 red = *(row_pointers[j] + pixel_offset); │ │ │ │ │ + 193 green = *(row_pointers[j] + pixel_offset + 1); │ │ │ │ │ + 194 blue = *(row_pointers[j] + pixel_offset + 2); │ │ │ │ │ + 195 png->setNextPixel(red, green, blue, alpha); │ │ │ │ │ + 196 } │ │ │ │ │ + 197 } │ │ │ │ │ + 198 │ │ │ │ │ + 199 } │ │ │ │ │ + 200 } │ │ │ │ │ + 201 if (origin == PO_BOTTOM_LEFT) │ │ │ │ │ + 202 return png->flipVertically(); │ │ │ │ │ + 203 │ │ │ │ │ + 204 return true; │ │ │ │ │ + 205} │ │ │ │ │ + 206 │ │ │ │ │ + 207} // End section of namespace SILLY │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::PixelFormat │ │ │ │ │ +PixelFormat │ │ │ │ │ +List all pixel format supported. │ │ │ │ │ +Definition: SILLYBase.h:60 │ │ │ │ │ +SILLY::PixelOrigin │ │ │ │ │ +PixelOrigin │ │ │ │ │ +List all pixel origin supported. │ │ │ │ │ +Definition: SILLYBase.h:71 │ │ │ │ │ +SILLY::PNGImageContext │ │ │ │ │ +Image Context for PNG Image Loader. │ │ │ │ │ +Definition: SILLYPNGImageContext.h:46 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ +SILLY::ImageContext::setNextPixel │ │ │ │ │ +void setNextPixel(byte red, byte green, byte bleu, byte alpha) │ │ │ │ │ +Set the next pixel of the image. │ │ │ │ │ +SILLY::ImageContext::flipVertically │ │ │ │ │ +bool flipVertically() │ │ │ │ │ +Flip pixel ordering. │ │ │ │ │ +Definition: SILLYImageContext.cpp:45 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00008_source.html │ │ │ │ @@ -164,18 +164,18 @@ │ │ │ │
116{
│ │ │ │
117 setWidth(cinfo.output_width);
│ │ │ │
118 setHeight(cinfo.output_height);
│ │ │ │
119}
│ │ │ │
120
│ │ │ │
121} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
Image Context for JPG image loader.
│ │ │ │ +
Image Context for JPG image loader.
│ │ │ │
virtual size_t getSize() const =0
Return the size of the data.
│ │ │ │
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00011_source.html │ │ │ │ @@ -362,22 +362,22 @@ │ │ │ │
314 return tga->flipVertically();
│ │ │ │
315 }
│ │ │ │
316 return true;
│ │ │ │
317}
│ │ │ │
318
│ │ │ │
319} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
Image Context for Targa image.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
Image Context for Targa image.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
│ │ │ │ -
bool flipVertically()
Flip pixel ordering.
│ │ │ │ +
bool flipVertically()
Flip pixel ordering.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00014_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageLoader.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageContext.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYPNGImageLoader.cpp
│ │ │ │ +
SILLYPNGImageContext.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYPNGImageLoader.cpp
│ │ │ │ +
2 filename: SILLYPNGImageContext.cpp
│ │ │ │
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Definition of the PNGImageLoader methods
│ │ │ │ +
6 purpose: Definition of PNGImageContext methods
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -73,198 +73,68 @@ │ │ │ │
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │ -
32#include <string.h>
│ │ │ │ -
33#endif
│ │ │ │ -
34
│ │ │ │ -
35#include "loaders/SILLYPNGImageLoader.h"
│ │ │ │ -
36
│ │ │ │ -
37#ifndef SILLY_OPT_INLINE
│ │ │ │ -
38#define inline
│ │ │ │ -
39#include "loaders/SILLYPNGImageLoader.icpp"
│ │ │ │ -
40#undef inline
│ │ │ │ -
41#endif
│ │ │ │ +
32#endif
│ │ │ │ +
33
│ │ │ │ +
34#include "loaders/SILLYPNGImageContext.h"
│ │ │ │ +
35
│ │ │ │ +
36#ifndef SILLY_OPT_INLINE
│ │ │ │ +
37#define inline
│ │ │ │ +
38#include "loaders/SILLYPNGImageContext.icpp"
│ │ │ │ +
39#undef inline
│ │ │ │ +
40#endif
│ │ │ │ +
41#include <string.h>
│ │ │ │
42
│ │ │ │ -
43#include "loaders/SILLYPNGImageContext.h"
│ │ │ │ -
44#include <png.h>
│ │ │ │ -
45// Start section of namespace SILLY
│ │ │ │ -
46namespace SILLY
│ │ │ │ +
43// Start section of namespace SILLY
│ │ │ │ +
44namespace SILLY
│ │ │ │ +
45{
│ │ │ │ +
46int PNGImageContext::read(png_bytep data, png_size_t length)
│ │ │ │
47{
│ │ │ │ -
48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t length)
│ │ │ │ -
49{
│ │ │ │ -
50 PNGImageContext* png = reinterpret_cast<PNGImageContext*>(png_get_io_ptr(png_ptr));
│ │ │ │ -
51 int readed = png->read(data, length);
│ │ │ │ -
52 if (readed != (int)length)
│ │ │ │ -
53 {
│ │ │ │ -
54 png_error(png_ptr, "PNG_read_function error");
│ │ │ │ -
55 }
│ │ │ │ +
48 //printf("PNG Read: %d bytes offset: %d, size %d\n",
│ │ │ │ +
49 // length, d_offset, d_data->getSize());
│ │ │ │ +
50
│ │ │ │ +
51 if (d_offset + length > d_data->getSize())
│ │ │ │ +
52 return -1;
│ │ │ │ +
53 memcpy(data, d_data->getDataPtr() + d_offset, length);
│ │ │ │ +
54 d_offset += length;
│ │ │ │ +
55 return length;
│ │ │ │
56}
│ │ │ │
57
│ │ │ │ -
58void PNG_warning_function(png_structp png_ptr,
│ │ │ │ -
59 png_const_charp error)
│ │ │ │ -
60{
│ │ │ │ -
61// printf("PNG Warning: %s\n", error);
│ │ │ │ -
62}
│ │ │ │ -
63
│ │ │ │ -
64void PNG_error_function(png_structp png_ptr,
│ │ │ │ -
65 png_const_charp error)
│ │ │ │ +
58
│ │ │ │ +
59PNGImageContext::PNGImageContext(DataSource* data)
│ │ │ │ +
60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0)
│ │ │ │ +
61{
│ │ │ │ +
62
│ │ │ │ +
63}
│ │ │ │ +
64
│ │ │ │ +
65PNGImageContext::~PNGImageContext()
│ │ │ │
66{
│ │ │ │ -
67 // printf("PNG Error: %s\n", error);
│ │ │ │ -
68 // copied from libpng's pngerror.cpp
│ │ │ │ -
69 jmp_buf buf;
│ │ │ │ -
70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
│ │ │ │ -
71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf));
│ │ │ │ -
72#else
│ │ │ │ -
73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
│ │ │ │ -
74#endif
│ │ │ │ -
75 longjmp(buf, 1);
│ │ │ │ -
76}
│ │ │ │ -
77
│ │ │ │ -
78
│ │ │ │ -
79PNGImageLoader::PNGImageLoader()
│ │ │ │ -
80 : ImageLoader("PNG Image Loader based on libpng")
│ │ │ │ -
81{
│ │ │ │ -
82}
│ │ │ │ -
83PNGImageLoader::~PNGImageLoader()
│ │ │ │ -
84{
│ │ │ │ -
85}
│ │ │ │ -
86
│ │ │ │ -
87
│ │ │ │ -
88ImageContext* PNGImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
│ │ │ │ -
89{
│ │ │ │ -
90 PNGImageContext* png = new PNGImageContext(data);
│ │ │ │ -
91 if (!png)
│ │ │ │ -
92 {
│ │ │ │ -
93 return 0;
│ │ │ │ -
94
│ │ │ │ -
95 }
│ │ │ │ -
96 // Prepare png loading
│ │ │ │ -
97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
│ │ │ │ -
98 if (png->d_png_ptr == 0)
│ │ │ │ -
99 {
│ │ │ │ -
100 delete png;
│ │ │ │ -
101 return 0;
│ │ │ │ -
102 }
│ │ │ │ -
103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr);
│ │ │ │ -
104 if (png->d_info_ptr == 0)
│ │ │ │ -
105 {
│ │ │ │ -
106 delete png;
│ │ │ │ -
107 return 0;
│ │ │ │ -
108 }
│ │ │ │ -
109 if (setjmp(png_jmpbuf(png->d_png_ptr)))
│ │ │ │ -
110 {
│ │ │ │ -
111 delete png;
│ │ │ │ -
112 return 0;
│ │ │ │ -
113 }
│ │ │ │ -
114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function, PNG_warning_function);
│ │ │ │ -
115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function);
│ │ │ │ -
116 //png_set_sig_bytes(png->d_png_ptr, 8);
│ │ │ │ -
117
│ │ │ │ -
118
│ │ │ │ -
119
│ │ │ │ -
120 // Read header Check whether PNG can depaletize transparently or not
│ │ │ │ -
121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND;
│ │ │ │ -
122 //printf("Start reading png\n");
│ │ │ │ -
123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0);
│ │ │ │ -
124 png->setImageSize();
│ │ │ │ -
125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr);
│ │ │ │ -
126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr);
│ │ │ │ -
127 //printf("PNG Info: width: %d height: %d bpp: %d channels: %d\n", png->getWidth(), png->getHeight(), png->d_bit_depth, png->d_num_channels);
│ │ │ │ -
128 if (png->d_bit_depth == 8)
│ │ │ │ -
129 {
│ │ │ │ -
130 if (png->d_num_channels == 4)
│ │ │ │ -
131 {
│ │ │ │ -
132 formatSource = PF_RGBA;
│ │ │ │ -
133 }
│ │ │ │ -
134 else if (png->d_num_channels == 3)
│ │ │ │ -
135 {
│ │ │ │ -
136 formatSource = PF_RGB;
│ │ │ │ -
137 }
│ │ │ │ -
138 else
│ │ │ │ -
139 {
│ │ │ │ -
140 delete png;
│ │ │ │ -
141 return 0;
│ │ │ │ -
142 }
│ │ │ │ -
143 }
│ │ │ │ -
144 // Paletized or grayscale not yet handled
│ │ │ │ -
145 else
│ │ │ │ -
146 {
│ │ │ │ -
147 delete png;
│ │ │ │ -
148 return 0;
│ │ │ │ -
149 }
│ │ │ │ -
150 return png;
│ │ │ │ -
151}
│ │ │ │ -
152
│ │ │ │ -
153
│ │ │ │ -
154bool PNGImageLoader::loadImageData(PixelOrigin origin,
│ │ │ │ -
155 DataSource* data,
│ │ │ │ -
156 ImageContext* context)
│ │ │ │ -
157{
│ │ │ │ -
158 PNGImageContext* png = static_cast<PNGImageContext*>(context);
│ │ │ │ -
159 byte red;
│ │ │ │ -
160 byte green;
│ │ │ │ -
161 byte blue;
│ │ │ │ -
162 byte alpha;
│ │ │ │ -
163 size_t width = png->getWidth();
│ │ │ │ -
164 size_t height = png->getHeight();
│ │ │ │ -
165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr);
│ │ │ │ -
166 if (png->d_bit_depth == 8)
│ │ │ │ -
167 {
│ │ │ │ -
168 // Read RGBA
│ │ │ │ -
169 if (png->d_num_channels == 4)
│ │ │ │ -
170 {
│ │ │ │ -
171 for (size_t j = 0 ; j < height ; ++j)
│ │ │ │ -
172 {
│ │ │ │ -
173 for(size_t i = 0 ; i < width ; ++i)
│ │ │ │ -
174 {
│ │ │ │ -
175 size_t pixel_offset = 4 * i;
│ │ │ │ -
176 red = *(row_pointers[j] + pixel_offset);
│ │ │ │ -
177 green = *(row_pointers[j] + pixel_offset + 1);
│ │ │ │ -
178 blue = *(row_pointers[j] + pixel_offset + 2);
│ │ │ │ -
179 alpha = *(row_pointers[j] + pixel_offset + 3);
│ │ │ │ -
180 png->setNextPixel(red, green, blue, alpha);
│ │ │ │ -
181 }
│ │ │ │ -
182 }
│ │ │ │ -
183 }
│ │ │ │ -
184 else if (png->d_num_channels == 3)
│ │ │ │ -
185 {
│ │ │ │ -
186 alpha = 0xff;
│ │ │ │ -
187 for (size_t j = 0 ; j < height ; ++j)
│ │ │ │ -
188 {
│ │ │ │ -
189 for(size_t i = 0 ; i < width ; ++i)
│ │ │ │ -
190 {
│ │ │ │ -
191 size_t pixel_offset = 3 * i;
│ │ │ │ -
192 red = *(row_pointers[j] + pixel_offset);
│ │ │ │ -
193 green = *(row_pointers[j] + pixel_offset + 1);
│ │ │ │ -
194 blue = *(row_pointers[j] + pixel_offset + 2);
│ │ │ │ -
195 png->setNextPixel(red, green, blue, alpha);
│ │ │ │ -
196 }
│ │ │ │ -
197 }
│ │ │ │ -
198
│ │ │ │ -
199 }
│ │ │ │ -
200 }
│ │ │ │ -
201 if (origin == PO_BOTTOM_LEFT)
│ │ │ │ -
202 return png->flipVertically();
│ │ │ │ -
203
│ │ │ │ -
204 return true;
│ │ │ │ -
205}
│ │ │ │ -
206
│ │ │ │ -
207} // End section of namespace SILLY
│ │ │ │ +
67 if (d_info_ptr)
│ │ │ │ +
68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0);
│ │ │ │ +
69 if (d_png_ptr)
│ │ │ │ +
70 png_destroy_read_struct(&d_png_ptr, 0, 0);
│ │ │ │ +
71}
│ │ │ │ +
72
│ │ │ │ +
73
│ │ │ │ +
74void PNGImageContext::setImageSize()
│ │ │ │ +
75{
│ │ │ │ +
76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr));
│ │ │ │ +
77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr));
│ │ │ │ +
78
│ │ │ │ +
79}
│ │ │ │ +
80
│ │ │ │ +
81
│ │ │ │ +
82} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
Image Context for PNG Image Loader.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
│ │ │ │ -
bool flipVertically()
Flip pixel ordering.
│ │ │ │ +
virtual size_t getSize() const =0
Return the size of the data.
│ │ │ │ +
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ * loaders │ │ │ │ │ -SILLYPNGImageLoader.cpp │ │ │ │ │ +SILLYPNGImageContext.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYPNGImageLoader.cpp │ │ │ │ │ + 2 filename: SILLYPNGImageContext.cpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Definition of the PNGImageLoader methods │ │ │ │ │ + 6 purpose: Definition of PNGImageContext methods │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -38,218 +38,70 @@ │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ - 32#include │ │ │ │ │ - 33#endif │ │ │ │ │ - 34 │ │ │ │ │ - 35#include "loaders/SILLYPNGImageLoader.h" │ │ │ │ │ - 36 │ │ │ │ │ - 37#ifndef SILLY_OPT_INLINE │ │ │ │ │ - 38#define inline │ │ │ │ │ - 39#include "loaders/SILLYPNGImageLoader.icpp" │ │ │ │ │ - 40#undef inline │ │ │ │ │ - 41#endif │ │ │ │ │ + 32#endif │ │ │ │ │ + 33 │ │ │ │ │ + 34#include "loaders/SILLYPNGImageContext.h" │ │ │ │ │ + 35 │ │ │ │ │ + 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ + 37#define inline │ │ │ │ │ + 38#include "loaders/SILLYPNGImageContext.icpp" │ │ │ │ │ + 39#undef inline │ │ │ │ │ + 40#endif │ │ │ │ │ + 41#include │ │ │ │ │ 42 │ │ │ │ │ - 43#include "loaders/SILLYPNGImageContext.h" │ │ │ │ │ - 44#include │ │ │ │ │ - 45// Start section of namespace SILLY │ │ │ │ │ - 46namespace SILLY │ │ │ │ │ + 43// Start section of namespace SILLY │ │ │ │ │ + 44namespace SILLY │ │ │ │ │ + 45{ │ │ │ │ │ + 46int PNGImageContext::read(png_bytep data, png_size_t length) │ │ │ │ │ 47{ │ │ │ │ │ - 48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t │ │ │ │ │ -length) │ │ │ │ │ - 49{ │ │ │ │ │ - 50 PNGImageContext* png = reinterpret_cast(png_get_io_ptr │ │ │ │ │ -(png_ptr)); │ │ │ │ │ - 51 int readed = png->read(data, length); │ │ │ │ │ - 52 if (readed != (int)length) │ │ │ │ │ - 53 { │ │ │ │ │ - 54 png_error(png_ptr, "PNG_read_function error"); │ │ │ │ │ - 55 } │ │ │ │ │ + 48 //printf("PNG Read: %d bytes offset: %d, size %d\n", │ │ │ │ │ + 49 // length, d_offset, d_data->getSize()); │ │ │ │ │ + 50 │ │ │ │ │ + 51 if (d_offset + length > d_data->getSize()) │ │ │ │ │ + 52 return -1; │ │ │ │ │ + 53 memcpy(data, d_data->getDataPtr() + d_offset, length); │ │ │ │ │ + 54 d_offset += length; │ │ │ │ │ + 55 return length; │ │ │ │ │ 56} │ │ │ │ │ 57 │ │ │ │ │ - 58void PNG_warning_function(png_structp png_ptr, │ │ │ │ │ - 59 png_const_charp error) │ │ │ │ │ - 60{ │ │ │ │ │ - 61// printf("PNG Warning: %s\n", error); │ │ │ │ │ - 62} │ │ │ │ │ - 63 │ │ │ │ │ - 64void PNG_error_function(png_structp png_ptr, │ │ │ │ │ - 65 png_const_charp error) │ │ │ │ │ + 58 │ │ │ │ │ + 59PNGImageContext::PNGImageContext(DataSource* data) │ │ │ │ │ + 60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0) │ │ │ │ │ + 61{ │ │ │ │ │ + 62 │ │ │ │ │ + 63} │ │ │ │ │ + 64 │ │ │ │ │ + 65PNGImageContext::~PNGImageContext() │ │ │ │ │ 66{ │ │ │ │ │ - 67 // printf("PNG Error: %s\n", error); │ │ │ │ │ - 68 // copied from libpng's pngerror.cpp │ │ │ │ │ - 69 jmp_buf buf; │ │ │ │ │ - 70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 │ │ │ │ │ - 71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf)); │ │ │ │ │ - 72#else │ │ │ │ │ - 73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf)); │ │ │ │ │ - 74#endif │ │ │ │ │ - 75 longjmp(buf, 1); │ │ │ │ │ - 76} │ │ │ │ │ - 77 │ │ │ │ │ + 67 if (d_info_ptr) │ │ │ │ │ + 68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0); │ │ │ │ │ + 69 if (d_png_ptr) │ │ │ │ │ + 70 png_destroy_read_struct(&d_png_ptr, 0, 0); │ │ │ │ │ + 71} │ │ │ │ │ + 72 │ │ │ │ │ + 73 │ │ │ │ │ + 74void PNGImageContext::setImageSize() │ │ │ │ │ + 75{ │ │ │ │ │ + 76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr)); │ │ │ │ │ + 77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr)); │ │ │ │ │ 78 │ │ │ │ │ - 79PNGImageLoader::PNGImageLoader() │ │ │ │ │ - 80 : ImageLoader("PNG Image Loader based on libpng") │ │ │ │ │ - 81{ │ │ │ │ │ - 82} │ │ │ │ │ - 83PNGImageLoader::~PNGImageLoader() │ │ │ │ │ - 84{ │ │ │ │ │ - 85} │ │ │ │ │ - 86 │ │ │ │ │ - 87 │ │ │ │ │ -88ImageContext* PNGImageLoader::loadHeader(PixelFormat& formatSource, │ │ │ │ │ -DataSource* data) │ │ │ │ │ - 89{ │ │ │ │ │ - 90 PNGImageContext* png = new PNGImageContext(data); │ │ │ │ │ - 91 if (!png) │ │ │ │ │ - 92 { │ │ │ │ │ - 93 return 0; │ │ │ │ │ - 94 │ │ │ │ │ - 95 } │ │ │ │ │ - 96 // Prepare png loading │ │ │ │ │ - 97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); │ │ │ │ │ - 98 if (png->d_png_ptr == 0) │ │ │ │ │ - 99 { │ │ │ │ │ - 100 delete png; │ │ │ │ │ - 101 return 0; │ │ │ │ │ - 102 } │ │ │ │ │ - 103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr); │ │ │ │ │ - 104 if (png->d_info_ptr == 0) │ │ │ │ │ - 105 { │ │ │ │ │ - 106 delete png; │ │ │ │ │ - 107 return 0; │ │ │ │ │ - 108 } │ │ │ │ │ - 109 if (setjmp(png_jmpbuf(png->d_png_ptr))) │ │ │ │ │ - 110 { │ │ │ │ │ - 111 delete png; │ │ │ │ │ - 112 return 0; │ │ │ │ │ - 113 } │ │ │ │ │ - 114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function, │ │ │ │ │ -PNG_warning_function); │ │ │ │ │ - 115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function); │ │ │ │ │ - 116 //png_set_sig_bytes(png->d_png_ptr, 8); │ │ │ │ │ - 117 │ │ │ │ │ - 118 │ │ │ │ │ - 119 │ │ │ │ │ - 120 // Read header Check whether PNG can depaletize transparently or not │ │ │ │ │ - 121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND; │ │ │ │ │ - 122 //printf("Start reading png\n"); │ │ │ │ │ - 123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0); │ │ │ │ │ - 124 png->setImageSize(); │ │ │ │ │ - 125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr); │ │ │ │ │ - 126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr); │ │ │ │ │ - 127 //printf("PNG Info: width: %d height: %d bpp: %d channels: %d\n", png- │ │ │ │ │ ->getWidth(), png->getHeight(), png->d_bit_depth, png->d_num_channels); │ │ │ │ │ - 128 if (png->d_bit_depth == 8) │ │ │ │ │ - 129 { │ │ │ │ │ - 130 if (png->d_num_channels == 4) │ │ │ │ │ - 131 { │ │ │ │ │ - 132 formatSource = PF_RGBA; │ │ │ │ │ - 133 } │ │ │ │ │ - 134 else if (png->d_num_channels == 3) │ │ │ │ │ - 135 { │ │ │ │ │ - 136 formatSource = PF_RGB; │ │ │ │ │ - 137 } │ │ │ │ │ - 138 else │ │ │ │ │ - 139 { │ │ │ │ │ - 140 delete png; │ │ │ │ │ - 141 return 0; │ │ │ │ │ - 142 } │ │ │ │ │ - 143 } │ │ │ │ │ - 144 // Paletized or grayscale not yet handled │ │ │ │ │ - 145 else │ │ │ │ │ - 146 { │ │ │ │ │ - 147 delete png; │ │ │ │ │ - 148 return 0; │ │ │ │ │ - 149 } │ │ │ │ │ - 150 return png; │ │ │ │ │ - 151} │ │ │ │ │ - 152 │ │ │ │ │ - 153 │ │ │ │ │ -154bool PNGImageLoader::loadImageData(PixelOrigin origin, │ │ │ │ │ - 155 DataSource* data, │ │ │ │ │ - 156 ImageContext* context) │ │ │ │ │ - 157{ │ │ │ │ │ - 158 PNGImageContext* png = static_cast(context); │ │ │ │ │ - 159 byte red; │ │ │ │ │ - 160 byte green; │ │ │ │ │ - 161 byte blue; │ │ │ │ │ - 162 byte alpha; │ │ │ │ │ - 163 size_t width = png->getWidth(); │ │ │ │ │ - 164 size_t height = png->getHeight(); │ │ │ │ │ - 165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr); │ │ │ │ │ - 166 if (png->d_bit_depth == 8) │ │ │ │ │ - 167 { │ │ │ │ │ - 168 // Read RGBA │ │ │ │ │ - 169 if (png->d_num_channels == 4) │ │ │ │ │ - 170 { │ │ │ │ │ - 171 for (size_t j = 0 ; j < height ; ++j) │ │ │ │ │ - 172 { │ │ │ │ │ - 173 for(size_t i = 0 ; i < width ; ++i) │ │ │ │ │ - 174 { │ │ │ │ │ - 175 size_t pixel_offset = 4 * i; │ │ │ │ │ - 176 red = *(row_pointers[j] + pixel_offset); │ │ │ │ │ - 177 green = *(row_pointers[j] + pixel_offset + 1); │ │ │ │ │ - 178 blue = *(row_pointers[j] + pixel_offset + 2); │ │ │ │ │ - 179 alpha = *(row_pointers[j] + pixel_offset + 3); │ │ │ │ │ - 180 png->setNextPixel(red, green, blue, alpha); │ │ │ │ │ - 181 } │ │ │ │ │ - 182 } │ │ │ │ │ - 183 } │ │ │ │ │ - 184 else if (png->d_num_channels == 3) │ │ │ │ │ - 185 { │ │ │ │ │ - 186 alpha = 0xff; │ │ │ │ │ - 187 for (size_t j = 0 ; j < height ; ++j) │ │ │ │ │ - 188 { │ │ │ │ │ - 189 for(size_t i = 0 ; i < width ; ++i) │ │ │ │ │ - 190 { │ │ │ │ │ - 191 size_t pixel_offset = 3 * i; │ │ │ │ │ - 192 red = *(row_pointers[j] + pixel_offset); │ │ │ │ │ - 193 green = *(row_pointers[j] + pixel_offset + 1); │ │ │ │ │ - 194 blue = *(row_pointers[j] + pixel_offset + 2); │ │ │ │ │ - 195 png->setNextPixel(red, green, blue, alpha); │ │ │ │ │ - 196 } │ │ │ │ │ - 197 } │ │ │ │ │ - 198 │ │ │ │ │ - 199 } │ │ │ │ │ - 200 } │ │ │ │ │ - 201 if (origin == PO_BOTTOM_LEFT) │ │ │ │ │ - 202 return png->flipVertically(); │ │ │ │ │ - 203 │ │ │ │ │ - 204 return true; │ │ │ │ │ - 205} │ │ │ │ │ - 206 │ │ │ │ │ - 207} // End section of namespace SILLY │ │ │ │ │ + 79} │ │ │ │ │ + 80 │ │ │ │ │ + 81 │ │ │ │ │ + 82} // End section of namespace SILLY │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PixelFormat │ │ │ │ │ -PixelFormat │ │ │ │ │ -List all pixel format supported. │ │ │ │ │ -Definition: SILLYBase.h:60 │ │ │ │ │ -SILLY::PixelOrigin │ │ │ │ │ -PixelOrigin │ │ │ │ │ -List all pixel origin supported. │ │ │ │ │ -Definition: SILLYBase.h:71 │ │ │ │ │ -SILLY::PNGImageContext │ │ │ │ │ -Image Context for PNG Image Loader. │ │ │ │ │ -Definition: SILLYPNGImageContext.h:46 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ -SILLY::ImageContext::setNextPixel │ │ │ │ │ -void setNextPixel(byte red, byte green, byte bleu, byte alpha) │ │ │ │ │ -Set the next pixel of the image. │ │ │ │ │ -SILLY::ImageContext::flipVertically │ │ │ │ │ -bool flipVertically() │ │ │ │ │ -Flip pixel ordering. │ │ │ │ │ -Definition: SILLYImageContext.cpp:45 │ │ │ │ │ +SILLY::DataSource::getSize │ │ │ │ │ +virtual size_t getSize() const =0 │ │ │ │ │ +Return the size of the data. │ │ │ │ │ +SILLY::DataSource::getDataPtr │ │ │ │ │ +virtual const byte * getDataPtr() const =0 │ │ │ │ │ +Get raw access to the image data. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00017_source.html │ │ │ │ @@ -200,21 +200,21 @@ │ │ │ │
152
│ │ │ │
153
│ │ │ │
154
│ │ │ │
155
│ │ │ │
156
│ │ │ │
157} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
Image Context for JPG image loader.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
Image Context for JPG image loader.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
│ │ │ │ -
bool flipVertically()
Flip pixel ordering.
│ │ │ │ +
bool flipVertically()
Flip pixel ordering.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00020_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYMemoryDataSource.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYDataSource.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYMemoryDataSource.cpp
│ │ │ │ +
SILLYDataSource.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYMemoryDataSource.cpp
│ │ │ │ +
2 filename: SILLYDataSource.cpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: SILLYMemoryDataSource definition for the SILLY library
│ │ │ │ +
6 purpose: SILLYDataSource definition for the SILLY library
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,38 +75,32 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "SILLYMemoryDataSource.h"
│ │ │ │ +
34#include "SILLYDataSource.h"
│ │ │ │
35
│ │ │ │
36#ifndef SILLY_OPT_INLINE
│ │ │ │
37#define inline
│ │ │ │ -
38#include "SILLYMemoryDataSource.icpp"
│ │ │ │ +
38#include "SILLYDataSource.icpp"
│ │ │ │
39#undef inline
│ │ │ │
40#endif
│ │ │ │
41
│ │ │ │ -
42// Start of SILLY namespace section
│ │ │ │ +
42// Start of SILLY namespace section
│ │ │ │
43namespace SILLY
│ │ │ │
44{
│ │ │ │
45
│ │ │ │ -
46MemoryDataSource::MemoryDataSource(const byte* data, size_t size)
│ │ │ │ -
47 : d_bytes(data), d_size(size)
│ │ │ │ -
48{
│ │ │ │ -
49 assert(data && "ASSERT: data point to an invalid memory");
│ │ │ │ -
50 assert(size && "ASSERT: size is equal to 0");
│ │ │ │ -
51}
│ │ │ │ -
52
│ │ │ │ -
53} // End of SILLY namespace section
│ │ │ │ -
54
│ │ │ │ -
55
│ │ │ │ +
46} // End of SILLY namespace section
│ │ │ │ +
47
│ │ │ │ +
48
│ │ │ │ +
49
│ │ │ │ +
50
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
MemoryDataSource(const byte *data, size_t size)
Create a data source from an existing memory area.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ -SILLYMemoryDataSource.cpp │ │ │ │ │ +SILLYDataSource.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYMemoryDataSource.cpp │ │ │ │ │ + 2 filename: SILLYDataSource.cpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: SILLYMemoryDataSource definition for the SILLY library │ │ │ │ │ + 6 purpose: SILLYDataSource definition for the SILLY library │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,39 +39,30 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "SILLYMemoryDataSource.h" │ │ │ │ │ + 34#include "SILLYDataSource.h" │ │ │ │ │ 35 │ │ │ │ │ 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ 37#define inline │ │ │ │ │ - 38#include "SILLYMemoryDataSource.icpp" │ │ │ │ │ + 38#include "SILLYDataSource.icpp" │ │ │ │ │ 39#undef inline │ │ │ │ │ 40#endif │ │ │ │ │ 41 │ │ │ │ │ 42// Start of SILLY namespace section │ │ │ │ │ 43namespace SILLY │ │ │ │ │ 44{ │ │ │ │ │ 45 │ │ │ │ │ -46MemoryDataSource::MemoryDataSource(const byte* data, size_t size) │ │ │ │ │ - 47 : d_bytes(data), d_size(size) │ │ │ │ │ - 48{ │ │ │ │ │ - 49 assert(data && "ASSERT: data point to an invalid memory"); │ │ │ │ │ - 50 assert(size && "ASSERT: size is equal to 0"); │ │ │ │ │ - 51} │ │ │ │ │ - 52 │ │ │ │ │ - 53} // End of SILLY namespace section │ │ │ │ │ - 54 │ │ │ │ │ - 55 │ │ │ │ │ + 46} // End of SILLY namespace section │ │ │ │ │ + 47 │ │ │ │ │ + 48 │ │ │ │ │ + 49 │ │ │ │ │ + 50 │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::MemoryDataSource::MemoryDataSource │ │ │ │ │ -MemoryDataSource(const byte *data, size_t size) │ │ │ │ │ -Create a data source from an existing memory area. │ │ │ │ │ -Definition: SILLYMemoryDataSource.cpp:46 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00023_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageLoaderManager.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYFileDataSource.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageLoaderManager.cpp
│ │ │ │ +
SILLYFileDataSource.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: ImageLoaderManager.cpp
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ +
2 filename: SILLYFileDataSource.cpp
│ │ │ │ +
3 created: 20 Jul 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Manage the list of existing ImageLoader
│ │ │ │ +
6 purpose: Implementation of the FileDataSource methods
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,101 +75,76 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "SILLYImageLoaderManager.h"
│ │ │ │ +
34#include "SILLYFileDataSource.h"
│ │ │ │
35
│ │ │ │
36#ifndef SILLY_OPT_INLINE
│ │ │ │
37#define inline
│ │ │ │ -
38#include "SILLYImageLoaderManager.icpp"
│ │ │ │ +
38#include "SILLYFileDataSource.icpp"
│ │ │ │
39#undef inline
│ │ │ │
40#endif
│ │ │ │ -
41#include "SILLYImageLoader.h"
│ │ │ │ -
42#include "loaders/SILLYTGAImageLoader.h"
│ │ │ │ -
43
│ │ │ │ -
44#ifdef SILLY_HAVE_JPG
│ │ │ │ -
45#include "loaders/SILLYJPGImageLoader.h"
│ │ │ │ -
46#endif
│ │ │ │ -
47
│ │ │ │ -
48#ifdef SILLY_HAVE_PNG
│ │ │ │ -
49#include "loaders/SILLYPNGImageLoader.h"
│ │ │ │ -
50#endif
│ │ │ │ -
51
│ │ │ │ -
52// Start of SILLY namespace section
│ │ │ │ -
53namespace SILLY
│ │ │ │ -
54{
│ │ │ │ -
55
│ │ │ │ -
56// we need to do "reference counting" for init/exit to allow silly to be used
│ │ │ │ -
57// from inside multiple independent libraries simultaneously.
│ │ │ │ -
58static size_t silly_init_counter = 0;
│ │ │ │ -
59
│ │ │ │ -
60ImageLoaderManager* ImageLoaderManager::d_instance = 0;
│ │ │ │ -
61
│ │ │ │ - │ │ │ │ -
63{
│ │ │ │ -
64 assert(d_instance == 0);
│ │ │ │ -
65 d_instance = this;
│ │ │ │ - │ │ │ │ -
67#ifdef SILLY_HAVE_JPG
│ │ │ │ - │ │ │ │ -
69#endif
│ │ │ │ -
70#ifdef SILLY_HAVE_PNG
│ │ │ │ - │ │ │ │ -
72#endif
│ │ │ │ -
73// Add other builtins loader here
│ │ │ │ -
74
│ │ │ │ -
75}
│ │ │ │ -
76
│ │ │ │ - │ │ │ │ -
78{
│ │ │ │ -
79 for(ImageLoaderList::iterator iter = d_loaders.begin() ; iter != d_loaders.end() ; ++iter)
│ │ │ │ -
80 {
│ │ │ │ -
81 delete (*iter);
│ │ │ │ +
41#include <stdio.h>
│ │ │ │ +
42// Start section of namespace SILLY
│ │ │ │ +
43namespace SILLY
│ │ │ │ +
44{
│ │ │ │ +
45
│ │ │ │ +
46FileDataSource::FileDataSource(const char* filename)
│ │ │ │ +
47 : d_error(true), d_bytes(0), d_size(0)
│ │ │ │ +
48{
│ │ │ │ +
49 FILE* data = fopen(filename, "rb");
│ │ │ │ +
50 if (data)
│ │ │ │ +
51 {
│ │ │ │ +
52 long status = fseek(data, 0, SEEK_END);
│ │ │ │ +
53 if (status == -1)
│ │ │ │ +
54 {
│ │ │ │ +
55 fclose(data);
│ │ │ │ +
56 return;
│ │ │ │ +
57 }
│ │ │ │ +
58 status = ftell(data);
│ │ │ │ +
59 if (status == -1)
│ │ │ │ +
60 {
│ │ │ │ +
61 fclose(data);
│ │ │ │ +
62 return;
│ │ │ │ +
63 }
│ │ │ │ +
64 d_size = status;
│ │ │ │ +
65 if (d_size)
│ │ │ │ +
66 d_bytes = new byte[d_size];
│ │ │ │ +
67 if (! d_bytes)
│ │ │ │ +
68 {
│ │ │ │ +
69 fclose(data);
│ │ │ │ +
70 return;
│ │ │ │ +
71 }
│ │ │ │ +
72 rewind(data);
│ │ │ │ +
73 status = fread(reinterpret_cast<void*>(d_bytes), 1, d_size, data);
│ │ │ │ +
74 if (status != d_size)
│ │ │ │ +
75 {
│ │ │ │ +
76 delete [] d_bytes;
│ │ │ │ +
77 d_bytes = 0;
│ │ │ │ +
78 fclose(data);
│ │ │ │ +
79 }
│ │ │ │ +
80 fclose(data);
│ │ │ │ +
81 d_error = false;
│ │ │ │
82 }
│ │ │ │ -
83 d_instance = 0;
│ │ │ │ -
84}
│ │ │ │ +
83}
│ │ │ │ +
84
│ │ │ │
85
│ │ │ │ -
86
│ │ │ │ - │ │ │ │ -
88{
│ │ │ │ -
89 if (ImageLoaderManager::getSingletonPtr() == 0)
│ │ │ │ -
90 {
│ │ │ │ -
91 if (!new ImageLoaderManager)
│ │ │ │ -
92 {
│ │ │ │ -
93 return false;
│ │ │ │ -
94 }
│ │ │ │ -
95 }
│ │ │ │ -
96 ++silly_init_counter;
│ │ │ │ -
97 return true;
│ │ │ │ -
98}
│ │ │ │ -
99
│ │ │ │ - │ │ │ │ -
101{
│ │ │ │ -
102 if (--silly_init_counter == 0)
│ │ │ │ -
103 {
│ │ │ │ -
104 delete ImageLoaderManager::getSingletonPtr();
│ │ │ │ -
105 }
│ │ │ │ -
106}
│ │ │ │ -
107
│ │ │ │ -
108} // End of SILLY namespace section
│ │ │ │ -
109
│ │ │ │ -
110
│ │ │ │ + │ │ │ │ +
87{
│ │ │ │ +
88 delete [] d_bytes;
│ │ │ │ +
89}
│ │ │ │ +
90
│ │ │ │ +
91
│ │ │ │ +
92} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
void SILLYCleanup()
Cleanup SILLY library internal.
│ │ │ │ -
bool SILLYInit()
Initialize the SILLY Library.
│ │ │ │ -
Loader class for JPG Image.
│ │ │ │ -
Loader for PNG Image.
│ │ │ │ -
Loader for Targa image.
│ │ │ │ -
Manage the list of all supported ImageLoader.
│ │ │ │ - │ │ │ │ -
void add(ImageLoader *loader)
Register an ImageLoader object.
│ │ │ │ - │ │ │ │ +
FileDataSource(const char *filename)
Create a data source from an existing file.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ -SILLYImageLoaderManager.cpp │ │ │ │ │ +SILLYFileDataSource.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: ImageLoaderManager.cpp │ │ │ │ │ - 3 created: 10 Jun 2006 │ │ │ │ │ + 2 filename: SILLYFileDataSource.cpp │ │ │ │ │ + 3 created: 20 Jul 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Manage the list of existing ImageLoader │ │ │ │ │ + 6 purpose: Implementation of the FileDataSource methods │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,123 +39,80 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "SILLYImageLoaderManager.h" │ │ │ │ │ + 34#include "SILLYFileDataSource.h" │ │ │ │ │ 35 │ │ │ │ │ 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ 37#define inline │ │ │ │ │ - 38#include "SILLYImageLoaderManager.icpp" │ │ │ │ │ + 38#include "SILLYFileDataSource.icpp" │ │ │ │ │ 39#undef inline │ │ │ │ │ 40#endif │ │ │ │ │ - 41#include "SILLYImageLoader.h" │ │ │ │ │ - 42#include "loaders/SILLYTGAImageLoader.h" │ │ │ │ │ - 43 │ │ │ │ │ - 44#ifdef SILLY_HAVE_JPG │ │ │ │ │ - 45#include "loaders/SILLYJPGImageLoader.h" │ │ │ │ │ - 46#endif │ │ │ │ │ - 47 │ │ │ │ │ - 48#ifdef SILLY_HAVE_PNG │ │ │ │ │ - 49#include "loaders/SILLYPNGImageLoader.h" │ │ │ │ │ - 50#endif │ │ │ │ │ - 51 │ │ │ │ │ - 52// Start of SILLY namespace section │ │ │ │ │ - 53namespace SILLY │ │ │ │ │ - 54{ │ │ │ │ │ - 55 │ │ │ │ │ - 56// we need to do "reference counting" for init/exit to allow silly to be │ │ │ │ │ -used │ │ │ │ │ - 57// from inside multiple independent libraries simultaneously. │ │ │ │ │ - 58static size_t silly_init_counter = 0; │ │ │ │ │ - 59 │ │ │ │ │ - 60ImageLoaderManager* ImageLoaderManager::d_instance = 0; │ │ │ │ │ - 61 │ │ │ │ │ -62ImageLoaderManager::ImageLoaderManager() │ │ │ │ │ - 63{ │ │ │ │ │ - 64 assert(d_instance == 0); │ │ │ │ │ - 65 d_instance = this; │ │ │ │ │ - 66 add(new TGAImageLoader); │ │ │ │ │ - 67#ifdef SILLY_HAVE_JPG │ │ │ │ │ - 68 add(new JPGImageLoader); │ │ │ │ │ - 69#endif │ │ │ │ │ - 70#ifdef SILLY_HAVE_PNG │ │ │ │ │ - 71 add(new PNGImageLoader); │ │ │ │ │ - 72#endif │ │ │ │ │ - 73// Add other builtins loader here │ │ │ │ │ - 74 │ │ │ │ │ - 75} │ │ │ │ │ - 76 │ │ │ │ │ -77ImageLoaderManager::~ImageLoaderManager() │ │ │ │ │ - 78{ │ │ │ │ │ - 79 for(ImageLoaderList::iterator iter = d_loaders.begin() ; iter != │ │ │ │ │ -d_loaders.end() ; ++iter) │ │ │ │ │ - 80 { │ │ │ │ │ - 81 delete (*iter); │ │ │ │ │ + 41#include │ │ │ │ │ + 42// Start section of namespace SILLY │ │ │ │ │ + 43namespace SILLY │ │ │ │ │ + 44{ │ │ │ │ │ + 45 │ │ │ │ │ +46FileDataSource::FileDataSource(const char* filename) │ │ │ │ │ + 47 : d_error(true), d_bytes(0), d_size(0) │ │ │ │ │ + 48{ │ │ │ │ │ + 49 FILE* data = fopen(filename, "rb"); │ │ │ │ │ + 50 if (data) │ │ │ │ │ + 51 { │ │ │ │ │ + 52 long status = fseek(data, 0, SEEK_END); │ │ │ │ │ + 53 if (status == -1) │ │ │ │ │ + 54 { │ │ │ │ │ + 55 fclose(data); │ │ │ │ │ + 56 return; │ │ │ │ │ + 57 } │ │ │ │ │ + 58 status = ftell(data); │ │ │ │ │ + 59 if (status == -1) │ │ │ │ │ + 60 { │ │ │ │ │ + 61 fclose(data); │ │ │ │ │ + 62 return; │ │ │ │ │ + 63 } │ │ │ │ │ + 64 d_size = status; │ │ │ │ │ + 65 if (d_size) │ │ │ │ │ + 66 d_bytes = new byte[d_size]; │ │ │ │ │ + 67 if (! d_bytes) │ │ │ │ │ + 68 { │ │ │ │ │ + 69 fclose(data); │ │ │ │ │ + 70 return; │ │ │ │ │ + 71 } │ │ │ │ │ + 72 rewind(data); │ │ │ │ │ + 73 status = fread(reinterpret_cast(d_bytes), 1, d_size, data); │ │ │ │ │ + 74 if (status != d_size) │ │ │ │ │ + 75 { │ │ │ │ │ + 76 delete [] d_bytes; │ │ │ │ │ + 77 d_bytes = 0; │ │ │ │ │ + 78 fclose(data); │ │ │ │ │ + 79 } │ │ │ │ │ + 80 fclose(data); │ │ │ │ │ + 81 d_error = false; │ │ │ │ │ 82 } │ │ │ │ │ - 83 d_instance = 0; │ │ │ │ │ - 84} │ │ │ │ │ + 83} │ │ │ │ │ + 84 │ │ │ │ │ 85 │ │ │ │ │ - 86 │ │ │ │ │ -87bool SILLYInit() │ │ │ │ │ - 88{ │ │ │ │ │ - 89 if (ImageLoaderManager::getSingletonPtr() == 0) │ │ │ │ │ - 90 { │ │ │ │ │ - 91 if (!new ImageLoaderManager) │ │ │ │ │ - 92 { │ │ │ │ │ - 93 return false; │ │ │ │ │ - 94 } │ │ │ │ │ - 95 } │ │ │ │ │ - 96 ++silly_init_counter; │ │ │ │ │ - 97 return true; │ │ │ │ │ - 98} │ │ │ │ │ - 99 │ │ │ │ │ -100void SILLYCleanup() │ │ │ │ │ - 101{ │ │ │ │ │ - 102 if (--silly_init_counter == 0) │ │ │ │ │ - 103 { │ │ │ │ │ - 104 delete ImageLoaderManager::getSingletonPtr(); │ │ │ │ │ - 105 } │ │ │ │ │ - 106} │ │ │ │ │ - 107 │ │ │ │ │ - 108} // End of SILLY namespace section │ │ │ │ │ - 109 │ │ │ │ │ - 110 │ │ │ │ │ +86FileDataSource::~FileDataSource() │ │ │ │ │ + 87{ │ │ │ │ │ + 88 delete [] d_bytes; │ │ │ │ │ + 89} │ │ │ │ │ + 90 │ │ │ │ │ + 91 │ │ │ │ │ + 92} // End section of namespace SILLY │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::SILLYCleanup │ │ │ │ │ -void SILLYCleanup() │ │ │ │ │ -Cleanup SILLY library internal. │ │ │ │ │ -Definition: SILLYImageLoaderManager.cpp:100 │ │ │ │ │ -SILLY::SILLYInit │ │ │ │ │ -bool SILLYInit() │ │ │ │ │ -Initialize the SILLY Library. │ │ │ │ │ -Definition: SILLYImageLoaderManager.cpp:87 │ │ │ │ │ -SILLY::JPGImageLoader │ │ │ │ │ -Loader class for JPG Image. │ │ │ │ │ -Definition: SILLYJPGImageLoader.h:43 │ │ │ │ │ -SILLY::PNGImageLoader │ │ │ │ │ -Loader for PNG Image. │ │ │ │ │ -Definition: SILLYPNGImageLoader.h:43 │ │ │ │ │ -SILLY::TGAImageLoader │ │ │ │ │ -Loader for Targa image. │ │ │ │ │ -Definition: SILLYTGAImageLoader.h:44 │ │ │ │ │ -SILLY::ImageLoaderManager │ │ │ │ │ -Manage the list of all supported ImageLoader. │ │ │ │ │ -Definition: SILLYImageLoaderManager.h:57 │ │ │ │ │ -SILLY::ImageLoaderManager::~ImageLoaderManager │ │ │ │ │ -~ImageLoaderManager() │ │ │ │ │ -Destructor. │ │ │ │ │ -Definition: SILLYImageLoaderManager.cpp:77 │ │ │ │ │ -SILLY::ImageLoaderManager::add │ │ │ │ │ -void add(ImageLoader *loader) │ │ │ │ │ -Register an ImageLoader object. │ │ │ │ │ -SILLY::ImageLoaderManager::ImageLoaderManager │ │ │ │ │ -ImageLoaderManager() │ │ │ │ │ -Constructor. │ │ │ │ │ -Definition: SILLYImageLoaderManager.cpp:62 │ │ │ │ │ +SILLY::FileDataSource::FileDataSource │ │ │ │ │ +FileDataSource(const char *filename) │ │ │ │ │ +Create a data source from an existing file. │ │ │ │ │ +Definition: SILLYFileDataSource.cpp:46 │ │ │ │ │ +SILLY::FileDataSource::~FileDataSource │ │ │ │ │ +~FileDataSource() │ │ │ │ │ +destructor │ │ │ │ │ +Definition: SILLYFileDataSource.cpp:86 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00026_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYFileDataSource.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImage.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYFileDataSource.cpp
│ │ │ │ +
SILLYImage.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYFileDataSource.cpp
│ │ │ │ -
3 created: 20 Jul 2006
│ │ │ │ +
2 filename: SILLYImage.cpp
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Implementation of the FileDataSource methods
│ │ │ │ +
6 purpose: Implementation of the Image class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,76 +75,100 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "SILLYFileDataSource.h"
│ │ │ │ +
34#include "SILLYImage.h"
│ │ │ │
35
│ │ │ │
36#ifndef SILLY_OPT_INLINE
│ │ │ │
37#define inline
│ │ │ │ -
38#include "SILLYFileDataSource.icpp"
│ │ │ │ +
38#include "SILLYImage.icpp"
│ │ │ │
39#undef inline
│ │ │ │
40#endif
│ │ │ │ -
41#include <stdio.h>
│ │ │ │ -
42// Start section of namespace SILLY
│ │ │ │ -
43namespace SILLY
│ │ │ │ -
44{
│ │ │ │ -
45
│ │ │ │ -
46FileDataSource::FileDataSource(const char* filename)
│ │ │ │ -
47 : d_error(true), d_bytes(0), d_size(0)
│ │ │ │ -
48{
│ │ │ │ -
49 FILE* data = fopen(filename, "rb");
│ │ │ │ -
50 if (data)
│ │ │ │ -
51 {
│ │ │ │ -
52 long status = fseek(data, 0, SEEK_END);
│ │ │ │ -
53 if (status == -1)
│ │ │ │ -
54 {
│ │ │ │ -
55 fclose(data);
│ │ │ │ -
56 return;
│ │ │ │ -
57 }
│ │ │ │ -
58 status = ftell(data);
│ │ │ │ -
59 if (status == -1)
│ │ │ │ -
60 {
│ │ │ │ -
61 fclose(data);
│ │ │ │ -
62 return;
│ │ │ │ -
63 }
│ │ │ │ -
64 d_size = status;
│ │ │ │ -
65 if (d_size)
│ │ │ │ -
66 d_bytes = new byte[d_size];
│ │ │ │ -
67 if (! d_bytes)
│ │ │ │ -
68 {
│ │ │ │ -
69 fclose(data);
│ │ │ │ -
70 return;
│ │ │ │ -
71 }
│ │ │ │ -
72 rewind(data);
│ │ │ │ -
73 status = fread(reinterpret_cast<void*>(d_bytes), 1, d_size, data);
│ │ │ │ -
74 if (status != d_size)
│ │ │ │ -
75 {
│ │ │ │ -
76 delete [] d_bytes;
│ │ │ │ -
77 d_bytes = 0;
│ │ │ │ -
78 fclose(data);
│ │ │ │ -
79 }
│ │ │ │ -
80 fclose(data);
│ │ │ │ -
81 d_error = false;
│ │ │ │ -
82 }
│ │ │ │ -
83}
│ │ │ │ -
84
│ │ │ │ +
41#include "SILLYImageLoaderManager.h"
│ │ │ │ +
42
│ │ │ │ +
43
│ │ │ │ +
44// Start section of namespace SILLY
│ │ │ │ +
45namespace SILLY
│ │ │ │ +
46{
│ │ │ │ +
47
│ │ │ │ + │ │ │ │ +
49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader(0)
│ │ │ │ +
50{
│ │ │ │ +
51}
│ │ │ │ +
52
│ │ │ │ +
53
│ │ │ │ + │ │ │ │ +
55{
│ │ │ │ +
56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin();
│ │ │ │ +
57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() ; ++iter)
│ │ │ │ +
58 {
│ │ │ │ +
59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data);
│ │ │ │ +
60 if (d_imageContext)
│ │ │ │ +
61 d_imageLoader = (*iter);
│ │ │ │ +
62 }
│ │ │ │ +
63 assert((! d_imageLoader || d_imageContext) && "ASSERT: Internal state of image invalid");
│ │ │ │ +
64 return d_imageLoader != 0;
│ │ │ │ +
65
│ │ │ │ +
66}
│ │ │ │ +
67
│ │ │ │ + │ │ │ │ +
69{
│ │ │ │ +
70 switch (resultFormat)
│ │ │ │ +
71 {
│ │ │ │ +
72 case PF_A1B5G5R5:
│ │ │ │ +
73 d_bpp = 2;
│ │ │ │ +
74 break;
│ │ │ │ +
75 case PF_RGB:
│ │ │ │ +
76 d_bpp = 3;
│ │ │ │ +
77 break;
│ │ │ │ +
78
│ │ │ │ +
79 case PF_RGBA:
│ │ │ │ +
80 d_bpp = 4;
│ │ │ │ +
81 break;
│ │ │ │ +
82 //default:
│ │ │ │ +
83 // Unsupported format
│ │ │ │ +
84 };
│ │ │ │
85
│ │ │ │ - │ │ │ │ -
87{
│ │ │ │ -
88 delete [] d_bytes;
│ │ │ │ -
89}
│ │ │ │ -
90
│ │ │ │ +
86 if (! allocate())
│ │ │ │ +
87 {
│ │ │ │ +
88 return false;
│ │ │ │ +
89 }
│ │ │ │ +
90 d_imageContext->setDestination(d_pixels, getWidth() * getHeight() * d_bpp, resultFormat);
│ │ │ │
91
│ │ │ │ -
92} // End section of namespace SILLY
│ │ │ │ +
92 if (! d_imageLoader->loadImageData(order, d_data, d_imageContext))
│ │ │ │ +
93 {
│ │ │ │ +
94 delete [] d_pixels;
│ │ │ │ +
95 return false;
│ │ │ │ +
96 }
│ │ │ │ +
97 return true;
│ │ │ │ +
98}
│ │ │ │ +
99
│ │ │ │ +
100bool Image::allocate()
│ │ │ │ +
101{
│ │ │ │ +
102 delete [] d_pixels;
│ │ │ │ +
103 d_pixels = 0;
│ │ │ │ +
104 d_pixels = new byte[d_bpp * getWidth() * getHeight()];
│ │ │ │ +
105 return d_pixels != 0;
│ │ │ │ +
106}
│ │ │ │ +
107
│ │ │ │ +
108} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
FileDataSource(const char *filename)
Create a data source from an existing file.
│ │ │ │ - │ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Image(DataSource &data)
Constructor.
Definition: SILLYImage.cpp:48
│ │ │ │ +
bool loadImageHeader()
Retrieve the information concerning the image object.
Definition: SILLYImage.cpp:54
│ │ │ │ +
bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin origin=PO_TOP_LEFT)
Load the image pixels in memory and store them in resultFormat.
Definition: SILLYImage.cpp:68
│ │ │ │ +
size_t getWidth() const
Retrieve the width of the image.
│ │ │ │ +
size_t getHeight() const
Retrieve the height of the image.
│ │ │ │ +
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
│ │ │ │ +
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ -SILLYFileDataSource.cpp │ │ │ │ │ +SILLYImage.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYFileDataSource.cpp │ │ │ │ │ - 3 created: 20 Jul 2006 │ │ │ │ │ + 2 filename: SILLYImage.cpp │ │ │ │ │ + 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Implementation of the FileDataSource methods │ │ │ │ │ + 6 purpose: Implementation of the Image class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,80 +39,130 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "SILLYFileDataSource.h" │ │ │ │ │ + 34#include "SILLYImage.h" │ │ │ │ │ 35 │ │ │ │ │ 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ 37#define inline │ │ │ │ │ - 38#include "SILLYFileDataSource.icpp" │ │ │ │ │ + 38#include "SILLYImage.icpp" │ │ │ │ │ 39#undef inline │ │ │ │ │ 40#endif │ │ │ │ │ - 41#include │ │ │ │ │ - 42// Start section of namespace SILLY │ │ │ │ │ - 43namespace SILLY │ │ │ │ │ - 44{ │ │ │ │ │ - 45 │ │ │ │ │ -46FileDataSource::FileDataSource(const char* filename) │ │ │ │ │ - 47 : d_error(true), d_bytes(0), d_size(0) │ │ │ │ │ - 48{ │ │ │ │ │ - 49 FILE* data = fopen(filename, "rb"); │ │ │ │ │ - 50 if (data) │ │ │ │ │ - 51 { │ │ │ │ │ - 52 long status = fseek(data, 0, SEEK_END); │ │ │ │ │ - 53 if (status == -1) │ │ │ │ │ - 54 { │ │ │ │ │ - 55 fclose(data); │ │ │ │ │ - 56 return; │ │ │ │ │ - 57 } │ │ │ │ │ - 58 status = ftell(data); │ │ │ │ │ - 59 if (status == -1) │ │ │ │ │ - 60 { │ │ │ │ │ - 61 fclose(data); │ │ │ │ │ - 62 return; │ │ │ │ │ - 63 } │ │ │ │ │ - 64 d_size = status; │ │ │ │ │ - 65 if (d_size) │ │ │ │ │ - 66 d_bytes = new byte[d_size]; │ │ │ │ │ - 67 if (! d_bytes) │ │ │ │ │ - 68 { │ │ │ │ │ - 69 fclose(data); │ │ │ │ │ - 70 return; │ │ │ │ │ - 71 } │ │ │ │ │ - 72 rewind(data); │ │ │ │ │ - 73 status = fread(reinterpret_cast(d_bytes), 1, d_size, data); │ │ │ │ │ - 74 if (status != d_size) │ │ │ │ │ - 75 { │ │ │ │ │ - 76 delete [] d_bytes; │ │ │ │ │ - 77 d_bytes = 0; │ │ │ │ │ - 78 fclose(data); │ │ │ │ │ - 79 } │ │ │ │ │ - 80 fclose(data); │ │ │ │ │ - 81 d_error = false; │ │ │ │ │ - 82 } │ │ │ │ │ - 83} │ │ │ │ │ - 84 │ │ │ │ │ + 41#include "SILLYImageLoaderManager.h" │ │ │ │ │ + 42 │ │ │ │ │ + 43 │ │ │ │ │ + 44// Start section of namespace SILLY │ │ │ │ │ + 45namespace SILLY │ │ │ │ │ + 46{ │ │ │ │ │ + 47 │ │ │ │ │ +48Image::Image(DataSource& source) │ │ │ │ │ + 49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader │ │ │ │ │ +(0) │ │ │ │ │ + 50{ │ │ │ │ │ + 51} │ │ │ │ │ + 52 │ │ │ │ │ + 53 │ │ │ │ │ +54bool Image::loadImageHeader() │ │ │ │ │ + 55{ │ │ │ │ │ + 56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin │ │ │ │ │ +(); │ │ │ │ │ + 57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() │ │ │ │ │ +; ++iter) │ │ │ │ │ + 58 { │ │ │ │ │ + 59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data); │ │ │ │ │ + 60 if (d_imageContext) │ │ │ │ │ + 61 d_imageLoader = (*iter); │ │ │ │ │ + 62 } │ │ │ │ │ + 63 assert((! d_imageLoader || d_imageContext) && "ASSERT: Internal state of │ │ │ │ │ +image invalid"); │ │ │ │ │ + 64 return d_imageLoader != 0; │ │ │ │ │ + 65 │ │ │ │ │ + 66} │ │ │ │ │ + 67 │ │ │ │ │ +68bool Image::loadImageData(PixelFormat resultFormat, PixelOrigin order) │ │ │ │ │ + 69{ │ │ │ │ │ + 70 switch (resultFormat) │ │ │ │ │ + 71 { │ │ │ │ │ + 72 case PF_A1B5G5R5: │ │ │ │ │ + 73 d_bpp = 2; │ │ │ │ │ + 74 break; │ │ │ │ │ + 75 case PF_RGB: │ │ │ │ │ + 76 d_bpp = 3; │ │ │ │ │ + 77 break; │ │ │ │ │ + 78 │ │ │ │ │ + 79 case PF_RGBA: │ │ │ │ │ + 80 d_bpp = 4; │ │ │ │ │ + 81 break; │ │ │ │ │ + 82 //default: │ │ │ │ │ + 83 // Unsupported format │ │ │ │ │ + 84 }; │ │ │ │ │ 85 │ │ │ │ │ -86FileDataSource::~FileDataSource() │ │ │ │ │ - 87{ │ │ │ │ │ - 88 delete [] d_bytes; │ │ │ │ │ - 89} │ │ │ │ │ - 90 │ │ │ │ │ + 86 if (! allocate()) │ │ │ │ │ + 87 { │ │ │ │ │ + 88 return false; │ │ │ │ │ + 89 } │ │ │ │ │ + 90 d_imageContext->setDestination(d_pixels, getWidth() * getHeight() * d_bpp, │ │ │ │ │ +resultFormat); │ │ │ │ │ 91 │ │ │ │ │ - 92} // End section of namespace SILLY │ │ │ │ │ + 92 if (! d_imageLoader->loadImageData(order, d_data, d_imageContext)) │ │ │ │ │ + 93 { │ │ │ │ │ + 94 delete [] d_pixels; │ │ │ │ │ + 95 return false; │ │ │ │ │ + 96 } │ │ │ │ │ + 97 return true; │ │ │ │ │ + 98} │ │ │ │ │ + 99 │ │ │ │ │ + 100bool Image::allocate() │ │ │ │ │ + 101{ │ │ │ │ │ + 102 delete [] d_pixels; │ │ │ │ │ + 103 d_pixels = 0; │ │ │ │ │ + 104 d_pixels = new byte[d_bpp * getWidth() * getHeight()]; │ │ │ │ │ + 105 return d_pixels != 0; │ │ │ │ │ + 106} │ │ │ │ │ + 107 │ │ │ │ │ + 108} // End section of namespace SILLY │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::FileDataSource::FileDataSource │ │ │ │ │ -FileDataSource(const char *filename) │ │ │ │ │ -Create a data source from an existing file. │ │ │ │ │ -Definition: SILLYFileDataSource.cpp:46 │ │ │ │ │ -SILLY::FileDataSource::~FileDataSource │ │ │ │ │ -~FileDataSource() │ │ │ │ │ -destructor │ │ │ │ │ -Definition: SILLYFileDataSource.cpp:86 │ │ │ │ │ +SILLY::PixelFormat │ │ │ │ │ +PixelFormat │ │ │ │ │ +List all pixel format supported. │ │ │ │ │ +Definition: SILLYBase.h:60 │ │ │ │ │ +SILLY::PixelOrigin │ │ │ │ │ +PixelOrigin │ │ │ │ │ +List all pixel origin supported. │ │ │ │ │ +Definition: SILLYBase.h:71 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::Image::Image │ │ │ │ │ +Image(DataSource &data) │ │ │ │ │ +Constructor. │ │ │ │ │ +Definition: SILLYImage.cpp:48 │ │ │ │ │ +SILLY::Image::loadImageHeader │ │ │ │ │ +bool loadImageHeader() │ │ │ │ │ +Retrieve the information concerning the image object. │ │ │ │ │ +Definition: SILLYImage.cpp:54 │ │ │ │ │ +SILLY::Image::loadImageData │ │ │ │ │ +bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin │ │ │ │ │ +origin=PO_TOP_LEFT) │ │ │ │ │ +Load the image pixels in memory and store them in resultFormat. │ │ │ │ │ +Definition: SILLYImage.cpp:68 │ │ │ │ │ +SILLY::Image::getWidth │ │ │ │ │ +size_t getWidth() const │ │ │ │ │ +Retrieve the width of the image. │ │ │ │ │ +SILLY::Image::getHeight │ │ │ │ │ +size_t getHeight() const │ │ │ │ │ +Retrieve the height of the image. │ │ │ │ │ +SILLY::ImageContext::setDestination │ │ │ │ │ +void setDestination(byte *pixels, size_t length, PixelFormat format) │ │ │ │ │ +Set the destination of the loading. │ │ │ │ │ +SILLY::ImageLoader::loadImageData │ │ │ │ │ +virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext │ │ │ │ │ +*context)=0 │ │ │ │ │ +Parse the pixels data of the image and fill the header struct. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00029_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageContext.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageLoader.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageContext.cpp
│ │ │ │ +
SILLYImageLoader.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYImageContext.cpp
│ │ │ │ +
2 filename: ImageLoader.cpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Implementation file for ImageContext class
│ │ │ │ +
6 purpose: Implementation of the ImageLoader
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,67 +75,41 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "SILLYImageContext.h"
│ │ │ │ +
34#include "SILLYImageLoader.h"
│ │ │ │
35#ifndef SILLY_OPT_INLINE
│ │ │ │
36#define inline
│ │ │ │ -
37#include "SILLYImageContext.icpp"
│ │ │ │ +
37#include "SILLYImageLoader.icpp"
│ │ │ │
38#undef inline
│ │ │ │ -
39#endif
│ │ │ │ -
40#include <cstring>
│ │ │ │ -
41// Start section of namespace SILLY
│ │ │ │ -
42namespace SILLY
│ │ │ │ -
43{
│ │ │ │ -
44
│ │ │ │ - │ │ │ │ -
46{
│ │ │ │ -
47 size_t depth;
│ │ │ │ -
48 switch(d_format)
│ │ │ │ -
49 {
│ │ │ │ -
50 case PF_A1B5G5R5:
│ │ │ │ -
51 depth = 2;
│ │ │ │ -
52 break;
│ │ │ │ -
53 case PF_RGB:
│ │ │ │ -
54 depth = 3;
│ │ │ │ -
55 break;
│ │ │ │ -
56 case PF_RGBA:
│ │ │ │ -
57 depth = 4;
│ │ │ │ -
58 break;
│ │ │ │ -
59 }
│ │ │ │ -
60
│ │ │ │ -
61 // Do the flipping
│ │ │ │ -
62 byte *p1,*p2,*tmp; // tmp pointers
│ │ │ │ -
63 size_t len = d_width * depth; // length of horizontal line in bytes
│ │ │ │ -
64 tmp = new byte[len]; // Allocate a temporary line
│ │ │ │ -
65 if ( !tmp )
│ │ │ │ -
66 return false;
│ │ │ │ -
67
│ │ │ │ -
68 size_t y , y2;
│ │ │ │ -
69 y2 = d_height - 1;
│ │ │ │ -
70 for ( y = 0; y < d_height >> 1; y++ )
│ │ │ │ -
71 {
│ │ │ │ -
72 p1 = (d_pixels) + len * y;
│ │ │ │ -
73 p2 = (d_pixels) + len * y2;
│ │ │ │ -
74 memcpy( tmp, p1, len );
│ │ │ │ -
75 memcpy( p1, p2, len );
│ │ │ │ -
76 memcpy( p2, tmp, len );
│ │ │ │ -
77 y2--;
│ │ │ │ -
78 }
│ │ │ │ -
79 delete [] tmp;
│ │ │ │ -
80 return true;
│ │ │ │ -
81}
│ │ │ │ -
82
│ │ │ │ -
83
│ │ │ │ -
84} // End section of namespace SILLY
│ │ │ │ +
39#endif
│ │ │ │ +
40#include "SILLYImageContext.h"
│ │ │ │ +
41
│ │ │ │ +
42// Start of SILLY namespace section
│ │ │ │ +
43namespace SILLY
│ │ │ │ +
44{
│ │ │ │ +
45
│ │ │ │ +
46
│ │ │ │ + │ │ │ │ +
48{
│ │ │ │ +
49 delete context;
│ │ │ │ +
50}
│ │ │ │ +
51
│ │ │ │ +
52
│ │ │ │ +
53} // end of SILLY namespace section
│ │ │ │ +
54
│ │ │ │ +
55
│ │ │ │ +
56
│ │ │ │ +
57
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
bool flipVertically()
Flip pixel ordering.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
void destroyContext(ImageContext *context)
Destroy the image context.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ -SILLYImageContext.cpp │ │ │ │ │ +SILLYImageLoader.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYImageContext.cpp │ │ │ │ │ + 2 filename: ImageLoader.cpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Implementation file for ImageContext class │ │ │ │ │ + 6 purpose: Implementation of the ImageLoader │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,68 +39,44 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "SILLYImageContext.h" │ │ │ │ │ + 34#include "SILLYImageLoader.h" │ │ │ │ │ 35#ifndef SILLY_OPT_INLINE │ │ │ │ │ 36#define inline │ │ │ │ │ - 37#include "SILLYImageContext.icpp" │ │ │ │ │ + 37#include "SILLYImageLoader.icpp" │ │ │ │ │ 38#undef inline │ │ │ │ │ 39#endif │ │ │ │ │ - 40#include │ │ │ │ │ - 41// Start section of namespace SILLY │ │ │ │ │ - 42namespace SILLY │ │ │ │ │ - 43{ │ │ │ │ │ - 44 │ │ │ │ │ -45bool ImageContext::flipVertically() │ │ │ │ │ - 46{ │ │ │ │ │ - 47 size_t depth; │ │ │ │ │ - 48 switch(d_format) │ │ │ │ │ - 49 { │ │ │ │ │ - 50 case PF_A1B5G5R5: │ │ │ │ │ - 51 depth = 2; │ │ │ │ │ - 52 break; │ │ │ │ │ - 53 case PF_RGB: │ │ │ │ │ - 54 depth = 3; │ │ │ │ │ - 55 break; │ │ │ │ │ - 56 case PF_RGBA: │ │ │ │ │ - 57 depth = 4; │ │ │ │ │ - 58 break; │ │ │ │ │ - 59 } │ │ │ │ │ - 60 │ │ │ │ │ - 61 // Do the flipping │ │ │ │ │ - 62 byte *p1,*p2,*tmp; // tmp pointers │ │ │ │ │ - 63 size_t len = d_width * depth; // length of horizontal line in bytes │ │ │ │ │ - 64 tmp = new byte[len]; // Allocate a temporary line │ │ │ │ │ - 65 if ( !tmp ) │ │ │ │ │ - 66 return false; │ │ │ │ │ - 67 │ │ │ │ │ - 68 size_t y , y2; │ │ │ │ │ - 69 y2 = d_height - 1; │ │ │ │ │ - 70 for ( y = 0; y < d_height >> 1; y++ ) │ │ │ │ │ - 71 { │ │ │ │ │ - 72 p1 = (d_pixels) + len * y; │ │ │ │ │ - 73 p2 = (d_pixels) + len * y2; │ │ │ │ │ - 74 memcpy( tmp, p1, len ); │ │ │ │ │ - 75 memcpy( p1, p2, len ); │ │ │ │ │ - 76 memcpy( p2, tmp, len ); │ │ │ │ │ - 77 y2--; │ │ │ │ │ - 78 } │ │ │ │ │ - 79 delete [] tmp; │ │ │ │ │ - 80 return true; │ │ │ │ │ - 81} │ │ │ │ │ - 82 │ │ │ │ │ - 83 │ │ │ │ │ - 84} // End section of namespace SILLY │ │ │ │ │ + 40#include "SILLYImageContext.h" │ │ │ │ │ + 41 │ │ │ │ │ + 42// Start of SILLY namespace section │ │ │ │ │ + 43namespace SILLY │ │ │ │ │ + 44{ │ │ │ │ │ + 45 │ │ │ │ │ + 46 │ │ │ │ │ +47void ImageLoader::destroyContext(ImageContext* context) │ │ │ │ │ + 48{ │ │ │ │ │ + 49 delete context; │ │ │ │ │ + 50} │ │ │ │ │ + 51 │ │ │ │ │ + 52 │ │ │ │ │ + 53} // end of SILLY namespace section │ │ │ │ │ + 54 │ │ │ │ │ + 55 │ │ │ │ │ + 56 │ │ │ │ │ + 57 │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::ImageContext::flipVertically │ │ │ │ │ -bool flipVertically() │ │ │ │ │ -Flip pixel ordering. │ │ │ │ │ -Definition: SILLYImageContext.cpp:45 │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ +SILLY::ImageLoader::destroyContext │ │ │ │ │ +void destroyContext(ImageContext *context) │ │ │ │ │ +Destroy the image context. │ │ │ │ │ +Definition: SILLYImageLoader.cpp:47 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00032_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYDataSource.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageLoaderManager.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYDataSource.cpp
│ │ │ │ +
SILLYImageLoaderManager.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYDataSource.cpp
│ │ │ │ +
2 filename: ImageLoaderManager.cpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: SILLYDataSource definition for the SILLY library
│ │ │ │ +
6 purpose: Manage the list of existing ImageLoader
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,32 +75,101 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "SILLYDataSource.h"
│ │ │ │ +
34#include "SILLYImageLoaderManager.h"
│ │ │ │
35
│ │ │ │
36#ifndef SILLY_OPT_INLINE
│ │ │ │
37#define inline
│ │ │ │ -
38#include "SILLYDataSource.icpp"
│ │ │ │ +
38#include "SILLYImageLoaderManager.icpp"
│ │ │ │
39#undef inline
│ │ │ │
40#endif
│ │ │ │ -
41
│ │ │ │ -
42// Start of SILLY namespace section
│ │ │ │ -
43namespace SILLY
│ │ │ │ -
44{
│ │ │ │ -
45
│ │ │ │ -
46} // End of SILLY namespace section
│ │ │ │ +
41#include "SILLYImageLoader.h"
│ │ │ │ +
42#include "loaders/SILLYTGAImageLoader.h"
│ │ │ │ +
43
│ │ │ │ +
44#ifdef SILLY_HAVE_JPG
│ │ │ │ +
45#include "loaders/SILLYJPGImageLoader.h"
│ │ │ │ +
46#endif
│ │ │ │
47
│ │ │ │ -
48
│ │ │ │ -
49
│ │ │ │ -
50
│ │ │ │ +
48#ifdef SILLY_HAVE_PNG
│ │ │ │ +
49#include "loaders/SILLYPNGImageLoader.h"
│ │ │ │ +
50#endif
│ │ │ │ +
51
│ │ │ │ +
52// Start of SILLY namespace section
│ │ │ │ +
53namespace SILLY
│ │ │ │ +
54{
│ │ │ │ +
55
│ │ │ │ +
56// we need to do "reference counting" for init/exit to allow silly to be used
│ │ │ │ +
57// from inside multiple independent libraries simultaneously.
│ │ │ │ +
58static size_t silly_init_counter = 0;
│ │ │ │ +
59
│ │ │ │ +
60ImageLoaderManager* ImageLoaderManager::d_instance = 0;
│ │ │ │ +
61
│ │ │ │ + │ │ │ │ +
63{
│ │ │ │ +
64 assert(d_instance == 0);
│ │ │ │ +
65 d_instance = this;
│ │ │ │ + │ │ │ │ +
67#ifdef SILLY_HAVE_JPG
│ │ │ │ + │ │ │ │ +
69#endif
│ │ │ │ +
70#ifdef SILLY_HAVE_PNG
│ │ │ │ + │ │ │ │ +
72#endif
│ │ │ │ +
73// Add other builtins loader here
│ │ │ │ +
74
│ │ │ │ +
75}
│ │ │ │ +
76
│ │ │ │ + │ │ │ │ +
78{
│ │ │ │ +
79 for(ImageLoaderList::iterator iter = d_loaders.begin() ; iter != d_loaders.end() ; ++iter)
│ │ │ │ +
80 {
│ │ │ │ +
81 delete (*iter);
│ │ │ │ +
82 }
│ │ │ │ +
83 d_instance = 0;
│ │ │ │ +
84}
│ │ │ │ +
85
│ │ │ │ +
86
│ │ │ │ + │ │ │ │ +
88{
│ │ │ │ +
89 if (ImageLoaderManager::getSingletonPtr() == 0)
│ │ │ │ +
90 {
│ │ │ │ +
91 if (!new ImageLoaderManager)
│ │ │ │ +
92 {
│ │ │ │ +
93 return false;
│ │ │ │ +
94 }
│ │ │ │ +
95 }
│ │ │ │ +
96 ++silly_init_counter;
│ │ │ │ +
97 return true;
│ │ │ │ +
98}
│ │ │ │ +
99
│ │ │ │ + │ │ │ │ +
101{
│ │ │ │ +
102 if (--silly_init_counter == 0)
│ │ │ │ +
103 {
│ │ │ │ +
104 delete ImageLoaderManager::getSingletonPtr();
│ │ │ │ +
105 }
│ │ │ │ +
106}
│ │ │ │ +
107
│ │ │ │ +
108} // End of SILLY namespace section
│ │ │ │ +
109
│ │ │ │ +
110
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ +
void SILLYCleanup()
Cleanup SILLY library internal.
│ │ │ │ +
bool SILLYInit()
Initialize the SILLY Library.
│ │ │ │ +
Loader class for JPG Image.
│ │ │ │ +
Loader for PNG Image.
│ │ │ │ +
Loader for Targa image.
│ │ │ │ +
Manage the list of all supported ImageLoader.
│ │ │ │ + │ │ │ │ +
void add(ImageLoader *loader)
Register an ImageLoader object.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ -SILLYDataSource.cpp │ │ │ │ │ +SILLYImageLoaderManager.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYDataSource.cpp │ │ │ │ │ + 2 filename: ImageLoaderManager.cpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: SILLYDataSource definition for the SILLY library │ │ │ │ │ + 6 purpose: Manage the list of existing ImageLoader │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,30 +39,123 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "SILLYDataSource.h" │ │ │ │ │ + 34#include "SILLYImageLoaderManager.h" │ │ │ │ │ 35 │ │ │ │ │ 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ 37#define inline │ │ │ │ │ - 38#include "SILLYDataSource.icpp" │ │ │ │ │ + 38#include "SILLYImageLoaderManager.icpp" │ │ │ │ │ 39#undef inline │ │ │ │ │ 40#endif │ │ │ │ │ - 41 │ │ │ │ │ - 42// Start of SILLY namespace section │ │ │ │ │ - 43namespace SILLY │ │ │ │ │ - 44{ │ │ │ │ │ - 45 │ │ │ │ │ - 46} // End of SILLY namespace section │ │ │ │ │ + 41#include "SILLYImageLoader.h" │ │ │ │ │ + 42#include "loaders/SILLYTGAImageLoader.h" │ │ │ │ │ + 43 │ │ │ │ │ + 44#ifdef SILLY_HAVE_JPG │ │ │ │ │ + 45#include "loaders/SILLYJPGImageLoader.h" │ │ │ │ │ + 46#endif │ │ │ │ │ 47 │ │ │ │ │ - 48 │ │ │ │ │ - 49 │ │ │ │ │ - 50 │ │ │ │ │ + 48#ifdef SILLY_HAVE_PNG │ │ │ │ │ + 49#include "loaders/SILLYPNGImageLoader.h" │ │ │ │ │ + 50#endif │ │ │ │ │ + 51 │ │ │ │ │ + 52// Start of SILLY namespace section │ │ │ │ │ + 53namespace SILLY │ │ │ │ │ + 54{ │ │ │ │ │ + 55 │ │ │ │ │ + 56// we need to do "reference counting" for init/exit to allow silly to be │ │ │ │ │ +used │ │ │ │ │ + 57// from inside multiple independent libraries simultaneously. │ │ │ │ │ + 58static size_t silly_init_counter = 0; │ │ │ │ │ + 59 │ │ │ │ │ + 60ImageLoaderManager* ImageLoaderManager::d_instance = 0; │ │ │ │ │ + 61 │ │ │ │ │ +62ImageLoaderManager::ImageLoaderManager() │ │ │ │ │ + 63{ │ │ │ │ │ + 64 assert(d_instance == 0); │ │ │ │ │ + 65 d_instance = this; │ │ │ │ │ + 66 add(new TGAImageLoader); │ │ │ │ │ + 67#ifdef SILLY_HAVE_JPG │ │ │ │ │ + 68 add(new JPGImageLoader); │ │ │ │ │ + 69#endif │ │ │ │ │ + 70#ifdef SILLY_HAVE_PNG │ │ │ │ │ + 71 add(new PNGImageLoader); │ │ │ │ │ + 72#endif │ │ │ │ │ + 73// Add other builtins loader here │ │ │ │ │ + 74 │ │ │ │ │ + 75} │ │ │ │ │ + 76 │ │ │ │ │ +77ImageLoaderManager::~ImageLoaderManager() │ │ │ │ │ + 78{ │ │ │ │ │ + 79 for(ImageLoaderList::iterator iter = d_loaders.begin() ; iter != │ │ │ │ │ +d_loaders.end() ; ++iter) │ │ │ │ │ + 80 { │ │ │ │ │ + 81 delete (*iter); │ │ │ │ │ + 82 } │ │ │ │ │ + 83 d_instance = 0; │ │ │ │ │ + 84} │ │ │ │ │ + 85 │ │ │ │ │ + 86 │ │ │ │ │ +87bool SILLYInit() │ │ │ │ │ + 88{ │ │ │ │ │ + 89 if (ImageLoaderManager::getSingletonPtr() == 0) │ │ │ │ │ + 90 { │ │ │ │ │ + 91 if (!new ImageLoaderManager) │ │ │ │ │ + 92 { │ │ │ │ │ + 93 return false; │ │ │ │ │ + 94 } │ │ │ │ │ + 95 } │ │ │ │ │ + 96 ++silly_init_counter; │ │ │ │ │ + 97 return true; │ │ │ │ │ + 98} │ │ │ │ │ + 99 │ │ │ │ │ +100void SILLYCleanup() │ │ │ │ │ + 101{ │ │ │ │ │ + 102 if (--silly_init_counter == 0) │ │ │ │ │ + 103 { │ │ │ │ │ + 104 delete ImageLoaderManager::getSingletonPtr(); │ │ │ │ │ + 105 } │ │ │ │ │ + 106} │ │ │ │ │ + 107 │ │ │ │ │ + 108} // End of SILLY namespace section │ │ │ │ │ + 109 │ │ │ │ │ + 110 │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::SILLYCleanup │ │ │ │ │ +void SILLYCleanup() │ │ │ │ │ +Cleanup SILLY library internal. │ │ │ │ │ +Definition: SILLYImageLoaderManager.cpp:100 │ │ │ │ │ +SILLY::SILLYInit │ │ │ │ │ +bool SILLYInit() │ │ │ │ │ +Initialize the SILLY Library. │ │ │ │ │ +Definition: SILLYImageLoaderManager.cpp:87 │ │ │ │ │ +SILLY::JPGImageLoader │ │ │ │ │ +Loader class for JPG Image. │ │ │ │ │ +Definition: SILLYJPGImageLoader.h:43 │ │ │ │ │ +SILLY::PNGImageLoader │ │ │ │ │ +Loader for PNG Image. │ │ │ │ │ +Definition: SILLYPNGImageLoader.h:43 │ │ │ │ │ +SILLY::TGAImageLoader │ │ │ │ │ +Loader for Targa image. │ │ │ │ │ +Definition: SILLYTGAImageLoader.h:44 │ │ │ │ │ +SILLY::ImageLoaderManager │ │ │ │ │ +Manage the list of all supported ImageLoader. │ │ │ │ │ +Definition: SILLYImageLoaderManager.h:57 │ │ │ │ │ +SILLY::ImageLoaderManager::~ImageLoaderManager │ │ │ │ │ +~ImageLoaderManager() │ │ │ │ │ +Destructor. │ │ │ │ │ +Definition: SILLYImageLoaderManager.cpp:77 │ │ │ │ │ +SILLY::ImageLoaderManager::add │ │ │ │ │ +void add(ImageLoader *loader) │ │ │ │ │ +Register an ImageLoader object. │ │ │ │ │ +SILLY::ImageLoaderManager::ImageLoaderManager │ │ │ │ │ +ImageLoaderManager() │ │ │ │ │ +Constructor. │ │ │ │ │ +Definition: SILLYImageLoaderManager.cpp:62 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00035_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageLoader.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYMemoryDataSource.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageLoader.cpp
│ │ │ │ +
SILLYMemoryDataSource.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: ImageLoader.cpp
│ │ │ │ +
2 filename: SILLYMemoryDataSource.cpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Implementation of the ImageLoader
│ │ │ │ +
6 purpose: SILLYMemoryDataSource definition for the SILLY library
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,41 +75,38 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "SILLYImageLoader.h"
│ │ │ │ -
35#ifndef SILLY_OPT_INLINE
│ │ │ │ -
36#define inline
│ │ │ │ -
37#include "SILLYImageLoader.icpp"
│ │ │ │ -
38#undef inline
│ │ │ │ -
39#endif
│ │ │ │ -
40#include "SILLYImageContext.h"
│ │ │ │ +
34#include "SILLYMemoryDataSource.h"
│ │ │ │ +
35
│ │ │ │ +
36#ifndef SILLY_OPT_INLINE
│ │ │ │ +
37#define inline
│ │ │ │ +
38#include "SILLYMemoryDataSource.icpp"
│ │ │ │ +
39#undef inline
│ │ │ │ +
40#endif
│ │ │ │
41
│ │ │ │ -
42// Start of SILLY namespace section
│ │ │ │ +
42// Start of SILLY namespace section
│ │ │ │
43namespace SILLY
│ │ │ │
44{
│ │ │ │ -
45
│ │ │ │ -
46
│ │ │ │ - │ │ │ │ +
45
│ │ │ │ +
46MemoryDataSource::MemoryDataSource(const byte* data, size_t size)
│ │ │ │ +
47 : d_bytes(data), d_size(size)
│ │ │ │
48{
│ │ │ │ -
49 delete context;
│ │ │ │ -
50}
│ │ │ │ -
51
│ │ │ │ +
49 assert(data && "ASSERT: data point to an invalid memory");
│ │ │ │ +
50 assert(size && "ASSERT: size is equal to 0");
│ │ │ │ +
51}
│ │ │ │
52
│ │ │ │ -
53} // end of SILLY namespace section
│ │ │ │ +
53} // End of SILLY namespace section
│ │ │ │
54
│ │ │ │
55
│ │ │ │ -
56
│ │ │ │ -
57
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
void destroyContext(ImageContext *context)
Destroy the image context.
│ │ │ │ +
MemoryDataSource(const byte *data, size_t size)
Create a data source from an existing memory area.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ -SILLYImageLoader.cpp │ │ │ │ │ +SILLYMemoryDataSource.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: ImageLoader.cpp │ │ │ │ │ + 2 filename: SILLYMemoryDataSource.cpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Implementation of the ImageLoader │ │ │ │ │ + 6 purpose: SILLYMemoryDataSource definition for the SILLY library │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,44 +39,39 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "SILLYImageLoader.h" │ │ │ │ │ - 35#ifndef SILLY_OPT_INLINE │ │ │ │ │ - 36#define inline │ │ │ │ │ - 37#include "SILLYImageLoader.icpp" │ │ │ │ │ - 38#undef inline │ │ │ │ │ - 39#endif │ │ │ │ │ - 40#include "SILLYImageContext.h" │ │ │ │ │ + 34#include "SILLYMemoryDataSource.h" │ │ │ │ │ + 35 │ │ │ │ │ + 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ + 37#define inline │ │ │ │ │ + 38#include "SILLYMemoryDataSource.icpp" │ │ │ │ │ + 39#undef inline │ │ │ │ │ + 40#endif │ │ │ │ │ 41 │ │ │ │ │ 42// Start of SILLY namespace section │ │ │ │ │ 43namespace SILLY │ │ │ │ │ 44{ │ │ │ │ │ 45 │ │ │ │ │ - 46 │ │ │ │ │ -47void ImageLoader::destroyContext(ImageContext* context) │ │ │ │ │ +46MemoryDataSource::MemoryDataSource(const byte* data, size_t size) │ │ │ │ │ + 47 : d_bytes(data), d_size(size) │ │ │ │ │ 48{ │ │ │ │ │ - 49 delete context; │ │ │ │ │ - 50} │ │ │ │ │ - 51 │ │ │ │ │ + 49 assert(data && "ASSERT: data point to an invalid memory"); │ │ │ │ │ + 50 assert(size && "ASSERT: size is equal to 0"); │ │ │ │ │ + 51} │ │ │ │ │ 52 │ │ │ │ │ - 53} // end of SILLY namespace section │ │ │ │ │ + 53} // End of SILLY namespace section │ │ │ │ │ 54 │ │ │ │ │ 55 │ │ │ │ │ - 56 │ │ │ │ │ - 57 │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ -SILLY::ImageLoader::destroyContext │ │ │ │ │ -void destroyContext(ImageContext *context) │ │ │ │ │ -Destroy the image context. │ │ │ │ │ -Definition: SILLYImageLoader.cpp:47 │ │ │ │ │ +SILLY::MemoryDataSource::MemoryDataSource │ │ │ │ │ +MemoryDataSource(const byte *data, size_t size) │ │ │ │ │ +Create a data source from an existing memory area. │ │ │ │ │ +Definition: SILLYMemoryDataSource.cpp:46 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00038_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImage.cpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageContext.cpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImage.cpp
│ │ │ │ +
SILLYImageContext.cpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYImage.cpp
│ │ │ │ +
2 filename: SILLYImageContext.cpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Implementation of the Image class
│ │ │ │ +
6 purpose: Implementation file for ImageContext class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,100 +75,67 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30#ifdef HAVE_CONFIG_H
│ │ │ │
31#include <config.h>
│ │ │ │
32#endif
│ │ │ │
33
│ │ │ │ -
34#include "SILLYImage.h"
│ │ │ │ -
35
│ │ │ │ -
36#ifndef SILLY_OPT_INLINE
│ │ │ │ -
37#define inline
│ │ │ │ -
38#include "SILLYImage.icpp"
│ │ │ │ -
39#undef inline
│ │ │ │ -
40#endif
│ │ │ │ -
41#include "SILLYImageLoaderManager.h"
│ │ │ │ -
42
│ │ │ │ -
43
│ │ │ │ -
44// Start section of namespace SILLY
│ │ │ │ -
45namespace SILLY
│ │ │ │ +
34#include "SILLYImageContext.h"
│ │ │ │ +
35#ifndef SILLY_OPT_INLINE
│ │ │ │ +
36#define inline
│ │ │ │ +
37#include "SILLYImageContext.icpp"
│ │ │ │ +
38#undef inline
│ │ │ │ +
39#endif
│ │ │ │ +
40#include <cstring>
│ │ │ │ +
41// Start section of namespace SILLY
│ │ │ │ +
42namespace SILLY
│ │ │ │ +
43{
│ │ │ │ +
44
│ │ │ │ + │ │ │ │
46{
│ │ │ │ -
47
│ │ │ │ - │ │ │ │ -
49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader(0)
│ │ │ │ -
50{
│ │ │ │ -
51}
│ │ │ │ -
52
│ │ │ │ -
53
│ │ │ │ - │ │ │ │ -
55{
│ │ │ │ -
56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin();
│ │ │ │ -
57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() ; ++iter)
│ │ │ │ -
58 {
│ │ │ │ -
59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data);
│ │ │ │ -
60 if (d_imageContext)
│ │ │ │ -
61 d_imageLoader = (*iter);
│ │ │ │ -
62 }
│ │ │ │ -
63 assert((! d_imageLoader || d_imageContext) && "ASSERT: Internal state of image invalid");
│ │ │ │ -
64 return d_imageLoader != 0;
│ │ │ │ -
65
│ │ │ │ -
66}
│ │ │ │ -
67
│ │ │ │ - │ │ │ │ -
69{
│ │ │ │ -
70 switch (resultFormat)
│ │ │ │ +
47 size_t depth;
│ │ │ │ +
48 switch(d_format)
│ │ │ │ +
49 {
│ │ │ │ +
50 case PF_A1B5G5R5:
│ │ │ │ +
51 depth = 2;
│ │ │ │ +
52 break;
│ │ │ │ +
53 case PF_RGB:
│ │ │ │ +
54 depth = 3;
│ │ │ │ +
55 break;
│ │ │ │ +
56 case PF_RGBA:
│ │ │ │ +
57 depth = 4;
│ │ │ │ +
58 break;
│ │ │ │ +
59 }
│ │ │ │ +
60
│ │ │ │ +
61 // Do the flipping
│ │ │ │ +
62 byte *p1,*p2,*tmp; // tmp pointers
│ │ │ │ +
63 size_t len = d_width * depth; // length of horizontal line in bytes
│ │ │ │ +
64 tmp = new byte[len]; // Allocate a temporary line
│ │ │ │ +
65 if ( !tmp )
│ │ │ │ +
66 return false;
│ │ │ │ +
67
│ │ │ │ +
68 size_t y , y2;
│ │ │ │ +
69 y2 = d_height - 1;
│ │ │ │ +
70 for ( y = 0; y < d_height >> 1; y++ )
│ │ │ │
71 {
│ │ │ │ -
72 case PF_A1B5G5R5:
│ │ │ │ -
73 d_bpp = 2;
│ │ │ │ -
74 break;
│ │ │ │ -
75 case PF_RGB:
│ │ │ │ -
76 d_bpp = 3;
│ │ │ │ -
77 break;
│ │ │ │ -
78
│ │ │ │ -
79 case PF_RGBA:
│ │ │ │ -
80 d_bpp = 4;
│ │ │ │ -
81 break;
│ │ │ │ -
82 //default:
│ │ │ │ -
83 // Unsupported format
│ │ │ │ -
84 };
│ │ │ │ -
85
│ │ │ │ -
86 if (! allocate())
│ │ │ │ -
87 {
│ │ │ │ -
88 return false;
│ │ │ │ -
89 }
│ │ │ │ -
90 d_imageContext->setDestination(d_pixels, getWidth() * getHeight() * d_bpp, resultFormat);
│ │ │ │ -
91
│ │ │ │ -
92 if (! d_imageLoader->loadImageData(order, d_data, d_imageContext))
│ │ │ │ -
93 {
│ │ │ │ -
94 delete [] d_pixels;
│ │ │ │ -
95 return false;
│ │ │ │ -
96 }
│ │ │ │ -
97 return true;
│ │ │ │ -
98}
│ │ │ │ -
99
│ │ │ │ -
100bool Image::allocate()
│ │ │ │ -
101{
│ │ │ │ -
102 delete [] d_pixels;
│ │ │ │ -
103 d_pixels = 0;
│ │ │ │ -
104 d_pixels = new byte[d_bpp * getWidth() * getHeight()];
│ │ │ │ -
105 return d_pixels != 0;
│ │ │ │ -
106}
│ │ │ │ -
107
│ │ │ │ -
108} // End section of namespace SILLY
│ │ │ │ +
72 p1 = (d_pixels) + len * y;
│ │ │ │ +
73 p2 = (d_pixels) + len * y2;
│ │ │ │ +
74 memcpy( tmp, p1, len );
│ │ │ │ +
75 memcpy( p1, p2, len );
│ │ │ │ +
76 memcpy( p2, tmp, len );
│ │ │ │ +
77 y2--;
│ │ │ │ +
78 }
│ │ │ │ +
79 delete [] tmp;
│ │ │ │ +
80 return true;
│ │ │ │ +
81}
│ │ │ │ +
82
│ │ │ │ +
83
│ │ │ │ +
84} // End section of namespace SILLY
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Image(DataSource &data)
Constructor.
Definition: SILLYImage.cpp:48
│ │ │ │ -
bool loadImageHeader()
Retrieve the information concerning the image object.
Definition: SILLYImage.cpp:54
│ │ │ │ -
bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin origin=PO_TOP_LEFT)
Load the image pixels in memory and store them in resultFormat.
Definition: SILLYImage.cpp:68
│ │ │ │ -
size_t getWidth() const
Retrieve the width of the image.
│ │ │ │ -
size_t getHeight() const
Retrieve the height of the image.
│ │ │ │ -
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
│ │ │ │ -
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
│ │ │ │ +
bool flipVertically()
Flip pixel ordering.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * src │ │ │ │ │ -SILLYImage.cpp │ │ │ │ │ +SILLYImageContext.cpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYImage.cpp │ │ │ │ │ + 2 filename: SILLYImageContext.cpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Implementation of the Image class │ │ │ │ │ + 6 purpose: Implementation file for ImageContext class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,130 +39,68 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30#ifdef HAVE_CONFIG_H │ │ │ │ │ 31#include │ │ │ │ │ 32#endif │ │ │ │ │ 33 │ │ │ │ │ - 34#include "SILLYImage.h" │ │ │ │ │ - 35 │ │ │ │ │ - 36#ifndef SILLY_OPT_INLINE │ │ │ │ │ - 37#define inline │ │ │ │ │ - 38#include "SILLYImage.icpp" │ │ │ │ │ - 39#undef inline │ │ │ │ │ - 40#endif │ │ │ │ │ - 41#include "SILLYImageLoaderManager.h" │ │ │ │ │ - 42 │ │ │ │ │ - 43 │ │ │ │ │ - 44// Start section of namespace SILLY │ │ │ │ │ - 45namespace SILLY │ │ │ │ │ + 34#include "SILLYImageContext.h" │ │ │ │ │ + 35#ifndef SILLY_OPT_INLINE │ │ │ │ │ + 36#define inline │ │ │ │ │ + 37#include "SILLYImageContext.icpp" │ │ │ │ │ + 38#undef inline │ │ │ │ │ + 39#endif │ │ │ │ │ + 40#include │ │ │ │ │ + 41// Start section of namespace SILLY │ │ │ │ │ + 42namespace SILLY │ │ │ │ │ + 43{ │ │ │ │ │ + 44 │ │ │ │ │ +45bool ImageContext::flipVertically() │ │ │ │ │ 46{ │ │ │ │ │ - 47 │ │ │ │ │ -48Image::Image(DataSource& source) │ │ │ │ │ - 49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader │ │ │ │ │ -(0) │ │ │ │ │ - 50{ │ │ │ │ │ - 51} │ │ │ │ │ - 52 │ │ │ │ │ - 53 │ │ │ │ │ -54bool Image::loadImageHeader() │ │ │ │ │ - 55{ │ │ │ │ │ - 56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin │ │ │ │ │ -(); │ │ │ │ │ - 57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() │ │ │ │ │ -; ++iter) │ │ │ │ │ - 58 { │ │ │ │ │ - 59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data); │ │ │ │ │ - 60 if (d_imageContext) │ │ │ │ │ - 61 d_imageLoader = (*iter); │ │ │ │ │ - 62 } │ │ │ │ │ - 63 assert((! d_imageLoader || d_imageContext) && "ASSERT: Internal state of │ │ │ │ │ -image invalid"); │ │ │ │ │ - 64 return d_imageLoader != 0; │ │ │ │ │ - 65 │ │ │ │ │ - 66} │ │ │ │ │ + 47 size_t depth; │ │ │ │ │ + 48 switch(d_format) │ │ │ │ │ + 49 { │ │ │ │ │ + 50 case PF_A1B5G5R5: │ │ │ │ │ + 51 depth = 2; │ │ │ │ │ + 52 break; │ │ │ │ │ + 53 case PF_RGB: │ │ │ │ │ + 54 depth = 3; │ │ │ │ │ + 55 break; │ │ │ │ │ + 56 case PF_RGBA: │ │ │ │ │ + 57 depth = 4; │ │ │ │ │ + 58 break; │ │ │ │ │ + 59 } │ │ │ │ │ + 60 │ │ │ │ │ + 61 // Do the flipping │ │ │ │ │ + 62 byte *p1,*p2,*tmp; // tmp pointers │ │ │ │ │ + 63 size_t len = d_width * depth; // length of horizontal line in bytes │ │ │ │ │ + 64 tmp = new byte[len]; // Allocate a temporary line │ │ │ │ │ + 65 if ( !tmp ) │ │ │ │ │ + 66 return false; │ │ │ │ │ 67 │ │ │ │ │ -68bool Image::loadImageData(PixelFormat resultFormat, PixelOrigin order) │ │ │ │ │ - 69{ │ │ │ │ │ - 70 switch (resultFormat) │ │ │ │ │ + 68 size_t y , y2; │ │ │ │ │ + 69 y2 = d_height - 1; │ │ │ │ │ + 70 for ( y = 0; y < d_height >> 1; y++ ) │ │ │ │ │ 71 { │ │ │ │ │ - 72 case PF_A1B5G5R5: │ │ │ │ │ - 73 d_bpp = 2; │ │ │ │ │ - 74 break; │ │ │ │ │ - 75 case PF_RGB: │ │ │ │ │ - 76 d_bpp = 3; │ │ │ │ │ - 77 break; │ │ │ │ │ - 78 │ │ │ │ │ - 79 case PF_RGBA: │ │ │ │ │ - 80 d_bpp = 4; │ │ │ │ │ - 81 break; │ │ │ │ │ - 82 //default: │ │ │ │ │ - 83 // Unsupported format │ │ │ │ │ - 84 }; │ │ │ │ │ - 85 │ │ │ │ │ - 86 if (! allocate()) │ │ │ │ │ - 87 { │ │ │ │ │ - 88 return false; │ │ │ │ │ - 89 } │ │ │ │ │ - 90 d_imageContext->setDestination(d_pixels, getWidth() * getHeight() * d_bpp, │ │ │ │ │ -resultFormat); │ │ │ │ │ - 91 │ │ │ │ │ - 92 if (! d_imageLoader->loadImageData(order, d_data, d_imageContext)) │ │ │ │ │ - 93 { │ │ │ │ │ - 94 delete [] d_pixels; │ │ │ │ │ - 95 return false; │ │ │ │ │ - 96 } │ │ │ │ │ - 97 return true; │ │ │ │ │ - 98} │ │ │ │ │ - 99 │ │ │ │ │ - 100bool Image::allocate() │ │ │ │ │ - 101{ │ │ │ │ │ - 102 delete [] d_pixels; │ │ │ │ │ - 103 d_pixels = 0; │ │ │ │ │ - 104 d_pixels = new byte[d_bpp * getWidth() * getHeight()]; │ │ │ │ │ - 105 return d_pixels != 0; │ │ │ │ │ - 106} │ │ │ │ │ - 107 │ │ │ │ │ - 108} // End section of namespace SILLY │ │ │ │ │ + 72 p1 = (d_pixels) + len * y; │ │ │ │ │ + 73 p2 = (d_pixels) + len * y2; │ │ │ │ │ + 74 memcpy( tmp, p1, len ); │ │ │ │ │ + 75 memcpy( p1, p2, len ); │ │ │ │ │ + 76 memcpy( p2, tmp, len ); │ │ │ │ │ + 77 y2--; │ │ │ │ │ + 78 } │ │ │ │ │ + 79 delete [] tmp; │ │ │ │ │ + 80 return true; │ │ │ │ │ + 81} │ │ │ │ │ + 82 │ │ │ │ │ + 83 │ │ │ │ │ + 84} // End section of namespace SILLY │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PixelFormat │ │ │ │ │ -PixelFormat │ │ │ │ │ -List all pixel format supported. │ │ │ │ │ -Definition: SILLYBase.h:60 │ │ │ │ │ -SILLY::PixelOrigin │ │ │ │ │ -PixelOrigin │ │ │ │ │ -List all pixel origin supported. │ │ │ │ │ -Definition: SILLYBase.h:71 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::Image::Image │ │ │ │ │ -Image(DataSource &data) │ │ │ │ │ -Constructor. │ │ │ │ │ -Definition: SILLYImage.cpp:48 │ │ │ │ │ -SILLY::Image::loadImageHeader │ │ │ │ │ -bool loadImageHeader() │ │ │ │ │ -Retrieve the information concerning the image object. │ │ │ │ │ -Definition: SILLYImage.cpp:54 │ │ │ │ │ -SILLY::Image::loadImageData │ │ │ │ │ -bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin │ │ │ │ │ -origin=PO_TOP_LEFT) │ │ │ │ │ -Load the image pixels in memory and store them in resultFormat. │ │ │ │ │ -Definition: SILLYImage.cpp:68 │ │ │ │ │ -SILLY::Image::getWidth │ │ │ │ │ -size_t getWidth() const │ │ │ │ │ -Retrieve the width of the image. │ │ │ │ │ -SILLY::Image::getHeight │ │ │ │ │ -size_t getHeight() const │ │ │ │ │ -Retrieve the height of the image. │ │ │ │ │ -SILLY::ImageContext::setDestination │ │ │ │ │ -void setDestination(byte *pixels, size_t length, PixelFormat format) │ │ │ │ │ -Set the destination of the loading. │ │ │ │ │ -SILLY::ImageLoader::loadImageData │ │ │ │ │ -virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext │ │ │ │ │ -*context)=0 │ │ │ │ │ -Parse the pixels data of the image and fill the header struct. │ │ │ │ │ +SILLY::ImageContext::flipVertically │ │ │ │ │ +bool flipVertically() │ │ │ │ │ +Flip pixel ordering. │ │ │ │ │ +Definition: SILLYImageContext.cpp:45 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00041_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,121 +39,77 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageContext.icpp
│ │ │ │ +
SILLYDataSource.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYImageContext.icpp
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline definition for ImageContext
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ -
34
│ │ │ │ -
35inline ImageContext::ImageContext(size_t width, size_t height)
│ │ │ │ -
36 : d_pixels(0), d_length(0), d_width(width), d_height(height), d_currentOffset(0), d_format(PF_RGBA)
│ │ │ │ -
37{
│ │ │ │ -
38}
│ │ │ │ -
39
│ │ │ │ -
40
│ │ │ │ -
41inline ImageContext::~ImageContext()
│ │ │ │ -
42{
│ │ │ │ -
43}
│ │ │ │ -
44
│ │ │ │ -
45
│ │ │ │ -
46inline void ImageContext::setDestination(byte* pixels, size_t length, PixelFormat format)
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYDataSource.h
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: SILLY::DataSource declaration for the SILLY library
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYDataSource_h_
│ │ │ │ +
31#define _SILLYDataSource_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33
│ │ │ │ +
34// Start of section namespace SILLY
│ │ │ │ +
35namespace SILLY
│ │ │ │ +
36{
│ │ │ │ +
37
│ │ │ │ +
46class SILLY_EXPORT DataSource
│ │ │ │
47{
│ │ │ │ -
48 d_pixels = pixels;
│ │ │ │ -
49 d_length = length;
│ │ │ │ -
50 d_currentOffset = 0;
│ │ │ │ -
51 d_format = format;
│ │ │ │ -
52}
│ │ │ │ -
53
│ │ │ │ -
54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte alpha)
│ │ │ │ -
55{
│ │ │ │ -
56 //assert(d_currentOffset < d_length && "ASSERT: try to set a pixel outside of the image");
│ │ │ │ -
57 switch(d_format)
│ │ │ │ -
58 {
│ │ │ │ -
59 case PF_A1B5G5R5:
│ │ │ │ -
60 // The hard part
│ │ │ │ -
61 assert(0 && "ASSERT: Not yet implemented");
│ │ │ │ -
62 break;
│ │ │ │ -
63 case PF_RGB:
│ │ │ │ -
64 // Ignore alpha channel
│ │ │ │ -
65 d_pixels[d_currentOffset++] = red;
│ │ │ │ -
66 d_pixels[d_currentOffset++] = green;
│ │ │ │ -
67 d_pixels[d_currentOffset++] = bleu;
│ │ │ │ -
68 break;
│ │ │ │ -
69
│ │ │ │ -
70 case PF_RGBA:
│ │ │ │ -
71 d_pixels[d_currentOffset++] = red;
│ │ │ │ -
72 d_pixels[d_currentOffset++] = green;
│ │ │ │ -
73 d_pixels[d_currentOffset++] = bleu;
│ │ │ │ -
74 d_pixels[d_currentOffset++] = alpha;
│ │ │ │ -
75 break;
│ │ │ │ -
76
│ │ │ │ -
77 }
│ │ │ │ -
78}
│ │ │ │ -
79inline size_t ImageContext::getWidth() const
│ │ │ │ -
80{
│ │ │ │ -
81 return d_width;
│ │ │ │ -
82}
│ │ │ │ -
83
│ │ │ │ -
84inline void ImageContext::setWidth(size_t width)
│ │ │ │ -
85{
│ │ │ │ -
86 d_width = width;
│ │ │ │ -
87}
│ │ │ │ -
88
│ │ │ │ -
89inline size_t ImageContext::getHeight() const
│ │ │ │ -
90{
│ │ │ │ -
91 return d_height;
│ │ │ │ -
92}
│ │ │ │ -
93
│ │ │ │ -
94inline void ImageContext::setHeight(size_t height)
│ │ │ │ -
95{
│ │ │ │ -
96 d_height = height;
│ │ │ │ -
97}
│ │ │ │ -
98inline PixelFormat ImageContext::getPixelFormat() const
│ │ │ │ -
99{
│ │ │ │ -
100 return d_format;
│ │ │ │ -
101}
│ │ │ │ -
102
│ │ │ │ -
103} // End of section namespace SILLY
│ │ │ │ -
104
│ │ │ │ +
48public:
│ │ │ │ +
53 virtual ~DataSource();
│ │ │ │ +
58 virtual const byte * getDataPtr() const = 0;
│ │ │ │ +
64 byte operator[] (size_t offset) const;
│ │ │ │ +
69 virtual size_t getSize() const = 0;
│ │ │ │ +
70};
│ │ │ │ +
71
│ │ │ │ +
72
│ │ │ │ +
73} // End of section namespace SILLY
│ │ │ │ +
74
│ │ │ │ +
75// Inclue inline function when needed
│ │ │ │ +
76#ifdef SILLY_OPT_INLINE
│ │ │ │ +
77#include "SILLYDataSource.icpp"
│ │ │ │ +
78#endif
│ │ │ │ +
79
│ │ │ │ +
80#endif // end of guard _SILLYDataSource_h_
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
virtual size_t getSize() const =0
Return the size of the data.
│ │ │ │ +
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
│ │ │ │ +
virtual ~DataSource()
Destructor.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImageContext.icpp │ │ │ │ │ +SILLYDataSource.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYImageContext.icpp │ │ │ │ │ + 2 filename: SILLYDataSource.h │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition for ImageContext │ │ │ │ │ + 6 purpose: SILLY::DataSource declaration for the SILLY library │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,89 +35,51 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ - 34 │ │ │ │ │ - 35inline ImageContext::ImageContext(size_t width, size_t height) │ │ │ │ │ - 36 : d_pixels(0), d_length(0), d_width(width), d_height(height), │ │ │ │ │ -d_currentOffset(0), d_format(PF_RGBA) │ │ │ │ │ - 37{ │ │ │ │ │ - 38} │ │ │ │ │ - 39 │ │ │ │ │ - 40 │ │ │ │ │ - 41inline ImageContext::~ImageContext() │ │ │ │ │ - 42{ │ │ │ │ │ - 43} │ │ │ │ │ - 44 │ │ │ │ │ - 45 │ │ │ │ │ - 46inline void ImageContext::setDestination(byte* pixels, size_t length, │ │ │ │ │ -PixelFormat format) │ │ │ │ │ + 30#ifndef _SILLYDataSource_h_ │ │ │ │ │ + 31#define _SILLYDataSource_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33 │ │ │ │ │ + 34// Start of section namespace SILLY │ │ │ │ │ + 35namespace SILLY │ │ │ │ │ + 36{ │ │ │ │ │ + 37 │ │ │ │ │ +46class SILLY_EXPORT DataSource │ │ │ │ │ 47{ │ │ │ │ │ - 48 d_pixels = pixels; │ │ │ │ │ - 49 d_length = length; │ │ │ │ │ - 50 d_currentOffset = 0; │ │ │ │ │ - 51 d_format = format; │ │ │ │ │ - 52} │ │ │ │ │ - 53 │ │ │ │ │ - 54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte │ │ │ │ │ -alpha) │ │ │ │ │ - 55{ │ │ │ │ │ - 56 //assert(d_currentOffset < d_length && "ASSERT: try to set a pixel outside │ │ │ │ │ -of the image"); │ │ │ │ │ - 57 switch(d_format) │ │ │ │ │ - 58 { │ │ │ │ │ - 59 case PF_A1B5G5R5: │ │ │ │ │ - 60 // The hard part │ │ │ │ │ - 61 assert(0 && "ASSERT: Not yet implemented"); │ │ │ │ │ - 62 break; │ │ │ │ │ - 63 case PF_RGB: │ │ │ │ │ - 64 // Ignore alpha channel │ │ │ │ │ - 65 d_pixels[d_currentOffset++] = red; │ │ │ │ │ - 66 d_pixels[d_currentOffset++] = green; │ │ │ │ │ - 67 d_pixels[d_currentOffset++] = bleu; │ │ │ │ │ - 68 break; │ │ │ │ │ - 69 │ │ │ │ │ - 70 case PF_RGBA: │ │ │ │ │ - 71 d_pixels[d_currentOffset++] = red; │ │ │ │ │ - 72 d_pixels[d_currentOffset++] = green; │ │ │ │ │ - 73 d_pixels[d_currentOffset++] = bleu; │ │ │ │ │ - 74 d_pixels[d_currentOffset++] = alpha; │ │ │ │ │ - 75 break; │ │ │ │ │ - 76 │ │ │ │ │ - 77 } │ │ │ │ │ - 78} │ │ │ │ │ - 79inline size_t ImageContext::getWidth() const │ │ │ │ │ - 80{ │ │ │ │ │ - 81 return d_width; │ │ │ │ │ - 82} │ │ │ │ │ - 83 │ │ │ │ │ - 84inline void ImageContext::setWidth(size_t width) │ │ │ │ │ - 85{ │ │ │ │ │ - 86 d_width = width; │ │ │ │ │ - 87} │ │ │ │ │ - 88 │ │ │ │ │ - 89inline size_t ImageContext::getHeight() const │ │ │ │ │ - 90{ │ │ │ │ │ - 91 return d_height; │ │ │ │ │ - 92} │ │ │ │ │ - 93 │ │ │ │ │ - 94inline void ImageContext::setHeight(size_t height) │ │ │ │ │ - 95{ │ │ │ │ │ - 96 d_height = height; │ │ │ │ │ - 97} │ │ │ │ │ - 98inline PixelFormat ImageContext::getPixelFormat() const │ │ │ │ │ - 99{ │ │ │ │ │ - 100 return d_format; │ │ │ │ │ - 101} │ │ │ │ │ - 102 │ │ │ │ │ - 103} // End of section namespace SILLY │ │ │ │ │ - 104 │ │ │ │ │ + 48public: │ │ │ │ │ +53 virtual ~DataSource(); │ │ │ │ │ +58 virtual const byte * getDataPtr() const = 0; │ │ │ │ │ +64 byte operator[] (size_t offset) const; │ │ │ │ │ +69 virtual size_t getSize() const = 0; │ │ │ │ │ + 70}; │ │ │ │ │ + 71 │ │ │ │ │ + 72 │ │ │ │ │ + 73} // End of section namespace SILLY │ │ │ │ │ + 74 │ │ │ │ │ + 75// Inclue inline function when needed │ │ │ │ │ + 76#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 77#include "SILLYDataSource.icpp" │ │ │ │ │ + 78#endif │ │ │ │ │ + 79 │ │ │ │ │ + 80#endif // end of guard _SILLYDataSource_h_ │ │ │ │ │ +SILLY │ │ │ │ │ +Simple Image Loading LibrarY namespace. │ │ │ │ │ +Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::DataSource::getSize │ │ │ │ │ +virtual size_t getSize() const =0 │ │ │ │ │ +Return the size of the data. │ │ │ │ │ +SILLY::DataSource::getDataPtr │ │ │ │ │ +virtual const byte * getDataPtr() const =0 │ │ │ │ │ +Get raw access to the image data. │ │ │ │ │ +SILLY::DataSource::~DataSource │ │ │ │ │ +virtual ~DataSource() │ │ │ │ │ +Destructor. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00044_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,84 +39,62 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYFileDataSource.h
│ │ │ │ +
SILLYDataSource.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYFileDataSource.h
│ │ │ │ -
3 created: 20 Jul 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Provide file based image loading
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYFileDataSource_h_
│ │ │ │ -
31#define _SILLYFileDataSource_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYDataSource.h"
│ │ │ │ -
34// Start of section namespace SILLY
│ │ │ │ -
35namespace SILLY
│ │ │ │ -
36{
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYDataSource.icpp
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │ +
4 author: ode@dalfy.dalfy.dyndns.org
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34inline DataSource::~DataSource()
│ │ │ │ +
35{
│ │ │ │ +
36}
│ │ │ │
37
│ │ │ │ -
48class SILLY_EXPORT FileDataSource : public DataSource
│ │ │ │ -
49{
│ │ │ │ -
50public:
│ │ │ │ -
60 FileDataSource(const char* filename);
│ │ │ │ - │ │ │ │ -
73 bool isValid() const;
│ │ │ │ -
74
│ │ │ │ -
75 const byte* getDataPtr() const;
│ │ │ │ -
76 size_t getSize() const;
│ │ │ │ -
77private:
│ │ │ │ -
78 bool d_error;
│ │ │ │ -
79 byte* d_bytes;
│ │ │ │ -
80 size_t d_size;
│ │ │ │ -
81};
│ │ │ │ -
82
│ │ │ │ -
83
│ │ │ │ -
84} // End of section namespace SILLY
│ │ │ │ -
85
│ │ │ │ -
86// Inclue inline function when needed
│ │ │ │ -
87#ifdef SILLY_OPT_INLINE
│ │ │ │ -
88#include "SILLYFileDataSource.icpp"
│ │ │ │ -
89#endif
│ │ │ │ -
90
│ │ │ │ -
91#endif // end of guard _SILLYFileDataSource_h_
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
This class allow the loading of an image directly from a file.
│ │ │ │ -
const byte * getDataPtr() const
Get raw access to the image data.
│ │ │ │ -
bool isValid() const
Check wether the loading is successfull or not.
│ │ │ │ -
size_t getSize() const
Return the size of the data.
│ │ │ │ +
38inline byte DataSource::operator[](size_t offset) const
│ │ │ │ +
39{
│ │ │ │ +
40 assert(offset < getSize() && "ASSERT: Trying to access pixel outside of the data");
│ │ │ │ +
41 return getDataPtr()[offset];
│ │ │ │ +
42}
│ │ │ │ +
43
│ │ │ │ +
44} // End of section namespace SILLY
│ │ │ │ +
45
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYFileDataSource.h │ │ │ │ │ +SILLYDataSource.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYFileDataSource.h │ │ │ │ │ - 3 created: 20 Jul 2006 │ │ │ │ │ - 4 author: Olivier Delannoy │ │ │ │ │ + 2 filename: SILLYDataSource.icpp │ │ │ │ │ + 3 created: 10 Jun 2006 │ │ │ │ │ + 4 author: ode@dalfy.dalfy.dyndns.org │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Provide file based image loading │ │ │ │ │ + 6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,60 +35,27 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYFileDataSource_h_ │ │ │ │ │ - 31#define _SILLYFileDataSource_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYDataSource.h" │ │ │ │ │ - 34// Start of section namespace SILLY │ │ │ │ │ - 35namespace SILLY │ │ │ │ │ - 36{ │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34inline DataSource::~DataSource() │ │ │ │ │ + 35{ │ │ │ │ │ + 36} │ │ │ │ │ 37 │ │ │ │ │ -48class SILLY_EXPORT FileDataSource : public DataSource │ │ │ │ │ - 49{ │ │ │ │ │ - 50public: │ │ │ │ │ - 60 FileDataSource(const char* filename); │ │ │ │ │ - 64 ~FileDataSource(); │ │ │ │ │ -73 bool isValid() const; │ │ │ │ │ - 74 │ │ │ │ │ -75 const byte* getDataPtr() const; │ │ │ │ │ -76 size_t getSize() const; │ │ │ │ │ - 77private: │ │ │ │ │ - 78 bool d_error; │ │ │ │ │ - 79 byte* d_bytes; │ │ │ │ │ - 80 size_t d_size; │ │ │ │ │ - 81}; │ │ │ │ │ - 82 │ │ │ │ │ - 83 │ │ │ │ │ - 84} // End of section namespace SILLY │ │ │ │ │ - 85 │ │ │ │ │ - 86// Inclue inline function when needed │ │ │ │ │ - 87#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 88#include "SILLYFileDataSource.icpp" │ │ │ │ │ - 89#endif │ │ │ │ │ - 90 │ │ │ │ │ - 91#endif // end of guard _SILLYFileDataSource_h_ │ │ │ │ │ -SILLY │ │ │ │ │ -Simple Image Loading LibrarY namespace. │ │ │ │ │ -Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::FileDataSource │ │ │ │ │ -This class allow the loading of an image directly from a file. │ │ │ │ │ -Definition: SILLYFileDataSource.h:49 │ │ │ │ │ -SILLY::FileDataSource::getDataPtr │ │ │ │ │ -const byte * getDataPtr() const │ │ │ │ │ -Get raw access to the image data. │ │ │ │ │ -SILLY::FileDataSource::isValid │ │ │ │ │ -bool isValid() const │ │ │ │ │ -Check wether the loading is successfull or not. │ │ │ │ │ -SILLY::FileDataSource::getSize │ │ │ │ │ -size_t getSize() const │ │ │ │ │ -Return the size of the data. │ │ │ │ │ + 38inline byte DataSource::operator[](size_t offset) const │ │ │ │ │ + 39{ │ │ │ │ │ + 40 assert(offset < getSize() && "ASSERT: Trying to access pixel outside of the │ │ │ │ │ +data"); │ │ │ │ │ + 41 return getDataPtr()[offset]; │ │ │ │ │ + 42} │ │ │ │ │ + 43 │ │ │ │ │ + 44} // End of section namespace SILLY │ │ │ │ │ + 45 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00047_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageLoaderManager.h
│ │ │ │ +
SILLYImageContext.h
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: ImageLoaderManager.h
│ │ │ │ +
2 filename: SILLYImageContext.h
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Manage all available loader
│ │ │ │ +
6 purpose: ImageContext is an abstract class used to hide the loader specific data needed during the parsing of an image
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -71,78 +71,72 @@ │ │ │ │
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYImageLoaderManager_h_
│ │ │ │ -
31#define _SILLYImageLoaderManager_h_
│ │ │ │ +
30#ifndef _SILLYImageContext_h_
│ │ │ │ +
31#define _SILLYImageContext_h_
│ │ │ │
32#include "SILLYBase.h"
│ │ │ │ -
33#include <vector>
│ │ │ │ +
33
│ │ │ │
34// Start of section namespace SILLY
│ │ │ │
35namespace SILLY
│ │ │ │
36{
│ │ │ │ -
37class ImageLoader; // Forward declaration
│ │ │ │ -
42typedef std::vector<ImageLoader*> ImageLoaderList;
│ │ │ │ -
43
│ │ │ │ -
44#if defined(_MSC_VER)
│ │ │ │ -
45
│ │ │ │ -
46# pragma warning(push)
│ │ │ │ -
47
│ │ │ │ -
48# pragma warning(disable : 4251)
│ │ │ │ -
49
│ │ │ │ -
50#endif
│ │ │ │ -
51
│ │ │ │ -
56class SILLY_EXPORT ImageLoaderManager
│ │ │ │ -
57{
│ │ │ │ -
58
│ │ │ │ -
59public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
74 ImageLoaderList::iterator begin();
│ │ │ │ -
79 ImageLoaderList::iterator end();
│ │ │ │ -
86 void add(ImageLoader* loader);
│ │ │ │ -
87
│ │ │ │ -
88private:
│ │ │ │ -
89 ImageLoaderList d_loaders;
│ │ │ │ -
90
│ │ │ │ -
91public:
│ │ │ │ -
92 static ImageLoaderManager* getSingletonPtr();
│ │ │ │ -
93 static ImageLoaderManager& getSingleton();
│ │ │ │ -
94
│ │ │ │ -
95private:
│ │ │ │ -
96 static ImageLoaderManager* d_instance;
│ │ │ │ -
97
│ │ │ │ -
98 // Disabled operations
│ │ │ │ - │ │ │ │ - │ │ │ │ +
37
│ │ │ │ +
43class SILLY_EXPORT ImageContext
│ │ │ │ +
44{
│ │ │ │ +
45public:
│ │ │ │ +
50 virtual ~ImageContext();
│ │ │ │ +
51
│ │ │ │ +
56 void setDestination(byte* pixels, size_t length, PixelFormat format);
│ │ │ │ +
57
│ │ │ │ +
62 void setNextPixel(byte red, byte green, byte bleu, byte alpha);
│ │ │ │ +
63
│ │ │ │ +
64 size_t getWidth() const;
│ │ │ │ +
65 size_t getHeight() const;
│ │ │ │ +
66 PixelFormat getPixelFormat() const;
│ │ │ │ +
67
│ │ │ │ +
74 bool flipVertically();
│ │ │ │ +
75 protected:
│ │ │ │ +
76 void setWidth(size_t width);
│ │ │ │ +
77
│ │ │ │ +
78 void setHeight(size_t height);
│ │ │ │ +
79
│ │ │ │ +
88 ImageContext(size_t width, size_t height);
│ │ │ │ +
89
│ │ │ │ +
90private:
│ │ │ │ +
91 byte* d_pixels;
│ │ │ │ +
92 size_t d_length;
│ │ │ │ +
93 size_t d_width;
│ │ │ │ +
94 size_t d_height;
│ │ │ │ +
95 size_t d_currentOffset;
│ │ │ │ +
96 PixelFormat d_format;
│ │ │ │ +
97
│ │ │ │ +
98 // Disabled operation
│ │ │ │ + │ │ │ │ +
100 ImageContext& operator=(ImageContext&);
│ │ │ │
101};
│ │ │ │ -
102
│ │ │ │ -
103#if defined(_MSC_VER)
│ │ │ │ -
104
│ │ │ │ -
105# pragma warning(pop)
│ │ │ │ -
106
│ │ │ │ -
107#endif
│ │ │ │ -
108
│ │ │ │ -
109} // End of section namespace SILLY
│ │ │ │ +
102
│ │ │ │ +
103
│ │ │ │ +
104} // End of section namespace SILLY
│ │ │ │ +
105
│ │ │ │ +
106// Inclue inline function when needed
│ │ │ │ +
107#ifdef SILLY_OPT_INLINE
│ │ │ │ +
108#include "SILLYImageContext.icpp"
│ │ │ │ +
109#endif
│ │ │ │
110
│ │ │ │ -
111// Inclue inline function when needed
│ │ │ │ -
112#ifdef SILLY_OPT_INLINE
│ │ │ │ -
113#include "SILLYImageLoaderManager.icpp"
│ │ │ │ -
114#endif
│ │ │ │ -
115
│ │ │ │ -
116#endif // end of guard _SILLYImageLoaderManager_h_
│ │ │ │ +
111#endif // end of guard _SILLYImageContext_h_
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
std::vector< ImageLoader * > ImageLoaderList
Typename for a collection of image loader.
│ │ │ │ -
This is an abstract class that define the interface of all image loader.
│ │ │ │ -
Manage the list of all supported ImageLoader.
│ │ │ │ -
void add(ImageLoader *loader)
Register an ImageLoader object.
│ │ │ │ -
ImageLoaderList::iterator begin()
Get an iterator to the first ImageLoader registered.
│ │ │ │ -
ImageLoaderList::iterator end()
Get an iterator to the first not registered ImageLoader.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
│ │ │ │ +
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
│ │ │ │ +
ImageContext(size_t width, size_t height)
Constructor.
│ │ │ │ +
virtual ~ImageContext()
Destructor.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,22 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImageLoaderManager.h │ │ │ │ │ +SILLYImageContext.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: ImageLoaderManager.h │ │ │ │ │ + 2 filename: SILLYImageContext.h │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Manage all available loader │ │ │ │ │ + 6 purpose: ImageContext is an abstract class used to hide the loader specific │ │ │ │ │ +data needed during the parsing of an image │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,89 +36,83 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYImageLoaderManager_h_ │ │ │ │ │ - 31#define _SILLYImageLoaderManager_h_ │ │ │ │ │ + 30#ifndef _SILLYImageContext_h_ │ │ │ │ │ + 31#define _SILLYImageContext_h_ │ │ │ │ │ 32#include "SILLYBase.h" │ │ │ │ │ - 33#include │ │ │ │ │ + 33 │ │ │ │ │ 34// Start of section namespace SILLY │ │ │ │ │ 35namespace SILLY │ │ │ │ │ 36{ │ │ │ │ │ - 37class ImageLoader; // Forward declaration │ │ │ │ │ -42typedef std::vector ImageLoaderList; │ │ │ │ │ - 43 │ │ │ │ │ - 44#if defined(_MSC_VER) │ │ │ │ │ - 45 │ │ │ │ │ - 46# pragma warning(push) │ │ │ │ │ - 47 │ │ │ │ │ - 48# pragma warning(disable : 4251) │ │ │ │ │ - 49 │ │ │ │ │ - 50#endif │ │ │ │ │ + 37 │ │ │ │ │ +43class SILLY_EXPORT ImageContext │ │ │ │ │ + 44{ │ │ │ │ │ + 45public: │ │ │ │ │ +50 virtual ~ImageContext(); │ │ │ │ │ 51 │ │ │ │ │ -56class SILLY_EXPORT ImageLoaderManager │ │ │ │ │ - 57{ │ │ │ │ │ - 58 │ │ │ │ │ - 59public: │ │ │ │ │ - 64 ImageLoaderManager(); │ │ │ │ │ - 69 ~ImageLoaderManager(); │ │ │ │ │ -74 ImageLoaderList::iterator begin(); │ │ │ │ │ -79 ImageLoaderList::iterator end(); │ │ │ │ │ -86 void add(ImageLoader* loader); │ │ │ │ │ - 87 │ │ │ │ │ - 88private: │ │ │ │ │ - 89 ImageLoaderList d_loaders; │ │ │ │ │ - 90 │ │ │ │ │ - 91public: │ │ │ │ │ - 92 static ImageLoaderManager* getSingletonPtr(); │ │ │ │ │ - 93 static ImageLoaderManager& getSingleton(); │ │ │ │ │ - 94 │ │ │ │ │ - 95private: │ │ │ │ │ - 96 static ImageLoaderManager* d_instance; │ │ │ │ │ +56 void setDestination(byte* pixels, size_t length, PixelFormat format); │ │ │ │ │ + 57 │ │ │ │ │ +62 void setNextPixel(byte red, byte green, byte bleu, byte alpha); │ │ │ │ │ + 63 │ │ │ │ │ + 64 size_t getWidth() const; │ │ │ │ │ + 65 size_t getHeight() const; │ │ │ │ │ + 66 PixelFormat getPixelFormat() const; │ │ │ │ │ + 67 │ │ │ │ │ + 74 bool flipVertically(); │ │ │ │ │ + 75 protected: │ │ │ │ │ + 76 void setWidth(size_t width); │ │ │ │ │ + 77 │ │ │ │ │ + 78 void setHeight(size_t height); │ │ │ │ │ + 79 │ │ │ │ │ +88 ImageContext(size_t width, size_t height); │ │ │ │ │ + 89 │ │ │ │ │ + 90private: │ │ │ │ │ + 91 byte* d_pixels; │ │ │ │ │ + 92 size_t d_length; │ │ │ │ │ + 93 size_t d_width; │ │ │ │ │ + 94 size_t d_height; │ │ │ │ │ + 95 size_t d_currentOffset; │ │ │ │ │ + 96 PixelFormat d_format; │ │ │ │ │ 97 │ │ │ │ │ - 98 // Disabled operations │ │ │ │ │ - 99 ImageLoaderManager(ImageLoaderManager&); │ │ │ │ │ - 100 ImageLoaderManager& operator=(ImageLoaderManager&); │ │ │ │ │ + 98 // Disabled operation │ │ │ │ │ + 99 ImageContext(ImageContext&); │ │ │ │ │ + 100 ImageContext& operator=(ImageContext&); │ │ │ │ │ 101}; │ │ │ │ │ 102 │ │ │ │ │ - 103#if defined(_MSC_VER) │ │ │ │ │ - 104 │ │ │ │ │ - 105# pragma warning(pop) │ │ │ │ │ - 106 │ │ │ │ │ - 107#endif │ │ │ │ │ - 108 │ │ │ │ │ - 109} // End of section namespace SILLY │ │ │ │ │ + 103 │ │ │ │ │ + 104} // End of section namespace SILLY │ │ │ │ │ + 105 │ │ │ │ │ + 106// Inclue inline function when needed │ │ │ │ │ + 107#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 108#include "SILLYImageContext.icpp" │ │ │ │ │ + 109#endif │ │ │ │ │ 110 │ │ │ │ │ - 111// Inclue inline function when needed │ │ │ │ │ - 112#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 113#include "SILLYImageLoaderManager.icpp" │ │ │ │ │ - 114#endif │ │ │ │ │ - 115 │ │ │ │ │ - 116#endif // end of guard _SILLYImageLoaderManager_h_ │ │ │ │ │ + 111#endif // end of guard _SILLYImageContext_h_ │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::ImageLoaderList │ │ │ │ │ -std::vector< ImageLoader * > ImageLoaderList │ │ │ │ │ -Typename for a collection of image loader. │ │ │ │ │ -Definition: SILLYImageLoaderManager.h:42 │ │ │ │ │ -SILLY::ImageLoader │ │ │ │ │ -This is an abstract class that define the interface of all image loader. │ │ │ │ │ -Definition: SILLYImageLoader.h:47 │ │ │ │ │ -SILLY::ImageLoaderManager │ │ │ │ │ -Manage the list of all supported ImageLoader. │ │ │ │ │ -Definition: SILLYImageLoaderManager.h:57 │ │ │ │ │ -SILLY::ImageLoaderManager::add │ │ │ │ │ -void add(ImageLoader *loader) │ │ │ │ │ -Register an ImageLoader object. │ │ │ │ │ -SILLY::ImageLoaderManager::begin │ │ │ │ │ -ImageLoaderList::iterator begin() │ │ │ │ │ -Get an iterator to the first ImageLoader registered. │ │ │ │ │ -SILLY::ImageLoaderManager::end │ │ │ │ │ -ImageLoaderList::iterator end() │ │ │ │ │ -Get an iterator to the first not registered ImageLoader. │ │ │ │ │ +SILLY::PixelFormat │ │ │ │ │ +PixelFormat │ │ │ │ │ +List all pixel format supported. │ │ │ │ │ +Definition: SILLYBase.h:60 │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ +SILLY::ImageContext::setNextPixel │ │ │ │ │ +void setNextPixel(byte red, byte green, byte bleu, byte alpha) │ │ │ │ │ +Set the next pixel of the image. │ │ │ │ │ +SILLY::ImageContext::setDestination │ │ │ │ │ +void setDestination(byte *pixels, size_t length, PixelFormat format) │ │ │ │ │ +Set the destination of the loading. │ │ │ │ │ +SILLY::ImageContext::ImageContext │ │ │ │ │ +ImageContext(size_t width, size_t height) │ │ │ │ │ +Constructor. │ │ │ │ │ +SILLY::ImageContext::~ImageContext │ │ │ │ │ +virtual ~ImageContext() │ │ │ │ │ +Destructor. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00050_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,84 +39,53 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYTGAImageLoader.h
│ │ │ │ +
SILLYJPGImageContext.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYTGAImageLoader.h
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Declaration of the TGAImageLoader class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYTGAImageLoader_h_
│ │ │ │ -
31#define _SILLYTGAImageLoader_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYImageLoader.h"
│ │ │ │ -
34// Start of section namespace SILLY
│ │ │ │ -
35namespace SILLY
│ │ │ │ -
36{
│ │ │ │ -
37class TGAImageContext;
│ │ │ │ - │ │ │ │ -
44{
│ │ │ │ -
45public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
48 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
│ │ │ │ -
49 bool loadImageData(PixelOrigin origin,
│ │ │ │ -
50 DataSource* data,
│ │ │ │ -
51 ImageContext* context);
│ │ │ │ -
52private:
│ │ │ │ -
53
│ │ │ │ -
54};
│ │ │ │ -
55
│ │ │ │ -
56} // End of section namespace SILLY
│ │ │ │ -
57
│ │ │ │ -
58// Inclue inline function when needed
│ │ │ │ -
59#ifdef SILLY_OPT_INLINE
│ │ │ │ -
60#include "SILLYTGAImageLoader.icpp"
│ │ │ │ -
61#endif
│ │ │ │ -
62
│ │ │ │ -
63#endif // end of guard _SILLYTGAImageLoader_h_
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
Loader for Targa image.
│ │ │ │ -
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
│ │ │ │ -
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
This is an abstract class that define the interface of all image loader.
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYJPGImageContext.icpp
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline definition for JPG context
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34
│ │ │ │ +
35} // End of section namespace SILLY
│ │ │ │ +
36
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYTGAImageLoader.h │ │ │ │ │ +SILLYJPGImageContext.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYTGAImageLoader.h │ │ │ │ │ + 2 filename: SILLYJPGImageContext.icpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Declaration of the TGAImageLoader class │ │ │ │ │ + 6 purpose: Inline definition for JPG context │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,70 +36,17 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYTGAImageLoader_h_ │ │ │ │ │ - 31#define _SILLYTGAImageLoader_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYImageLoader.h" │ │ │ │ │ - 34// Start of section namespace SILLY │ │ │ │ │ - 35namespace SILLY │ │ │ │ │ - 36{ │ │ │ │ │ - 37class TGAImageContext; │ │ │ │ │ -43class TGAImageLoader : public ImageLoader │ │ │ │ │ - 44{ │ │ │ │ │ - 45public: │ │ │ │ │ - 46 TGAImageLoader(); │ │ │ │ │ - 47 ~TGAImageLoader(); │ │ │ │ │ - 48 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data); │ │ │ │ │ - 49 bool loadImageData(PixelOrigin origin, │ │ │ │ │ - 50 DataSource* data, │ │ │ │ │ - 51 ImageContext* context); │ │ │ │ │ - 52private: │ │ │ │ │ - 53 │ │ │ │ │ - 54}; │ │ │ │ │ - 55 │ │ │ │ │ - 56} // End of section namespace SILLY │ │ │ │ │ - 57 │ │ │ │ │ - 58// Inclue inline function when needed │ │ │ │ │ - 59#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 60#include "SILLYTGAImageLoader.icpp" │ │ │ │ │ - 61#endif │ │ │ │ │ - 62 │ │ │ │ │ - 63#endif // end of guard _SILLYTGAImageLoader_h_ │ │ │ │ │ -SILLY │ │ │ │ │ -Simple Image Loading LibrarY namespace. │ │ │ │ │ -Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PixelFormat │ │ │ │ │ -PixelFormat │ │ │ │ │ -List all pixel format supported. │ │ │ │ │ -Definition: SILLYBase.h:60 │ │ │ │ │ -SILLY::PixelOrigin │ │ │ │ │ -PixelOrigin │ │ │ │ │ -List all pixel origin supported. │ │ │ │ │ -Definition: SILLYBase.h:71 │ │ │ │ │ -SILLY::TGAImageLoader │ │ │ │ │ -Loader for Targa image. │ │ │ │ │ -Definition: SILLYTGAImageLoader.h:44 │ │ │ │ │ -SILLY::TGAImageLoader::loadHeader │ │ │ │ │ -ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data) │ │ │ │ │ -Parse the header of the image and fill the header struct. │ │ │ │ │ -Definition: SILLYTGAImageLoader.cpp:74 │ │ │ │ │ -SILLY::TGAImageLoader::loadImageData │ │ │ │ │ -bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │ │ -Parse the pixels data of the image and fill the header struct. │ │ │ │ │ -Definition: SILLYTGAImageLoader.cpp:134 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ -SILLY::ImageLoader │ │ │ │ │ -This is an abstract class that define the interface of all image loader. │ │ │ │ │ -Definition: SILLYImageLoader.h:47 │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34 │ │ │ │ │ + 35} // End of section namespace SILLY │ │ │ │ │ + 36 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00053_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,53 +39,84 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYJPGImageContext.icpp
│ │ │ │ +
SILLYTGAImageLoader.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYJPGImageContext.icpp
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline definition for JPG context
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ -
34
│ │ │ │ -
35} // End of section namespace SILLY
│ │ │ │ -
36
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYTGAImageLoader.h
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Declaration of the TGAImageLoader class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYTGAImageLoader_h_
│ │ │ │ +
31#define _SILLYTGAImageLoader_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33#include "SILLYImageLoader.h"
│ │ │ │ +
34// Start of section namespace SILLY
│ │ │ │ +
35namespace SILLY
│ │ │ │ +
36{
│ │ │ │ +
37class TGAImageContext;
│ │ │ │ + │ │ │ │ +
44{
│ │ │ │ +
45public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
48 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
│ │ │ │ +
49 bool loadImageData(PixelOrigin origin,
│ │ │ │ +
50 DataSource* data,
│ │ │ │ +
51 ImageContext* context);
│ │ │ │ +
52private:
│ │ │ │ +
53
│ │ │ │ +
54};
│ │ │ │ +
55
│ │ │ │ +
56} // End of section namespace SILLY
│ │ │ │ +
57
│ │ │ │ +
58// Inclue inline function when needed
│ │ │ │ +
59#ifdef SILLY_OPT_INLINE
│ │ │ │ +
60#include "SILLYTGAImageLoader.icpp"
│ │ │ │ +
61#endif
│ │ │ │ +
62
│ │ │ │ +
63#endif // end of guard _SILLYTGAImageLoader_h_
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
Loader for Targa image.
│ │ │ │ +
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
│ │ │ │ +
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
This is an abstract class that define the interface of all image loader.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYJPGImageContext.icpp │ │ │ │ │ +SILLYTGAImageLoader.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYJPGImageContext.icpp │ │ │ │ │ + 2 filename: SILLYTGAImageLoader.h │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition for JPG context │ │ │ │ │ + 6 purpose: Declaration of the TGAImageLoader class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,17 +36,70 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ - 34 │ │ │ │ │ - 35} // End of section namespace SILLY │ │ │ │ │ - 36 │ │ │ │ │ + 30#ifndef _SILLYTGAImageLoader_h_ │ │ │ │ │ + 31#define _SILLYTGAImageLoader_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33#include "SILLYImageLoader.h" │ │ │ │ │ + 34// Start of section namespace SILLY │ │ │ │ │ + 35namespace SILLY │ │ │ │ │ + 36{ │ │ │ │ │ + 37class TGAImageContext; │ │ │ │ │ +43class TGAImageLoader : public ImageLoader │ │ │ │ │ + 44{ │ │ │ │ │ + 45public: │ │ │ │ │ + 46 TGAImageLoader(); │ │ │ │ │ + 47 ~TGAImageLoader(); │ │ │ │ │ + 48 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data); │ │ │ │ │ + 49 bool loadImageData(PixelOrigin origin, │ │ │ │ │ + 50 DataSource* data, │ │ │ │ │ + 51 ImageContext* context); │ │ │ │ │ + 52private: │ │ │ │ │ + 53 │ │ │ │ │ + 54}; │ │ │ │ │ + 55 │ │ │ │ │ + 56} // End of section namespace SILLY │ │ │ │ │ + 57 │ │ │ │ │ + 58// Inclue inline function when needed │ │ │ │ │ + 59#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 60#include "SILLYTGAImageLoader.icpp" │ │ │ │ │ + 61#endif │ │ │ │ │ + 62 │ │ │ │ │ + 63#endif // end of guard _SILLYTGAImageLoader_h_ │ │ │ │ │ +SILLY │ │ │ │ │ +Simple Image Loading LibrarY namespace. │ │ │ │ │ +Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::PixelFormat │ │ │ │ │ +PixelFormat │ │ │ │ │ +List all pixel format supported. │ │ │ │ │ +Definition: SILLYBase.h:60 │ │ │ │ │ +SILLY::PixelOrigin │ │ │ │ │ +PixelOrigin │ │ │ │ │ +List all pixel origin supported. │ │ │ │ │ +Definition: SILLYBase.h:71 │ │ │ │ │ +SILLY::TGAImageLoader │ │ │ │ │ +Loader for Targa image. │ │ │ │ │ +Definition: SILLYTGAImageLoader.h:44 │ │ │ │ │ +SILLY::TGAImageLoader::loadHeader │ │ │ │ │ +ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data) │ │ │ │ │ +Parse the header of the image and fill the header struct. │ │ │ │ │ +Definition: SILLYTGAImageLoader.cpp:74 │ │ │ │ │ +SILLY::TGAImageLoader::loadImageData │ │ │ │ │ +bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │ │ +Parse the pixels data of the image and fill the header struct. │ │ │ │ │ +Definition: SILLYTGAImageLoader.cpp:134 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ +SILLY::ImageLoader │ │ │ │ │ +This is an abstract class that define the interface of all image loader. │ │ │ │ │ +Definition: SILLYImageLoader.h:47 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00056_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYPNGImageLoader.h
│ │ │ │ +
SILLYTGAImageContext.h
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYPNGImageLoader.h
│ │ │ │ +
2 filename: SILLYTGAImageContext.h
│ │ │ │
3 created: 11 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Declaration of the PNGImageLoader class
│ │ │ │ +
6 purpose: Declaration of the TGAImageContext class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -71,56 +71,50 @@ │ │ │ │
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYPNGImageLoader_h_
│ │ │ │ -
31#define _SILLYPNGImageLoader_h_
│ │ │ │ +
30#ifndef _SILLYTGAImageContext_h_
│ │ │ │ +
31#define _SILLYTGAImageContext_h_
│ │ │ │
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYImageLoader.h"
│ │ │ │ -
34#include "SILLYDataSource.h"
│ │ │ │ -
35// Start of section namespace SILLY
│ │ │ │ -
36namespace SILLY
│ │ │ │ -
37{
│ │ │ │ - │ │ │ │ +
33#include "SILLYImageContext.h"
│ │ │ │ +
34// Start of section namespace SILLY
│ │ │ │ +
35namespace SILLY
│ │ │ │ +
36{
│ │ │ │ + │ │ │ │
43{
│ │ │ │
44public:
│ │ │ │ - │ │ │ │ -
46
│ │ │ │ - │ │ │ │ -
48
│ │ │ │ -
49 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
│ │ │ │ -
50
│ │ │ │ -
51 bool loadImageData(PixelOrigin origin,
│ │ │ │ -
52 DataSource* data,
│ │ │ │ -
53 ImageContext* context);
│ │ │ │ -
54private:
│ │ │ │ -
55
│ │ │ │ +
45 TGAImageContext(size_t width, size_t height);
│ │ │ │ + │ │ │ │ +
47
│ │ │ │ +
48private:
│ │ │ │ +
49 byte d_idLength;
│ │ │ │ +
50 byte d_imageType;
│ │ │ │ +
51 byte d_depth;
│ │ │ │ +
52 byte d_description;
│ │ │ │ +
53
│ │ │ │ +
54 friend class TGAImageLoader;
│ │ │ │ +
55
│ │ │ │
56};
│ │ │ │
57
│ │ │ │
58
│ │ │ │
59} // End of section namespace SILLY
│ │ │ │
60
│ │ │ │
61// Inclue inline function when needed
│ │ │ │
62#ifdef SILLY_OPT_INLINE
│ │ │ │ -
63#include "SILLYPNGImageLoader.icpp"
│ │ │ │ +
63#include "SILLYTGAImageContext.icpp"
│ │ │ │
64#endif
│ │ │ │
65
│ │ │ │ -
66#endif // end of guard _SILLYPNGImageLoader_h_
│ │ │ │ +
66#endif // end of guard _SILLYTGAImageContext_h_
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
Loader for PNG Image.
│ │ │ │ -
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
│ │ │ │ -
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
This is an abstract class that define the interface of all image loader.
│ │ │ │ +
Image Context for Targa image.
│ │ │ │ +
Loader for Targa image.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYPNGImageLoader.h │ │ │ │ │ +SILLYTGAImageContext.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYPNGImageLoader.h │ │ │ │ │ + 2 filename: SILLYTGAImageContext.h │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Declaration of the PNGImageLoader class │ │ │ │ │ + 6 purpose: Declaration of the TGAImageContext class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,74 +36,54 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYPNGImageLoader_h_ │ │ │ │ │ - 31#define _SILLYPNGImageLoader_h_ │ │ │ │ │ + 30#ifndef _SILLYTGAImageContext_h_ │ │ │ │ │ + 31#define _SILLYTGAImageContext_h_ │ │ │ │ │ 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYImageLoader.h" │ │ │ │ │ - 34#include "SILLYDataSource.h" │ │ │ │ │ - 35// Start of section namespace SILLY │ │ │ │ │ - 36namespace SILLY │ │ │ │ │ - 37{ │ │ │ │ │ -42class PNGImageLoader : public ImageLoader │ │ │ │ │ + 33#include "SILLYImageContext.h" │ │ │ │ │ + 34// Start of section namespace SILLY │ │ │ │ │ + 35namespace SILLY │ │ │ │ │ + 36{ │ │ │ │ │ +42class TGAImageContext : public ImageContext │ │ │ │ │ 43{ │ │ │ │ │ 44public: │ │ │ │ │ - 45 PNGImageLoader(); │ │ │ │ │ - 46 │ │ │ │ │ - 47 ~PNGImageLoader(); │ │ │ │ │ - 48 │ │ │ │ │ - 49 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data); │ │ │ │ │ - 50 │ │ │ │ │ - 51 bool loadImageData(PixelOrigin origin, │ │ │ │ │ - 52 DataSource* data, │ │ │ │ │ - 53 ImageContext* context); │ │ │ │ │ - 54private: │ │ │ │ │ + 45 TGAImageContext(size_t width, size_t height); │ │ │ │ │ + 46 ~TGAImageContext(); │ │ │ │ │ + 47 │ │ │ │ │ + 48private: │ │ │ │ │ + 49 byte d_idLength; │ │ │ │ │ + 50 byte d_imageType; │ │ │ │ │ + 51 byte d_depth; │ │ │ │ │ + 52 byte d_description; │ │ │ │ │ + 53 │ │ │ │ │ + 54 friend class TGAImageLoader; │ │ │ │ │ 55 │ │ │ │ │ 56}; │ │ │ │ │ 57 │ │ │ │ │ 58 │ │ │ │ │ 59} // End of section namespace SILLY │ │ │ │ │ 60 │ │ │ │ │ 61// Inclue inline function when needed │ │ │ │ │ 62#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 63#include "SILLYPNGImageLoader.icpp" │ │ │ │ │ + 63#include "SILLYTGAImageContext.icpp" │ │ │ │ │ 64#endif │ │ │ │ │ 65 │ │ │ │ │ - 66#endif // end of guard _SILLYPNGImageLoader_h_ │ │ │ │ │ + 66#endif // end of guard _SILLYTGAImageContext_h_ │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PixelFormat │ │ │ │ │ -PixelFormat │ │ │ │ │ -List all pixel format supported. │ │ │ │ │ -Definition: SILLYBase.h:60 │ │ │ │ │ -SILLY::PixelOrigin │ │ │ │ │ -PixelOrigin │ │ │ │ │ -List all pixel origin supported. │ │ │ │ │ -Definition: SILLYBase.h:71 │ │ │ │ │ -SILLY::PNGImageLoader │ │ │ │ │ -Loader for PNG Image. │ │ │ │ │ -Definition: SILLYPNGImageLoader.h:43 │ │ │ │ │ -SILLY::PNGImageLoader::loadHeader │ │ │ │ │ -ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data) │ │ │ │ │ -Parse the header of the image and fill the header struct. │ │ │ │ │ -Definition: SILLYPNGImageLoader.cpp:88 │ │ │ │ │ -SILLY::PNGImageLoader::loadImageData │ │ │ │ │ -bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │ │ -Parse the pixels data of the image and fill the header struct. │ │ │ │ │ -Definition: SILLYPNGImageLoader.cpp:154 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::TGAImageContext │ │ │ │ │ +Image Context for Targa image. │ │ │ │ │ +Definition: SILLYTGAImageContext.h:43 │ │ │ │ │ +SILLY::TGAImageLoader │ │ │ │ │ +Loader for Targa image. │ │ │ │ │ +Definition: SILLYTGAImageLoader.h:44 │ │ │ │ │ SILLY::ImageContext │ │ │ │ │ Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ Definition: SILLYImageContext.h:44 │ │ │ │ │ -SILLY::ImageLoader │ │ │ │ │ -This is an abstract class that define the interface of all image loader. │ │ │ │ │ -Definition: SILLYImageLoader.h:47 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00059_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,53 +39,88 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYPNGImageLoader.icpp
│ │ │ │ +
SILLYPNGImageLoader.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYPNGImageLoader.icpp
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline definition for PNGImageLoader
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ -
34
│ │ │ │ -
35} // End of section namespace SILLY
│ │ │ │ -
36
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYPNGImageLoader.h
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Declaration of the PNGImageLoader class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYPNGImageLoader_h_
│ │ │ │ +
31#define _SILLYPNGImageLoader_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33#include "SILLYImageLoader.h"
│ │ │ │ +
34#include "SILLYDataSource.h"
│ │ │ │ +
35// Start of section namespace SILLY
│ │ │ │ +
36namespace SILLY
│ │ │ │ +
37{
│ │ │ │ + │ │ │ │ +
43{
│ │ │ │ +
44public:
│ │ │ │ + │ │ │ │ +
46
│ │ │ │ + │ │ │ │ +
48
│ │ │ │ +
49 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
│ │ │ │ +
50
│ │ │ │ +
51 bool loadImageData(PixelOrigin origin,
│ │ │ │ +
52 DataSource* data,
│ │ │ │ +
53 ImageContext* context);
│ │ │ │ +
54private:
│ │ │ │ +
55
│ │ │ │ +
56};
│ │ │ │ +
57
│ │ │ │ +
58
│ │ │ │ +
59} // End of section namespace SILLY
│ │ │ │ +
60
│ │ │ │ +
61// Inclue inline function when needed
│ │ │ │ +
62#ifdef SILLY_OPT_INLINE
│ │ │ │ +
63#include "SILLYPNGImageLoader.icpp"
│ │ │ │ +
64#endif
│ │ │ │ +
65
│ │ │ │ +
66#endif // end of guard _SILLYPNGImageLoader_h_
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
Loader for PNG Image.
│ │ │ │ +
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
│ │ │ │ +
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
This is an abstract class that define the interface of all image loader.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYPNGImageLoader.icpp │ │ │ │ │ +SILLYPNGImageLoader.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYPNGImageLoader.icpp │ │ │ │ │ + 2 filename: SILLYPNGImageLoader.h │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition for PNGImageLoader │ │ │ │ │ + 6 purpose: Declaration of the PNGImageLoader class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,17 +36,74 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ - 34 │ │ │ │ │ - 35} // End of section namespace SILLY │ │ │ │ │ - 36 │ │ │ │ │ + 30#ifndef _SILLYPNGImageLoader_h_ │ │ │ │ │ + 31#define _SILLYPNGImageLoader_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33#include "SILLYImageLoader.h" │ │ │ │ │ + 34#include "SILLYDataSource.h" │ │ │ │ │ + 35// Start of section namespace SILLY │ │ │ │ │ + 36namespace SILLY │ │ │ │ │ + 37{ │ │ │ │ │ +42class PNGImageLoader : public ImageLoader │ │ │ │ │ + 43{ │ │ │ │ │ + 44public: │ │ │ │ │ + 45 PNGImageLoader(); │ │ │ │ │ + 46 │ │ │ │ │ + 47 ~PNGImageLoader(); │ │ │ │ │ + 48 │ │ │ │ │ + 49 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data); │ │ │ │ │ + 50 │ │ │ │ │ + 51 bool loadImageData(PixelOrigin origin, │ │ │ │ │ + 52 DataSource* data, │ │ │ │ │ + 53 ImageContext* context); │ │ │ │ │ + 54private: │ │ │ │ │ + 55 │ │ │ │ │ + 56}; │ │ │ │ │ + 57 │ │ │ │ │ + 58 │ │ │ │ │ + 59} // End of section namespace SILLY │ │ │ │ │ + 60 │ │ │ │ │ + 61// Inclue inline function when needed │ │ │ │ │ + 62#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 63#include "SILLYPNGImageLoader.icpp" │ │ │ │ │ + 64#endif │ │ │ │ │ + 65 │ │ │ │ │ + 66#endif // end of guard _SILLYPNGImageLoader_h_ │ │ │ │ │ +SILLY │ │ │ │ │ +Simple Image Loading LibrarY namespace. │ │ │ │ │ +Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::PixelFormat │ │ │ │ │ +PixelFormat │ │ │ │ │ +List all pixel format supported. │ │ │ │ │ +Definition: SILLYBase.h:60 │ │ │ │ │ +SILLY::PixelOrigin │ │ │ │ │ +PixelOrigin │ │ │ │ │ +List all pixel origin supported. │ │ │ │ │ +Definition: SILLYBase.h:71 │ │ │ │ │ +SILLY::PNGImageLoader │ │ │ │ │ +Loader for PNG Image. │ │ │ │ │ +Definition: SILLYPNGImageLoader.h:43 │ │ │ │ │ +SILLY::PNGImageLoader::loadHeader │ │ │ │ │ +ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data) │ │ │ │ │ +Parse the header of the image and fill the header struct. │ │ │ │ │ +Definition: SILLYPNGImageLoader.cpp:88 │ │ │ │ │ +SILLY::PNGImageLoader::loadImageData │ │ │ │ │ +bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │ │ +Parse the pixels data of the image and fill the header struct. │ │ │ │ │ +Definition: SILLYPNGImageLoader.cpp:154 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ +SILLY::ImageLoader │ │ │ │ │ +This is an abstract class that define the interface of all image loader. │ │ │ │ │ +Definition: SILLYImageLoader.h:47 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00062_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYTGAImageContext.icpp
│ │ │ │ +
SILLYTGAImageLoader.icpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYTGAImageContext.icpp
│ │ │ │ +
2 filename: SILLYTGAImageLoader.icpp
│ │ │ │
3 created: 11 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Inline definition for TGAImageContext class
│ │ │ │ +
6 purpose: Inline defintion of TGAImageLoader class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,25 +75,17 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30
│ │ │ │
31// Start of section namespace SILLY
│ │ │ │
32namespace SILLY
│ │ │ │
33{
│ │ │ │ -
34inline TGAImageContext::TGAImageContext(size_t width, size_t height)
│ │ │ │ -
35 : ImageContext(width, height)
│ │ │ │ -
36{
│ │ │ │ -
37}
│ │ │ │ -
38
│ │ │ │ -
39inline TGAImageContext::~TGAImageContext()
│ │ │ │ -
40{
│ │ │ │ -
41}
│ │ │ │ -
42
│ │ │ │ -
43} // End of section namespace SILLY
│ │ │ │ -
44
│ │ │ │ +
34
│ │ │ │ +
35} // End of section namespace SILLY
│ │ │ │ +
36
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYTGAImageContext.icpp │ │ │ │ │ +SILLYTGAImageLoader.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYTGAImageContext.icpp │ │ │ │ │ + 2 filename: SILLYTGAImageLoader.icpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition for TGAImageContext class │ │ │ │ │ + 6 purpose: Inline defintion of TGAImageLoader class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -40,21 +40,13 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30 │ │ │ │ │ 31// Start of section namespace SILLY │ │ │ │ │ 32namespace SILLY │ │ │ │ │ 33{ │ │ │ │ │ - 34inline TGAImageContext::TGAImageContext(size_t width, size_t height) │ │ │ │ │ - 35 : ImageContext(width, height) │ │ │ │ │ - 36{ │ │ │ │ │ - 37} │ │ │ │ │ - 38 │ │ │ │ │ - 39inline TGAImageContext::~TGAImageContext() │ │ │ │ │ - 40{ │ │ │ │ │ - 41} │ │ │ │ │ - 42 │ │ │ │ │ - 43} // End of section namespace SILLY │ │ │ │ │ - 44 │ │ │ │ │ + 34 │ │ │ │ │ + 35} // End of section namespace SILLY │ │ │ │ │ + 36 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00065_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,92 +39,53 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYJPGImageContext.h
│ │ │ │ +
SILLYPNGImageContext.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYJPGImageContext.h
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Declaration of the JPGImageContext class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYJPGImageContext_h_
│ │ │ │ -
31#define _SILLYJPGImageContext_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYImageContext.h"
│ │ │ │ -
34#include "SILLYDataSource.h"
│ │ │ │ -
35// Start of section namespace SILLY
│ │ │ │ -
36#include <setjmp.h>
│ │ │ │ -
37#include <stdio.h>
│ │ │ │ -
38#include <string.h>
│ │ │ │ -
39extern "C"
│ │ │ │ -
40{
│ │ │ │ -
41#include <jpeglib.h>
│ │ │ │ -
42}
│ │ │ │ -
43namespace SILLY
│ │ │ │ -
44{
│ │ │ │ -
45
│ │ │ │ - │ │ │ │ -
57{
│ │ │ │ -
58public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
61
│ │ │ │ -
62 void setImageSize();
│ │ │ │ -
63
│ │ │ │ -
64
│ │ │ │ -
65 jpeg_source_mgr src_mgr;
│ │ │ │ -
66 jpeg_decompress_struct cinfo;
│ │ │ │ -
67
│ │ │ │ -
68 jpeg_error_mgr d_error_mgr;
│ │ │ │ -
69 jmp_buf setjmp_buffer;
│ │ │ │ -
70 DataSource* d_source;
│ │ │ │ -
71};
│ │ │ │ -
72
│ │ │ │ -
73
│ │ │ │ -
74} // End of section namespace SILLY
│ │ │ │ -
75
│ │ │ │ -
76// Inclue inline function when needed
│ │ │ │ -
77#ifdef SILLY_OPT_INLINE
│ │ │ │ -
78#include "SILLYJPGImageContext.icpp"
│ │ │ │ -
79#endif
│ │ │ │ -
80
│ │ │ │ -
81#endif // end of guard _SILLYJPGImageContext_h_
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
Image Context for JPG image loader.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYPNGImageContext.icpp
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline definition for PNGImageContext class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34
│ │ │ │ +
35} // End of section namespace SILLY
│ │ │ │ +
36
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYJPGImageContext.h │ │ │ │ │ +SILLYPNGImageContext.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYJPGImageContext.h │ │ │ │ │ + 2 filename: SILLYPNGImageContext.icpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Declaration of the JPGImageContext class │ │ │ │ │ + 6 purpose: Inline definition for PNGImageContext class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,64 +36,17 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYJPGImageContext_h_ │ │ │ │ │ - 31#define _SILLYJPGImageContext_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYImageContext.h" │ │ │ │ │ - 34#include "SILLYDataSource.h" │ │ │ │ │ - 35// Start of section namespace SILLY │ │ │ │ │ - 36#include │ │ │ │ │ - 37#include │ │ │ │ │ - 38#include │ │ │ │ │ - 39extern "C" │ │ │ │ │ - 40{ │ │ │ │ │ - 41#include │ │ │ │ │ - 42} │ │ │ │ │ - 43namespace SILLY │ │ │ │ │ - 44{ │ │ │ │ │ - 45 │ │ │ │ │ -56class JPGImageContext : public ImageContext │ │ │ │ │ - 57{ │ │ │ │ │ - 58public: │ │ │ │ │ - 59 JPGImageContext(); │ │ │ │ │ - 60 ~JPGImageContext(); │ │ │ │ │ - 61 │ │ │ │ │ - 62 void setImageSize(); │ │ │ │ │ - 63 │ │ │ │ │ - 64 │ │ │ │ │ - 65 jpeg_source_mgr src_mgr; │ │ │ │ │ - 66 jpeg_decompress_struct cinfo; │ │ │ │ │ - 67 │ │ │ │ │ - 68 jpeg_error_mgr d_error_mgr; │ │ │ │ │ - 69 jmp_buf setjmp_buffer; │ │ │ │ │ - 70 DataSource* d_source; │ │ │ │ │ - 71}; │ │ │ │ │ - 72 │ │ │ │ │ - 73 │ │ │ │ │ - 74} // End of section namespace SILLY │ │ │ │ │ - 75 │ │ │ │ │ - 76// Inclue inline function when needed │ │ │ │ │ - 77#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 78#include "SILLYJPGImageContext.icpp" │ │ │ │ │ - 79#endif │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif // end of guard _SILLYJPGImageContext_h_ │ │ │ │ │ -SILLY │ │ │ │ │ -Simple Image Loading LibrarY namespace. │ │ │ │ │ -Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::JPGImageContext │ │ │ │ │ -Image Context for JPG image loader. │ │ │ │ │ -Definition: SILLYJPGImageContext.h:57 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34 │ │ │ │ │ + 35} // End of section namespace SILLY │ │ │ │ │ + 36 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00068_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,53 +39,92 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYTGAImageLoader.icpp
│ │ │ │ +
SILLYJPGImageContext.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYTGAImageLoader.icpp
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline defintion of TGAImageLoader class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ -
34
│ │ │ │ -
35} // End of section namespace SILLY
│ │ │ │ -
36
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYJPGImageContext.h
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Declaration of the JPGImageContext class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYJPGImageContext_h_
│ │ │ │ +
31#define _SILLYJPGImageContext_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33#include "SILLYImageContext.h"
│ │ │ │ +
34#include "SILLYDataSource.h"
│ │ │ │ +
35// Start of section namespace SILLY
│ │ │ │ +
36#include <setjmp.h>
│ │ │ │ +
37#include <stdio.h>
│ │ │ │ +
38#include <string.h>
│ │ │ │ +
39extern "C"
│ │ │ │ +
40{
│ │ │ │ +
41#include <jpeglib.h>
│ │ │ │ +
42}
│ │ │ │ +
43namespace SILLY
│ │ │ │ +
44{
│ │ │ │ +
45
│ │ │ │ + │ │ │ │ +
57{
│ │ │ │ +
58public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
61
│ │ │ │ +
62 void setImageSize();
│ │ │ │ +
63
│ │ │ │ +
64
│ │ │ │ +
65 jpeg_source_mgr src_mgr;
│ │ │ │ +
66 jpeg_decompress_struct cinfo;
│ │ │ │ +
67
│ │ │ │ +
68 jpeg_error_mgr d_error_mgr;
│ │ │ │ +
69 jmp_buf setjmp_buffer;
│ │ │ │ +
70 DataSource* d_source;
│ │ │ │ +
71};
│ │ │ │ +
72
│ │ │ │ +
73
│ │ │ │ +
74} // End of section namespace SILLY
│ │ │ │ +
75
│ │ │ │ +
76// Inclue inline function when needed
│ │ │ │ +
77#ifdef SILLY_OPT_INLINE
│ │ │ │ +
78#include "SILLYJPGImageContext.icpp"
│ │ │ │ +
79#endif
│ │ │ │ +
80
│ │ │ │ +
81#endif // end of guard _SILLYJPGImageContext_h_
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │ +
Image Context for JPG image loader.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYTGAImageLoader.icpp │ │ │ │ │ +SILLYJPGImageContext.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYTGAImageLoader.icpp │ │ │ │ │ + 2 filename: SILLYJPGImageContext.h │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline defintion of TGAImageLoader class │ │ │ │ │ + 6 purpose: Declaration of the JPGImageContext class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,17 +36,64 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ - 34 │ │ │ │ │ - 35} // End of section namespace SILLY │ │ │ │ │ - 36 │ │ │ │ │ + 30#ifndef _SILLYJPGImageContext_h_ │ │ │ │ │ + 31#define _SILLYJPGImageContext_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33#include "SILLYImageContext.h" │ │ │ │ │ + 34#include "SILLYDataSource.h" │ │ │ │ │ + 35// Start of section namespace SILLY │ │ │ │ │ + 36#include │ │ │ │ │ + 37#include │ │ │ │ │ + 38#include │ │ │ │ │ + 39extern "C" │ │ │ │ │ + 40{ │ │ │ │ │ + 41#include │ │ │ │ │ + 42} │ │ │ │ │ + 43namespace SILLY │ │ │ │ │ + 44{ │ │ │ │ │ + 45 │ │ │ │ │ +56class JPGImageContext : public ImageContext │ │ │ │ │ + 57{ │ │ │ │ │ + 58public: │ │ │ │ │ + 59 JPGImageContext(); │ │ │ │ │ + 60 ~JPGImageContext(); │ │ │ │ │ + 61 │ │ │ │ │ + 62 void setImageSize(); │ │ │ │ │ + 63 │ │ │ │ │ + 64 │ │ │ │ │ + 65 jpeg_source_mgr src_mgr; │ │ │ │ │ + 66 jpeg_decompress_struct cinfo; │ │ │ │ │ + 67 │ │ │ │ │ + 68 jpeg_error_mgr d_error_mgr; │ │ │ │ │ + 69 jmp_buf setjmp_buffer; │ │ │ │ │ + 70 DataSource* d_source; │ │ │ │ │ + 71}; │ │ │ │ │ + 72 │ │ │ │ │ + 73 │ │ │ │ │ + 74} // End of section namespace SILLY │ │ │ │ │ + 75 │ │ │ │ │ + 76// Inclue inline function when needed │ │ │ │ │ + 77#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 78#include "SILLYJPGImageContext.icpp" │ │ │ │ │ + 79#endif │ │ │ │ │ + 80 │ │ │ │ │ + 81#endif // end of guard _SILLYJPGImageContext_h_ │ │ │ │ │ +SILLY │ │ │ │ │ +Simple Image Loading LibrarY namespace. │ │ │ │ │ +Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::JPGImageContext │ │ │ │ │ +Image Context for JPG image loader. │ │ │ │ │ +Definition: SILLYJPGImageContext.h:57 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00071_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,82 +39,53 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYJPGImageLoader.h
│ │ │ │ +
SILLYJPGImageLoader.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYJPGImageLoader.h
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Declaration of the JPGImageLoader class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYJPGImageLoader_h_
│ │ │ │ -
31#define _SILLYJPGImageLoader_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYImageLoader.h"
│ │ │ │ -
34// Start of section namespace SILLY
│ │ │ │ -
35namespace SILLY
│ │ │ │ -
36{
│ │ │ │ -
37
│ │ │ │ - │ │ │ │ -
43{
│ │ │ │ -
44public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
48 bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context);
│ │ │ │ -
49private:
│ │ │ │ -
50};
│ │ │ │ -
51
│ │ │ │ -
52
│ │ │ │ -
53} // End of section namespace SILLY
│ │ │ │ -
54
│ │ │ │ -
55// Inclue inline function when needed
│ │ │ │ -
56#ifdef SILLY_OPT_INLINE
│ │ │ │ -
57#include "SILLYJPGImageLoader.icpp"
│ │ │ │ -
58#endif
│ │ │ │ -
59
│ │ │ │ -
60#endif // end of guard _SILLYJPGImageLoader_h_
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
Loader class for JPG Image.
│ │ │ │ -
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
│ │ │ │ -
ImageContext * loadHeader(PixelFormat &header, DataSource *data)
Parse the header of the image and fill the header struct.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
This is an abstract class that define the interface of all image loader.
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYJPGImageLoader.icpp
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline definition of JPGImageLoader class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34
│ │ │ │ +
35} // End of section namespace SILLY
│ │ │ │ +
36
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYJPGImageLoader.h │ │ │ │ │ +SILLYJPGImageLoader.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYJPGImageLoader.h │ │ │ │ │ + 2 filename: SILLYJPGImageLoader.icpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Declaration of the JPGImageLoader class │ │ │ │ │ + 6 purpose: Inline definition of JPGImageLoader class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,69 +36,17 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYJPGImageLoader_h_ │ │ │ │ │ - 31#define _SILLYJPGImageLoader_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYImageLoader.h" │ │ │ │ │ - 34// Start of section namespace SILLY │ │ │ │ │ - 35namespace SILLY │ │ │ │ │ - 36{ │ │ │ │ │ - 37 │ │ │ │ │ -42class JPGImageLoader : public ImageLoader │ │ │ │ │ - 43{ │ │ │ │ │ - 44public: │ │ │ │ │ - 45 JPGImageLoader(); │ │ │ │ │ - 46 ~JPGImageLoader(); │ │ │ │ │ - 47 ImageContext* loadHeader(PixelFormat& header, DataSource* data); │ │ │ │ │ - 48 bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* │ │ │ │ │ -context); │ │ │ │ │ - 49private: │ │ │ │ │ - 50}; │ │ │ │ │ - 51 │ │ │ │ │ - 52 │ │ │ │ │ - 53} // End of section namespace SILLY │ │ │ │ │ - 54 │ │ │ │ │ - 55// Inclue inline function when needed │ │ │ │ │ - 56#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 57#include "SILLYJPGImageLoader.icpp" │ │ │ │ │ - 58#endif │ │ │ │ │ - 59 │ │ │ │ │ - 60#endif // end of guard _SILLYJPGImageLoader_h_ │ │ │ │ │ -SILLY │ │ │ │ │ -Simple Image Loading LibrarY namespace. │ │ │ │ │ -Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PixelFormat │ │ │ │ │ -PixelFormat │ │ │ │ │ -List all pixel format supported. │ │ │ │ │ -Definition: SILLYBase.h:60 │ │ │ │ │ -SILLY::PixelOrigin │ │ │ │ │ -PixelOrigin │ │ │ │ │ -List all pixel origin supported. │ │ │ │ │ -Definition: SILLYBase.h:71 │ │ │ │ │ -SILLY::JPGImageLoader │ │ │ │ │ -Loader class for JPG Image. │ │ │ │ │ -Definition: SILLYJPGImageLoader.h:43 │ │ │ │ │ -SILLY::JPGImageLoader::loadImageData │ │ │ │ │ -bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │ │ -Parse the pixels data of the image and fill the header struct. │ │ │ │ │ -Definition: SILLYJPGImageLoader.cpp:90 │ │ │ │ │ -SILLY::JPGImageLoader::loadHeader │ │ │ │ │ -ImageContext * loadHeader(PixelFormat &header, DataSource *data) │ │ │ │ │ -Parse the header of the image and fill the header struct. │ │ │ │ │ -Definition: SILLYJPGImageLoader.cpp:56 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ -SILLY::ImageLoader │ │ │ │ │ -This is an abstract class that define the interface of all image loader. │ │ │ │ │ -Definition: SILLYImageLoader.h:47 │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34 │ │ │ │ │ + 35} // End of section namespace SILLY │ │ │ │ │ + 36 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00074_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,53 +39,98 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYPNGImageContext.icpp
│ │ │ │ +
SILLYPNGImageContext.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYPNGImageContext.icpp
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline definition for PNGImageContext class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ -
34
│ │ │ │ -
35} // End of section namespace SILLY
│ │ │ │ -
36
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYPNGImageContext.h
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Declaration of the PNGImageContext class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYPNGImageContext_h_
│ │ │ │ +
31#define _SILLYPNGImageContext_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33#include "SILLYImageContext.h"
│ │ │ │ +
34#include "SILLYDataSource.h"
│ │ │ │ +
35#include <png.h>
│ │ │ │ +
36// Start of section namespace SILLY
│ │ │ │ +
37namespace SILLY
│ │ │ │ +
38{
│ │ │ │ +
39
│ │ │ │ +
45class SILLY_EXPORT PNGImageContext : public ImageContext
│ │ │ │ +
46{
│ │ │ │ +
47public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
50
│ │ │ │ +
51 int read(png_bytep data, png_size_t length);
│ │ │ │ +
52
│ │ │ │ +
53
│ │ │ │ +
54
│ │ │ │ +
55private:
│ │ │ │ +
56 void setImageSize();
│ │ │ │ +
57
│ │ │ │ +
58 size_t d_offset;
│ │ │ │ +
59
│ │ │ │ +
60 DataSource* d_data;
│ │ │ │ +
61
│ │ │ │ +
62 png_structp d_png_ptr;
│ │ │ │ +
63
│ │ │ │ +
64 png_infop d_info_ptr;
│ │ │ │ +
65
│ │ │ │ +
66 size_t d_bit_depth;
│ │ │ │ +
67 size_t d_num_channels;
│ │ │ │ +
68
│ │ │ │ +
69
│ │ │ │ +
70 friend class PNGImageLoader;
│ │ │ │ +
71};
│ │ │ │ +
72
│ │ │ │ +
73
│ │ │ │ +
74} // End of section namespace SILLY
│ │ │ │ +
75
│ │ │ │ +
76// Inclue inline function when needed
│ │ │ │ +
77#ifdef SILLY_OPT_INLINE
│ │ │ │ +
78#include "SILLYPNGImageContext.icpp"
│ │ │ │ +
79#endif
│ │ │ │ +
80
│ │ │ │ +
81#endif // end of guard _SILLYPNGImageContext_h_
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │ +
Image Context for PNG Image Loader.
│ │ │ │ +
Loader for PNG Image.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYPNGImageContext.icpp │ │ │ │ │ +SILLYPNGImageContext.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYPNGImageContext.icpp │ │ │ │ │ + 2 filename: SILLYPNGImageContext.h │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition for PNGImageContext class │ │ │ │ │ + 6 purpose: Declaration of the PNGImageContext class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,17 +36,72 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ - 34 │ │ │ │ │ - 35} // End of section namespace SILLY │ │ │ │ │ - 36 │ │ │ │ │ + 30#ifndef _SILLYPNGImageContext_h_ │ │ │ │ │ + 31#define _SILLYPNGImageContext_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33#include "SILLYImageContext.h" │ │ │ │ │ + 34#include "SILLYDataSource.h" │ │ │ │ │ + 35#include │ │ │ │ │ + 36// Start of section namespace SILLY │ │ │ │ │ + 37namespace SILLY │ │ │ │ │ + 38{ │ │ │ │ │ + 39 │ │ │ │ │ +45class SILLY_EXPORT PNGImageContext : public ImageContext │ │ │ │ │ + 46{ │ │ │ │ │ + 47public: │ │ │ │ │ + 48 PNGImageContext(DataSource* data); │ │ │ │ │ + 49 ~PNGImageContext(); │ │ │ │ │ + 50 │ │ │ │ │ + 51 int read(png_bytep data, png_size_t length); │ │ │ │ │ + 52 │ │ │ │ │ + 53 │ │ │ │ │ + 54 │ │ │ │ │ + 55private: │ │ │ │ │ + 56 void setImageSize(); │ │ │ │ │ + 57 │ │ │ │ │ + 58 size_t d_offset; │ │ │ │ │ + 59 │ │ │ │ │ + 60 DataSource* d_data; │ │ │ │ │ + 61 │ │ │ │ │ + 62 png_structp d_png_ptr; │ │ │ │ │ + 63 │ │ │ │ │ + 64 png_infop d_info_ptr; │ │ │ │ │ + 65 │ │ │ │ │ + 66 size_t d_bit_depth; │ │ │ │ │ + 67 size_t d_num_channels; │ │ │ │ │ + 68 │ │ │ │ │ + 69 │ │ │ │ │ + 70 friend class PNGImageLoader; │ │ │ │ │ + 71}; │ │ │ │ │ + 72 │ │ │ │ │ + 73 │ │ │ │ │ + 74} // End of section namespace SILLY │ │ │ │ │ + 75 │ │ │ │ │ + 76// Inclue inline function when needed │ │ │ │ │ + 77#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 78#include "SILLYPNGImageContext.icpp" │ │ │ │ │ + 79#endif │ │ │ │ │ + 80 │ │ │ │ │ + 81#endif // end of guard _SILLYPNGImageContext_h_ │ │ │ │ │ +SILLY │ │ │ │ │ +Simple Image Loading LibrarY namespace. │ │ │ │ │ +Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::PNGImageContext │ │ │ │ │ +Image Context for PNG Image Loader. │ │ │ │ │ +Definition: SILLYPNGImageContext.h:46 │ │ │ │ │ +SILLY::PNGImageLoader │ │ │ │ │ +Loader for PNG Image. │ │ │ │ │ +Definition: SILLYPNGImageLoader.h:43 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00077_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,82 +39,61 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYTGAImageContext.h
│ │ │ │ +
SILLYTGAImageContext.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYTGAImageContext.h
│ │ │ │ -
3 created: 11 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Declaration of the TGAImageContext class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYTGAImageContext_h_
│ │ │ │ -
31#define _SILLYTGAImageContext_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYImageContext.h"
│ │ │ │ -
34// Start of section namespace SILLY
│ │ │ │ -
35namespace SILLY
│ │ │ │ -
36{
│ │ │ │ - │ │ │ │ -
43{
│ │ │ │ -
44public:
│ │ │ │ -
45 TGAImageContext(size_t width, size_t height);
│ │ │ │ - │ │ │ │ -
47
│ │ │ │ -
48private:
│ │ │ │ -
49 byte d_idLength;
│ │ │ │ -
50 byte d_imageType;
│ │ │ │ -
51 byte d_depth;
│ │ │ │ -
52 byte d_description;
│ │ │ │ -
53
│ │ │ │ -
54 friend class TGAImageLoader;
│ │ │ │ -
55
│ │ │ │ -
56};
│ │ │ │ -
57
│ │ │ │ -
58
│ │ │ │ -
59} // End of section namespace SILLY
│ │ │ │ -
60
│ │ │ │ -
61// Inclue inline function when needed
│ │ │ │ -
62#ifdef SILLY_OPT_INLINE
│ │ │ │ -
63#include "SILLYTGAImageContext.icpp"
│ │ │ │ -
64#endif
│ │ │ │ -
65
│ │ │ │ -
66#endif // end of guard _SILLYTGAImageContext_h_
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
Image Context for Targa image.
│ │ │ │ -
Loader for Targa image.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYTGAImageContext.icpp
│ │ │ │ +
3 created: 11 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline definition for TGAImageContext class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34inline TGAImageContext::TGAImageContext(size_t width, size_t height)
│ │ │ │ +
35 : ImageContext(width, height)
│ │ │ │ +
36{
│ │ │ │ +
37}
│ │ │ │ +
38
│ │ │ │ +
39inline TGAImageContext::~TGAImageContext()
│ │ │ │ +
40{
│ │ │ │ +
41}
│ │ │ │ +
42
│ │ │ │ +
43} // End of section namespace SILLY
│ │ │ │ +
44
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYTGAImageContext.h │ │ │ │ │ +SILLYTGAImageContext.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYTGAImageContext.h │ │ │ │ │ + 2 filename: SILLYTGAImageContext.icpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Declaration of the TGAImageContext class │ │ │ │ │ + 6 purpose: Inline definition for TGAImageContext class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,54 +36,25 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYTGAImageContext_h_ │ │ │ │ │ - 31#define _SILLYTGAImageContext_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYImageContext.h" │ │ │ │ │ - 34// Start of section namespace SILLY │ │ │ │ │ - 35namespace SILLY │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34inline TGAImageContext::TGAImageContext(size_t width, size_t height) │ │ │ │ │ + 35 : ImageContext(width, height) │ │ │ │ │ 36{ │ │ │ │ │ -42class TGAImageContext : public ImageContext │ │ │ │ │ - 43{ │ │ │ │ │ - 44public: │ │ │ │ │ - 45 TGAImageContext(size_t width, size_t height); │ │ │ │ │ - 46 ~TGAImageContext(); │ │ │ │ │ - 47 │ │ │ │ │ - 48private: │ │ │ │ │ - 49 byte d_idLength; │ │ │ │ │ - 50 byte d_imageType; │ │ │ │ │ - 51 byte d_depth; │ │ │ │ │ - 52 byte d_description; │ │ │ │ │ - 53 │ │ │ │ │ - 54 friend class TGAImageLoader; │ │ │ │ │ - 55 │ │ │ │ │ - 56}; │ │ │ │ │ - 57 │ │ │ │ │ - 58 │ │ │ │ │ - 59} // End of section namespace SILLY │ │ │ │ │ - 60 │ │ │ │ │ - 61// Inclue inline function when needed │ │ │ │ │ - 62#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 63#include "SILLYTGAImageContext.icpp" │ │ │ │ │ - 64#endif │ │ │ │ │ - 65 │ │ │ │ │ - 66#endif // end of guard _SILLYTGAImageContext_h_ │ │ │ │ │ -SILLY │ │ │ │ │ -Simple Image Loading LibrarY namespace. │ │ │ │ │ -Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::TGAImageContext │ │ │ │ │ -Image Context for Targa image. │ │ │ │ │ -Definition: SILLYTGAImageContext.h:43 │ │ │ │ │ -SILLY::TGAImageLoader │ │ │ │ │ -Loader for Targa image. │ │ │ │ │ -Definition: SILLYTGAImageLoader.h:44 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ + 37} │ │ │ │ │ + 38 │ │ │ │ │ + 39inline TGAImageContext::~TGAImageContext() │ │ │ │ │ + 40{ │ │ │ │ │ + 41} │ │ │ │ │ + 42 │ │ │ │ │ + 43} // End of section namespace SILLY │ │ │ │ │ + 44 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00080_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYPNGImageContext.h
│ │ │ │ +
SILLYJPGImageLoader.h
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYPNGImageContext.h
│ │ │ │ +
2 filename: SILLYJPGImageLoader.h
│ │ │ │
3 created: 11 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Declaration of the PNGImageContext class
│ │ │ │ +
6 purpose: Declaration of the JPGImageLoader class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -71,66 +71,50 @@ │ │ │ │
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYPNGImageContext_h_
│ │ │ │ -
31#define _SILLYPNGImageContext_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYImageContext.h"
│ │ │ │ -
34#include "SILLYDataSource.h"
│ │ │ │ -
35#include <png.h>
│ │ │ │ -
36// Start of section namespace SILLY
│ │ │ │ -
37namespace SILLY
│ │ │ │ -
38{
│ │ │ │ -
39
│ │ │ │ -
45class SILLY_EXPORT PNGImageContext : public ImageContext
│ │ │ │ -
46{
│ │ │ │ -
47public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
50
│ │ │ │ -
51 int read(png_bytep data, png_size_t length);
│ │ │ │ +
30#ifndef _SILLYJPGImageLoader_h_
│ │ │ │ +
31#define _SILLYJPGImageLoader_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33#include "SILLYImageLoader.h"
│ │ │ │ +
34// Start of section namespace SILLY
│ │ │ │ +
35namespace SILLY
│ │ │ │ +
36{
│ │ │ │ +
37
│ │ │ │ + │ │ │ │ +
43{
│ │ │ │ +
44public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
48 bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context);
│ │ │ │ +
49private:
│ │ │ │ +
50};
│ │ │ │ +
51
│ │ │ │
52
│ │ │ │ -
53
│ │ │ │ -
54
│ │ │ │ -
55private:
│ │ │ │ -
56 void setImageSize();
│ │ │ │ -
57
│ │ │ │ -
58 size_t d_offset;
│ │ │ │ -
59
│ │ │ │ -
60 DataSource* d_data;
│ │ │ │ -
61
│ │ │ │ -
62 png_structp d_png_ptr;
│ │ │ │ -
63
│ │ │ │ -
64 png_infop d_info_ptr;
│ │ │ │ -
65
│ │ │ │ -
66 size_t d_bit_depth;
│ │ │ │ -
67 size_t d_num_channels;
│ │ │ │ -
68
│ │ │ │ -
69
│ │ │ │ -
70 friend class PNGImageLoader;
│ │ │ │ -
71};
│ │ │ │ -
72
│ │ │ │ -
73
│ │ │ │ -
74} // End of section namespace SILLY
│ │ │ │ -
75
│ │ │ │ -
76// Inclue inline function when needed
│ │ │ │ -
77#ifdef SILLY_OPT_INLINE
│ │ │ │ -
78#include "SILLYPNGImageContext.icpp"
│ │ │ │ -
79#endif
│ │ │ │ -
80
│ │ │ │ -
81#endif // end of guard _SILLYPNGImageContext_h_
│ │ │ │ +
53} // End of section namespace SILLY
│ │ │ │ +
54
│ │ │ │ +
55// Inclue inline function when needed
│ │ │ │ +
56#ifdef SILLY_OPT_INLINE
│ │ │ │ +
57#include "SILLYJPGImageLoader.icpp"
│ │ │ │ +
58#endif
│ │ │ │ +
59
│ │ │ │ +
60#endif // end of guard _SILLYJPGImageLoader_h_
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
Image Context for PNG Image Loader.
│ │ │ │ -
Loader for PNG Image.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
Loader class for JPG Image.
│ │ │ │ +
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
│ │ │ │ +
ImageContext * loadHeader(PixelFormat &header, DataSource *data)
Parse the header of the image and fill the header struct.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
This is an abstract class that define the interface of all image loader.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYPNGImageContext.h │ │ │ │ │ +SILLYJPGImageLoader.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYPNGImageContext.h │ │ │ │ │ + 2 filename: SILLYJPGImageLoader.h │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Declaration of the PNGImageContext class │ │ │ │ │ + 6 purpose: Declaration of the JPGImageLoader class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,72 +36,69 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYPNGImageContext_h_ │ │ │ │ │ - 31#define _SILLYPNGImageContext_h_ │ │ │ │ │ + 30#ifndef _SILLYJPGImageLoader_h_ │ │ │ │ │ + 31#define _SILLYJPGImageLoader_h_ │ │ │ │ │ 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYImageContext.h" │ │ │ │ │ - 34#include "SILLYDataSource.h" │ │ │ │ │ - 35#include │ │ │ │ │ - 36// Start of section namespace SILLY │ │ │ │ │ - 37namespace SILLY │ │ │ │ │ - 38{ │ │ │ │ │ - 39 │ │ │ │ │ -45class SILLY_EXPORT PNGImageContext : public ImageContext │ │ │ │ │ - 46{ │ │ │ │ │ - 47public: │ │ │ │ │ - 48 PNGImageContext(DataSource* data); │ │ │ │ │ - 49 ~PNGImageContext(); │ │ │ │ │ - 50 │ │ │ │ │ - 51 int read(png_bytep data, png_size_t length); │ │ │ │ │ + 33#include "SILLYImageLoader.h" │ │ │ │ │ + 34// Start of section namespace SILLY │ │ │ │ │ + 35namespace SILLY │ │ │ │ │ + 36{ │ │ │ │ │ + 37 │ │ │ │ │ +42class JPGImageLoader : public ImageLoader │ │ │ │ │ + 43{ │ │ │ │ │ + 44public: │ │ │ │ │ + 45 JPGImageLoader(); │ │ │ │ │ + 46 ~JPGImageLoader(); │ │ │ │ │ + 47 ImageContext* loadHeader(PixelFormat& header, DataSource* data); │ │ │ │ │ + 48 bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* │ │ │ │ │ +context); │ │ │ │ │ + 49private: │ │ │ │ │ + 50}; │ │ │ │ │ + 51 │ │ │ │ │ 52 │ │ │ │ │ - 53 │ │ │ │ │ + 53} // End of section namespace SILLY │ │ │ │ │ 54 │ │ │ │ │ - 55private: │ │ │ │ │ - 56 void setImageSize(); │ │ │ │ │ - 57 │ │ │ │ │ - 58 size_t d_offset; │ │ │ │ │ + 55// Inclue inline function when needed │ │ │ │ │ + 56#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 57#include "SILLYJPGImageLoader.icpp" │ │ │ │ │ + 58#endif │ │ │ │ │ 59 │ │ │ │ │ - 60 DataSource* d_data; │ │ │ │ │ - 61 │ │ │ │ │ - 62 png_structp d_png_ptr; │ │ │ │ │ - 63 │ │ │ │ │ - 64 png_infop d_info_ptr; │ │ │ │ │ - 65 │ │ │ │ │ - 66 size_t d_bit_depth; │ │ │ │ │ - 67 size_t d_num_channels; │ │ │ │ │ - 68 │ │ │ │ │ - 69 │ │ │ │ │ - 70 friend class PNGImageLoader; │ │ │ │ │ - 71}; │ │ │ │ │ - 72 │ │ │ │ │ - 73 │ │ │ │ │ - 74} // End of section namespace SILLY │ │ │ │ │ - 75 │ │ │ │ │ - 76// Inclue inline function when needed │ │ │ │ │ - 77#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 78#include "SILLYPNGImageContext.icpp" │ │ │ │ │ - 79#endif │ │ │ │ │ - 80 │ │ │ │ │ - 81#endif // end of guard _SILLYPNGImageContext_h_ │ │ │ │ │ + 60#endif // end of guard _SILLYJPGImageLoader_h_ │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PNGImageContext │ │ │ │ │ -Image Context for PNG Image Loader. │ │ │ │ │ -Definition: SILLYPNGImageContext.h:46 │ │ │ │ │ -SILLY::PNGImageLoader │ │ │ │ │ -Loader for PNG Image. │ │ │ │ │ -Definition: SILLYPNGImageLoader.h:43 │ │ │ │ │ +SILLY::PixelFormat │ │ │ │ │ +PixelFormat │ │ │ │ │ +List all pixel format supported. │ │ │ │ │ +Definition: SILLYBase.h:60 │ │ │ │ │ +SILLY::PixelOrigin │ │ │ │ │ +PixelOrigin │ │ │ │ │ +List all pixel origin supported. │ │ │ │ │ +Definition: SILLYBase.h:71 │ │ │ │ │ +SILLY::JPGImageLoader │ │ │ │ │ +Loader class for JPG Image. │ │ │ │ │ +Definition: SILLYJPGImageLoader.h:43 │ │ │ │ │ +SILLY::JPGImageLoader::loadImageData │ │ │ │ │ +bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │ │ +Parse the pixels data of the image and fill the header struct. │ │ │ │ │ +Definition: SILLYJPGImageLoader.cpp:90 │ │ │ │ │ +SILLY::JPGImageLoader::loadHeader │ │ │ │ │ +ImageContext * loadHeader(PixelFormat &header, DataSource *data) │ │ │ │ │ +Parse the header of the image and fill the header struct. │ │ │ │ │ +Definition: SILLYJPGImageLoader.cpp:56 │ │ │ │ │ SILLY::DataSource │ │ │ │ │ This is an abstract class used to provide data to the loader. │ │ │ │ │ Definition: SILLYDataSource.h:47 │ │ │ │ │ SILLY::ImageContext │ │ │ │ │ Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ Definition: SILLYImageContext.h:44 │ │ │ │ │ +SILLY::ImageLoader │ │ │ │ │ +This is an abstract class that define the interface of all image loader. │ │ │ │ │ +Definition: SILLYImageLoader.h:47 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00083_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYJPGImageLoader.icpp
│ │ │ │ +
SILLYPNGImageLoader.icpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYJPGImageLoader.icpp
│ │ │ │ +
2 filename: SILLYPNGImageLoader.icpp
│ │ │ │
3 created: 11 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Inline definition of JPGImageLoader class
│ │ │ │ +
6 purpose: Inline definition for PNGImageLoader
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ * loaders │ │ │ │ │ -SILLYJPGImageLoader.icpp │ │ │ │ │ +SILLYPNGImageLoader.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYJPGImageLoader.icpp │ │ │ │ │ + 2 filename: SILLYPNGImageLoader.icpp │ │ │ │ │ 3 created: 11 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition of JPGImageLoader class │ │ │ │ │ + 6 purpose: Inline definition for PNGImageLoader │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00086_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,104 +39,121 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageContext.h
│ │ │ │ +
SILLYImageContext.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYImageContext.h
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: ImageContext is an abstract class used to hide the loader specific data needed during the parsing of an image
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYImageContext_h_
│ │ │ │ -
31#define _SILLYImageContext_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33
│ │ │ │ -
34// Start of section namespace SILLY
│ │ │ │ -
35namespace SILLY
│ │ │ │ -
36{
│ │ │ │ -
37
│ │ │ │ -
43class SILLY_EXPORT ImageContext
│ │ │ │ -
44{
│ │ │ │ -
45public:
│ │ │ │ -
50 virtual ~ImageContext();
│ │ │ │ -
51
│ │ │ │ -
56 void setDestination(byte* pixels, size_t length, PixelFormat format);
│ │ │ │ -
57
│ │ │ │ -
62 void setNextPixel(byte red, byte green, byte bleu, byte alpha);
│ │ │ │ -
63
│ │ │ │ -
64 size_t getWidth() const;
│ │ │ │ -
65 size_t getHeight() const;
│ │ │ │ -
66 PixelFormat getPixelFormat() const;
│ │ │ │ -
67
│ │ │ │ -
74 bool flipVertically();
│ │ │ │ -
75 protected:
│ │ │ │ -
76 void setWidth(size_t width);
│ │ │ │ -
77
│ │ │ │ -
78 void setHeight(size_t height);
│ │ │ │ -
79
│ │ │ │ -
88 ImageContext(size_t width, size_t height);
│ │ │ │ -
89
│ │ │ │ -
90private:
│ │ │ │ -
91 byte* d_pixels;
│ │ │ │ -
92 size_t d_length;
│ │ │ │ -
93 size_t d_width;
│ │ │ │ -
94 size_t d_height;
│ │ │ │ -
95 size_t d_currentOffset;
│ │ │ │ -
96 PixelFormat d_format;
│ │ │ │ -
97
│ │ │ │ -
98 // Disabled operation
│ │ │ │ - │ │ │ │ -
100 ImageContext& operator=(ImageContext&);
│ │ │ │ -
101};
│ │ │ │ -
102
│ │ │ │ -
103
│ │ │ │ -
104} // End of section namespace SILLY
│ │ │ │ -
105
│ │ │ │ -
106// Inclue inline function when needed
│ │ │ │ -
107#ifdef SILLY_OPT_INLINE
│ │ │ │ -
108#include "SILLYImageContext.icpp"
│ │ │ │ -
109#endif
│ │ │ │ -
110
│ │ │ │ -
111#endif // end of guard _SILLYImageContext_h_
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
│ │ │ │ -
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
│ │ │ │ -
ImageContext(size_t width, size_t height)
Constructor.
│ │ │ │ -
virtual ~ImageContext()
Destructor.
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYImageContext.icpp
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline definition for ImageContext
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34
│ │ │ │ +
35inline ImageContext::ImageContext(size_t width, size_t height)
│ │ │ │ +
36 : d_pixels(0), d_length(0), d_width(width), d_height(height), d_currentOffset(0), d_format(PF_RGBA)
│ │ │ │ +
37{
│ │ │ │ +
38}
│ │ │ │ +
39
│ │ │ │ +
40
│ │ │ │ +
41inline ImageContext::~ImageContext()
│ │ │ │ +
42{
│ │ │ │ +
43}
│ │ │ │ +
44
│ │ │ │ +
45
│ │ │ │ +
46inline void ImageContext::setDestination(byte* pixels, size_t length, PixelFormat format)
│ │ │ │ +
47{
│ │ │ │ +
48 d_pixels = pixels;
│ │ │ │ +
49 d_length = length;
│ │ │ │ +
50 d_currentOffset = 0;
│ │ │ │ +
51 d_format = format;
│ │ │ │ +
52}
│ │ │ │ +
53
│ │ │ │ +
54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte alpha)
│ │ │ │ +
55{
│ │ │ │ +
56 //assert(d_currentOffset < d_length && "ASSERT: try to set a pixel outside of the image");
│ │ │ │ +
57 switch(d_format)
│ │ │ │ +
58 {
│ │ │ │ +
59 case PF_A1B5G5R5:
│ │ │ │ +
60 // The hard part
│ │ │ │ +
61 assert(0 && "ASSERT: Not yet implemented");
│ │ │ │ +
62 break;
│ │ │ │ +
63 case PF_RGB:
│ │ │ │ +
64 // Ignore alpha channel
│ │ │ │ +
65 d_pixels[d_currentOffset++] = red;
│ │ │ │ +
66 d_pixels[d_currentOffset++] = green;
│ │ │ │ +
67 d_pixels[d_currentOffset++] = bleu;
│ │ │ │ +
68 break;
│ │ │ │ +
69
│ │ │ │ +
70 case PF_RGBA:
│ │ │ │ +
71 d_pixels[d_currentOffset++] = red;
│ │ │ │ +
72 d_pixels[d_currentOffset++] = green;
│ │ │ │ +
73 d_pixels[d_currentOffset++] = bleu;
│ │ │ │ +
74 d_pixels[d_currentOffset++] = alpha;
│ │ │ │ +
75 break;
│ │ │ │ +
76
│ │ │ │ +
77 }
│ │ │ │ +
78}
│ │ │ │ +
79inline size_t ImageContext::getWidth() const
│ │ │ │ +
80{
│ │ │ │ +
81 return d_width;
│ │ │ │ +
82}
│ │ │ │ +
83
│ │ │ │ +
84inline void ImageContext::setWidth(size_t width)
│ │ │ │ +
85{
│ │ │ │ +
86 d_width = width;
│ │ │ │ +
87}
│ │ │ │ +
88
│ │ │ │ +
89inline size_t ImageContext::getHeight() const
│ │ │ │ +
90{
│ │ │ │ +
91 return d_height;
│ │ │ │ +
92}
│ │ │ │ +
93
│ │ │ │ +
94inline void ImageContext::setHeight(size_t height)
│ │ │ │ +
95{
│ │ │ │ +
96 d_height = height;
│ │ │ │ +
97}
│ │ │ │ +
98inline PixelFormat ImageContext::getPixelFormat() const
│ │ │ │ +
99{
│ │ │ │ +
100 return d_format;
│ │ │ │ +
101}
│ │ │ │ +
102
│ │ │ │ +
103} // End of section namespace SILLY
│ │ │ │ +
104
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,22 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImageContext.h │ │ │ │ │ +SILLYImageContext.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYImageContext.h │ │ │ │ │ + 2 filename: SILLYImageContext.icpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: ImageContext is an abstract class used to hide the loader specific │ │ │ │ │ -data needed during the parsing of an image │ │ │ │ │ + 6 purpose: Inline definition for ImageContext │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -36,83 +35,89 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYImageContext_h_ │ │ │ │ │ - 31#define _SILLYImageContext_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33 │ │ │ │ │ - 34// Start of section namespace SILLY │ │ │ │ │ - 35namespace SILLY │ │ │ │ │ - 36{ │ │ │ │ │ - 37 │ │ │ │ │ -43class SILLY_EXPORT ImageContext │ │ │ │ │ - 44{ │ │ │ │ │ - 45public: │ │ │ │ │ -50 virtual ~ImageContext(); │ │ │ │ │ - 51 │ │ │ │ │ -56 void setDestination(byte* pixels, size_t length, PixelFormat format); │ │ │ │ │ - 57 │ │ │ │ │ -62 void setNextPixel(byte red, byte green, byte bleu, byte alpha); │ │ │ │ │ - 63 │ │ │ │ │ - 64 size_t getWidth() const; │ │ │ │ │ - 65 size_t getHeight() const; │ │ │ │ │ - 66 PixelFormat getPixelFormat() const; │ │ │ │ │ - 67 │ │ │ │ │ - 74 bool flipVertically(); │ │ │ │ │ - 75 protected: │ │ │ │ │ - 76 void setWidth(size_t width); │ │ │ │ │ - 77 │ │ │ │ │ - 78 void setHeight(size_t height); │ │ │ │ │ - 79 │ │ │ │ │ -88 ImageContext(size_t width, size_t height); │ │ │ │ │ - 89 │ │ │ │ │ - 90private: │ │ │ │ │ - 91 byte* d_pixels; │ │ │ │ │ - 92 size_t d_length; │ │ │ │ │ - 93 size_t d_width; │ │ │ │ │ - 94 size_t d_height; │ │ │ │ │ - 95 size_t d_currentOffset; │ │ │ │ │ - 96 PixelFormat d_format; │ │ │ │ │ - 97 │ │ │ │ │ - 98 // Disabled operation │ │ │ │ │ - 99 ImageContext(ImageContext&); │ │ │ │ │ - 100 ImageContext& operator=(ImageContext&); │ │ │ │ │ - 101}; │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34 │ │ │ │ │ + 35inline ImageContext::ImageContext(size_t width, size_t height) │ │ │ │ │ + 36 : d_pixels(0), d_length(0), d_width(width), d_height(height), │ │ │ │ │ +d_currentOffset(0), d_format(PF_RGBA) │ │ │ │ │ + 37{ │ │ │ │ │ + 38} │ │ │ │ │ + 39 │ │ │ │ │ + 40 │ │ │ │ │ + 41inline ImageContext::~ImageContext() │ │ │ │ │ + 42{ │ │ │ │ │ + 43} │ │ │ │ │ + 44 │ │ │ │ │ + 45 │ │ │ │ │ + 46inline void ImageContext::setDestination(byte* pixels, size_t length, │ │ │ │ │ +PixelFormat format) │ │ │ │ │ + 47{ │ │ │ │ │ + 48 d_pixels = pixels; │ │ │ │ │ + 49 d_length = length; │ │ │ │ │ + 50 d_currentOffset = 0; │ │ │ │ │ + 51 d_format = format; │ │ │ │ │ + 52} │ │ │ │ │ + 53 │ │ │ │ │ + 54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte │ │ │ │ │ +alpha) │ │ │ │ │ + 55{ │ │ │ │ │ + 56 //assert(d_currentOffset < d_length && "ASSERT: try to set a pixel outside │ │ │ │ │ +of the image"); │ │ │ │ │ + 57 switch(d_format) │ │ │ │ │ + 58 { │ │ │ │ │ + 59 case PF_A1B5G5R5: │ │ │ │ │ + 60 // The hard part │ │ │ │ │ + 61 assert(0 && "ASSERT: Not yet implemented"); │ │ │ │ │ + 62 break; │ │ │ │ │ + 63 case PF_RGB: │ │ │ │ │ + 64 // Ignore alpha channel │ │ │ │ │ + 65 d_pixels[d_currentOffset++] = red; │ │ │ │ │ + 66 d_pixels[d_currentOffset++] = green; │ │ │ │ │ + 67 d_pixels[d_currentOffset++] = bleu; │ │ │ │ │ + 68 break; │ │ │ │ │ + 69 │ │ │ │ │ + 70 case PF_RGBA: │ │ │ │ │ + 71 d_pixels[d_currentOffset++] = red; │ │ │ │ │ + 72 d_pixels[d_currentOffset++] = green; │ │ │ │ │ + 73 d_pixels[d_currentOffset++] = bleu; │ │ │ │ │ + 74 d_pixels[d_currentOffset++] = alpha; │ │ │ │ │ + 75 break; │ │ │ │ │ + 76 │ │ │ │ │ + 77 } │ │ │ │ │ + 78} │ │ │ │ │ + 79inline size_t ImageContext::getWidth() const │ │ │ │ │ + 80{ │ │ │ │ │ + 81 return d_width; │ │ │ │ │ + 82} │ │ │ │ │ + 83 │ │ │ │ │ + 84inline void ImageContext::setWidth(size_t width) │ │ │ │ │ + 85{ │ │ │ │ │ + 86 d_width = width; │ │ │ │ │ + 87} │ │ │ │ │ + 88 │ │ │ │ │ + 89inline size_t ImageContext::getHeight() const │ │ │ │ │ + 90{ │ │ │ │ │ + 91 return d_height; │ │ │ │ │ + 92} │ │ │ │ │ + 93 │ │ │ │ │ + 94inline void ImageContext::setHeight(size_t height) │ │ │ │ │ + 95{ │ │ │ │ │ + 96 d_height = height; │ │ │ │ │ + 97} │ │ │ │ │ + 98inline PixelFormat ImageContext::getPixelFormat() const │ │ │ │ │ + 99{ │ │ │ │ │ + 100 return d_format; │ │ │ │ │ + 101} │ │ │ │ │ 102 │ │ │ │ │ - 103 │ │ │ │ │ - 104} // End of section namespace SILLY │ │ │ │ │ - 105 │ │ │ │ │ - 106// Inclue inline function when needed │ │ │ │ │ - 107#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 108#include "SILLYImageContext.icpp" │ │ │ │ │ - 109#endif │ │ │ │ │ - 110 │ │ │ │ │ - 111#endif // end of guard _SILLYImageContext_h_ │ │ │ │ │ -SILLY │ │ │ │ │ -Simple Image Loading LibrarY namespace. │ │ │ │ │ -Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PixelFormat │ │ │ │ │ -PixelFormat │ │ │ │ │ -List all pixel format supported. │ │ │ │ │ -Definition: SILLYBase.h:60 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ -SILLY::ImageContext::setNextPixel │ │ │ │ │ -void setNextPixel(byte red, byte green, byte bleu, byte alpha) │ │ │ │ │ -Set the next pixel of the image. │ │ │ │ │ -SILLY::ImageContext::setDestination │ │ │ │ │ -void setDestination(byte *pixels, size_t length, PixelFormat format) │ │ │ │ │ -Set the destination of the loading. │ │ │ │ │ -SILLY::ImageContext::ImageContext │ │ │ │ │ -ImageContext(size_t width, size_t height) │ │ │ │ │ -Constructor. │ │ │ │ │ -SILLY::ImageContext::~ImageContext │ │ │ │ │ -virtual ~ImageContext() │ │ │ │ │ -Destructor. │ │ │ │ │ + 103} // End of section namespace SILLY │ │ │ │ │ + 104 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00089_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,67 +39,82 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYFileDataSource.icpp
│ │ │ │ +
SILLYMemoryDataSource.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYFileDataSource.icpp
│ │ │ │ -
3 created: 20 Jul 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline function definition for the FileDataSource class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ -
34inline bool FileDataSource::isValid() const
│ │ │ │ -
35{
│ │ │ │ -
36 return d_error;
│ │ │ │ -
37}
│ │ │ │ -
38
│ │ │ │ -
39inline const byte* FileDataSource::getDataPtr() const
│ │ │ │ -
40{
│ │ │ │ -
41 return d_bytes;
│ │ │ │ -
42}
│ │ │ │ -
43
│ │ │ │ -
44inline size_t FileDataSource::getSize() const
│ │ │ │ -
45{
│ │ │ │ -
46 return d_size;
│ │ │ │ -
47}
│ │ │ │ -
48
│ │ │ │ -
49} // End of section namespace SILLY
│ │ │ │ -
50
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYMemoryDataSource.h
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: SILLYMemoryDataSource declaration for the SILLY library
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYMemoryDataSource_h_
│ │ │ │ +
31#define _SILLYMemoryDataSource_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33#include "SILLYDataSource.h"
│ │ │ │ +
34// Start of section namespace SILLY
│ │ │ │ +
35namespace SILLY
│ │ │ │ +
36{
│ │ │ │ +
37
│ │ │ │ +
48class SILLY_EXPORT MemoryDataSource : public DataSource
│ │ │ │ +
49{
│ │ │ │ +
50public:
│ │ │ │ +
63 MemoryDataSource(const byte* data, size_t size);
│ │ │ │ +
64
│ │ │ │ +
65
│ │ │ │ +
66 const byte* getDataPtr() const;
│ │ │ │ +
67
│ │ │ │ +
68 size_t getSize() const;
│ │ │ │ +
69private:
│ │ │ │ +
70 const byte* d_bytes;
│ │ │ │ +
71 size_t d_size;
│ │ │ │ +
72};
│ │ │ │ +
73
│ │ │ │ +
74
│ │ │ │ +
75} // End of section namespace SILLY
│ │ │ │ +
76
│ │ │ │ +
77// Inclue inline function when needed
│ │ │ │ +
78#ifdef SILLY_OPT_INLINE
│ │ │ │ +
79#include "SILLYMemoryDataSource.icpp"
│ │ │ │ +
80#endif
│ │ │ │ +
81
│ │ │ │ +
82#endif // end of guard _SILLYMemoryDataSource_h_
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Load an image from a memory area.
│ │ │ │ +
const byte * getDataPtr() const
Get raw access to the image data.
│ │ │ │ +
size_t getSize() const
Return the size of the data.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYFileDataSource.icpp │ │ │ │ │ +SILLYMemoryDataSource.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYFileDataSource.icpp │ │ │ │ │ - 3 created: 20 Jul 2006 │ │ │ │ │ + 2 filename: SILLYMemoryDataSource.h │ │ │ │ │ + 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline function definition for the FileDataSource class │ │ │ │ │ + 6 purpose: SILLYMemoryDataSource declaration for the SILLY library │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,31 +35,56 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ - 34inline bool FileDataSource::isValid() const │ │ │ │ │ - 35{ │ │ │ │ │ - 36 return d_error; │ │ │ │ │ - 37} │ │ │ │ │ - 38 │ │ │ │ │ - 39inline const byte* FileDataSource::getDataPtr() const │ │ │ │ │ - 40{ │ │ │ │ │ - 41 return d_bytes; │ │ │ │ │ - 42} │ │ │ │ │ - 43 │ │ │ │ │ - 44inline size_t FileDataSource::getSize() const │ │ │ │ │ - 45{ │ │ │ │ │ - 46 return d_size; │ │ │ │ │ - 47} │ │ │ │ │ - 48 │ │ │ │ │ - 49} // End of section namespace SILLY │ │ │ │ │ - 50 │ │ │ │ │ + 30#ifndef _SILLYMemoryDataSource_h_ │ │ │ │ │ + 31#define _SILLYMemoryDataSource_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33#include "SILLYDataSource.h" │ │ │ │ │ + 34// Start of section namespace SILLY │ │ │ │ │ + 35namespace SILLY │ │ │ │ │ + 36{ │ │ │ │ │ + 37 │ │ │ │ │ +48class SILLY_EXPORT MemoryDataSource : public DataSource │ │ │ │ │ + 49{ │ │ │ │ │ + 50public: │ │ │ │ │ + 63 MemoryDataSource(const byte* data, size_t size); │ │ │ │ │ + 64 │ │ │ │ │ + 65 │ │ │ │ │ +66 const byte* getDataPtr() const; │ │ │ │ │ + 67 │ │ │ │ │ +68 size_t getSize() const; │ │ │ │ │ + 69private: │ │ │ │ │ + 70 const byte* d_bytes; │ │ │ │ │ + 71 size_t d_size; │ │ │ │ │ + 72}; │ │ │ │ │ + 73 │ │ │ │ │ + 74 │ │ │ │ │ + 75} // End of section namespace SILLY │ │ │ │ │ + 76 │ │ │ │ │ + 77// Inclue inline function when needed │ │ │ │ │ + 78#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 79#include "SILLYMemoryDataSource.icpp" │ │ │ │ │ + 80#endif │ │ │ │ │ + 81 │ │ │ │ │ + 82#endif // end of guard _SILLYMemoryDataSource_h_ │ │ │ │ │ +SILLY │ │ │ │ │ +Simple Image Loading LibrarY namespace. │ │ │ │ │ +Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::MemoryDataSource │ │ │ │ │ +Load an image from a memory area. │ │ │ │ │ +Definition: SILLYMemoryDataSource.h:49 │ │ │ │ │ +SILLY::MemoryDataSource::getDataPtr │ │ │ │ │ +const byte * getDataPtr() const │ │ │ │ │ +Get raw access to the image data. │ │ │ │ │ +SILLY::MemoryDataSource::getSize │ │ │ │ │ +size_t getSize() const │ │ │ │ │ +Return the size of the data. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00092_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,82 +39,124 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYMemoryDataSource.h
│ │ │ │ +
SILLYImage.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYMemoryDataSource.h
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: SILLYMemoryDataSource declaration for the SILLY library
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYMemoryDataSource_h_
│ │ │ │ -
31#define _SILLYMemoryDataSource_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33#include "SILLYDataSource.h"
│ │ │ │ -
34// Start of section namespace SILLY
│ │ │ │ -
35namespace SILLY
│ │ │ │ -
36{
│ │ │ │ +
1
│ │ │ │ +
2/***********************************************************************
│ │ │ │ +
3 filename: SILLYImage.h
│ │ │ │ +
4 created: 10 Jun 2006
│ │ │ │ +
5 author: Olivier Delannoy
│ │ │ │ +
6
│ │ │ │ +
7 purpose: Image class definition
│ │ │ │ +
8*************************************************************************/
│ │ │ │ +
9/***************************************************************************
│ │ │ │ +
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
11 *
│ │ │ │ +
12 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
13 * a copy of this software and associated documentation files (the
│ │ │ │ +
14 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
15 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
16 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
17 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
18 * the following conditions:
│ │ │ │ +
19 *
│ │ │ │ +
20 * The above copyright notice and this permission notice shall be
│ │ │ │ +
21 * included in all copies or substantial portions of the Software.
│ │ │ │ +
22 *
│ │ │ │ +
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
29 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
30 ***************************************************************************/
│ │ │ │ +
31#ifndef _SILLYImage_h_
│ │ │ │ +
32#define _SILLYImage_h_
│ │ │ │ +
33#include "SILLYBase.h"
│ │ │ │ +
34#include "SILLYImageContext.h"
│ │ │ │ +
35#include "SILLYDataSource.h"
│ │ │ │ +
36#include "SILLYImageLoader.h"
│ │ │ │
37
│ │ │ │ -
48class SILLY_EXPORT MemoryDataSource : public DataSource
│ │ │ │ -
49{
│ │ │ │ -
50public:
│ │ │ │ -
63 MemoryDataSource(const byte* data, size_t size);
│ │ │ │ -
64
│ │ │ │ -
65
│ │ │ │ -
66 const byte* getDataPtr() const;
│ │ │ │ -
67
│ │ │ │ -
68 size_t getSize() const;
│ │ │ │ -
69private:
│ │ │ │ -
70 const byte* d_bytes;
│ │ │ │ -
71 size_t d_size;
│ │ │ │ -
72};
│ │ │ │ -
73
│ │ │ │ -
74
│ │ │ │ -
75} // End of section namespace SILLY
│ │ │ │ -
76
│ │ │ │ -
77// Inclue inline function when needed
│ │ │ │ -
78#ifdef SILLY_OPT_INLINE
│ │ │ │ -
79#include "SILLYMemoryDataSource.icpp"
│ │ │ │ -
80#endif
│ │ │ │ -
81
│ │ │ │ -
82#endif // end of guard _SILLYMemoryDataSource_h_
│ │ │ │ +
38// Start of section namespace SILLY
│ │ │ │ +
39namespace SILLY
│ │ │ │ +
40{
│ │ │ │ +
41
│ │ │ │ +
46class SILLY_EXPORT Image
│ │ │ │ +
47{
│ │ │ │ +
48public:
│ │ │ │ +
55 Image(DataSource& data);
│ │ │ │ +
56
│ │ │ │ + │ │ │ │ +
62
│ │ │ │ +
67 bool isValid() const;
│ │ │ │ +
68
│ │ │ │ +
69
│ │ │ │ +
76 bool loadImageHeader();
│ │ │ │ +
77
│ │ │ │ +
91 bool loadImageData(PixelFormat resultFormat = PF_RGBA, PixelOrigin origin = PO_TOP_LEFT);
│ │ │ │ +
92
│ │ │ │ +
97 size_t getWidth() const;
│ │ │ │ +
98
│ │ │ │ +
103 size_t getHeight() const;
│ │ │ │ +
104
│ │ │ │ + │ │ │ │ +
110
│ │ │ │ + │ │ │ │ +
116
│ │ │ │ +
120 const byte* getPixelsDataPtr() const;
│ │ │ │ +
125 size_t getPixelsDataSize() const;
│ │ │ │ +
130 const char* getLoaderIdentifierString() const;
│ │ │ │ +
131private:
│ │ │ │ +
132 bool allocate();
│ │ │ │ +
133
│ │ │ │ +
134private:
│ │ │ │ +
135
│ │ │ │ +
136 size_t d_bpp;
│ │ │ │ +
137 PixelFormat d_pfSource;
│ │ │ │ +
138 byte* d_pixels;
│ │ │ │ +
139 DataSource* d_data;
│ │ │ │ +
140 ImageContext* d_imageContext;
│ │ │ │ +
141 ImageLoader* d_imageLoader;
│ │ │ │ +
142
│ │ │ │ +
143 // Disabled operation
│ │ │ │ +
144 Image(Image&);
│ │ │ │ +
145 Image& operator=(Image&);
│ │ │ │ +
146};
│ │ │ │ +
147
│ │ │ │ +
148} // End of section namespace SILLY
│ │ │ │ +
149
│ │ │ │ +
150// Inclue inline function when needed
│ │ │ │ +
151#ifdef SILLY_OPT_INLINE
│ │ │ │ +
152#include "SILLYImage.icpp"
│ │ │ │ +
153#endif
│ │ │ │ +
154
│ │ │ │ +
155#endif // end of guard _SILLYImage_h_
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Load an image from a memory area.
│ │ │ │ -
const byte * getDataPtr() const
Get raw access to the image data.
│ │ │ │ -
size_t getSize() const
Return the size of the data.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Image is the main user class of the library.
Definition: SILLYImage.h:47
│ │ │ │ +
PixelFormat getSourcePixelFormat() const
Retrieve the pixel format used for the image storage.
│ │ │ │ +
const char * getLoaderIdentifierString() const
Get Image loader identifier string.
│ │ │ │ +
const byte * getPixelsDataPtr() const
Get a pointer to the pixels data.
│ │ │ │ +
bool isValid() const
Return true if the image is valid after its loading.
│ │ │ │ +
size_t getPixelsDataSize() const
Get the size of the pixel buffer.
│ │ │ │ +
~Image()
Destructor.
│ │ │ │ +
size_t getWidth() const
Retrieve the width of the image.
│ │ │ │ +
PixelFormat getPixelFormat() const
Retrieve the pixel format of the resulting image.
│ │ │ │ +
size_t getHeight() const
Retrieve the height of the image.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
This is an abstract class that define the interface of all image loader.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,87 +4,154 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYMemoryDataSource.h │ │ │ │ │ - 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYMemoryDataSource.h │ │ │ │ │ - 3 created: 10 Jun 2006 │ │ │ │ │ - 4 author: Olivier Delannoy │ │ │ │ │ - 5 │ │ │ │ │ - 6 purpose: SILLYMemoryDataSource declaration for the SILLY library │ │ │ │ │ - 7*************************************************************************/ │ │ │ │ │ - 8/*************************************************************************** │ │ │ │ │ - 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ - 10 * │ │ │ │ │ - 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ - 12 * a copy of this software and associated documentation files (the │ │ │ │ │ - 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ - 14 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ - 15 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ - 16 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ - 17 * the following conditions: │ │ │ │ │ - 18 * │ │ │ │ │ - 19 * The above copyright notice and this permission notice shall be │ │ │ │ │ - 20 * included in all copies or substantial portions of the Software. │ │ │ │ │ - 21 * │ │ │ │ │ - 22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ - 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ - 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ - 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ - 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ - 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ - 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ - 29 │ │ │ │ │ +SILLYImage.h │ │ │ │ │ + 1 │ │ │ │ │ + 2/*********************************************************************** │ │ │ │ │ + 3 filename: SILLYImage.h │ │ │ │ │ + 4 created: 10 Jun 2006 │ │ │ │ │ + 5 author: Olivier Delannoy │ │ │ │ │ + 6 │ │ │ │ │ + 7 purpose: Image class definition │ │ │ │ │ + 8*************************************************************************/ │ │ │ │ │ + 9/*************************************************************************** │ │ │ │ │ + 10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ + 11 * │ │ │ │ │ + 12 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ + 13 * a copy of this software and associated documentation files (the │ │ │ │ │ + 14 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ + 15 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ + 16 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ + 17 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ + 18 * the following conditions: │ │ │ │ │ + 19 * │ │ │ │ │ + 20 * The above copyright notice and this permission notice shall be │ │ │ │ │ + 21 * included in all copies or substantial portions of the Software. │ │ │ │ │ + 22 * │ │ │ │ │ + 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ + 24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ + 25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ + 26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ + 27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ + 28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ + 29 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ + 30 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYMemoryDataSource_h_ │ │ │ │ │ - 31#define _SILLYMemoryDataSource_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33#include "SILLYDataSource.h" │ │ │ │ │ - 34// Start of section namespace SILLY │ │ │ │ │ - 35namespace SILLY │ │ │ │ │ - 36{ │ │ │ │ │ + 31#ifndef _SILLYImage_h_ │ │ │ │ │ + 32#define _SILLYImage_h_ │ │ │ │ │ + 33#include "SILLYBase.h" │ │ │ │ │ + 34#include "SILLYImageContext.h" │ │ │ │ │ + 35#include "SILLYDataSource.h" │ │ │ │ │ + 36#include "SILLYImageLoader.h" │ │ │ │ │ 37 │ │ │ │ │ -48class SILLY_EXPORT MemoryDataSource : public DataSource │ │ │ │ │ - 49{ │ │ │ │ │ - 50public: │ │ │ │ │ - 63 MemoryDataSource(const byte* data, size_t size); │ │ │ │ │ - 64 │ │ │ │ │ - 65 │ │ │ │ │ -66 const byte* getDataPtr() const; │ │ │ │ │ - 67 │ │ │ │ │ -68 size_t getSize() const; │ │ │ │ │ - 69private: │ │ │ │ │ - 70 const byte* d_bytes; │ │ │ │ │ - 71 size_t d_size; │ │ │ │ │ - 72}; │ │ │ │ │ - 73 │ │ │ │ │ - 74 │ │ │ │ │ - 75} // End of section namespace SILLY │ │ │ │ │ - 76 │ │ │ │ │ - 77// Inclue inline function when needed │ │ │ │ │ - 78#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 79#include "SILLYMemoryDataSource.icpp" │ │ │ │ │ - 80#endif │ │ │ │ │ - 81 │ │ │ │ │ - 82#endif // end of guard _SILLYMemoryDataSource_h_ │ │ │ │ │ + 38// Start of section namespace SILLY │ │ │ │ │ + 39namespace SILLY │ │ │ │ │ + 40{ │ │ │ │ │ + 41 │ │ │ │ │ +46class SILLY_EXPORT Image │ │ │ │ │ + 47{ │ │ │ │ │ + 48public: │ │ │ │ │ + 55 Image(DataSource& data); │ │ │ │ │ + 56 │ │ │ │ │ +61 ~Image(); │ │ │ │ │ + 62 │ │ │ │ │ +67 bool isValid() const; │ │ │ │ │ + 68 │ │ │ │ │ + 69 │ │ │ │ │ + 76 bool loadImageHeader(); │ │ │ │ │ + 77 │ │ │ │ │ + 91 bool loadImageData(PixelFormat resultFormat = PF_RGBA, PixelOrigin origin = │ │ │ │ │ +PO_TOP_LEFT); │ │ │ │ │ + 92 │ │ │ │ │ +97 size_t getWidth() const; │ │ │ │ │ + 98 │ │ │ │ │ +103 size_t getHeight() const; │ │ │ │ │ + 104 │ │ │ │ │ +109 PixelFormat getSourcePixelFormat() const; │ │ │ │ │ + 110 │ │ │ │ │ +115 PixelFormat getPixelFormat() const; │ │ │ │ │ + 116 │ │ │ │ │ +120 const byte* getPixelsDataPtr() const; │ │ │ │ │ +125 size_t getPixelsDataSize() const; │ │ │ │ │ +130 const char* getLoaderIdentifierString() const; │ │ │ │ │ + 131private: │ │ │ │ │ + 132 bool allocate(); │ │ │ │ │ + 133 │ │ │ │ │ + 134private: │ │ │ │ │ + 135 │ │ │ │ │ + 136 size_t d_bpp; │ │ │ │ │ + 137 PixelFormat d_pfSource; │ │ │ │ │ + 138 byte* d_pixels; │ │ │ │ │ + 139 DataSource* d_data; │ │ │ │ │ + 140 ImageContext* d_imageContext; │ │ │ │ │ + 141 ImageLoader* d_imageLoader; │ │ │ │ │ + 142 │ │ │ │ │ + 143 // Disabled operation │ │ │ │ │ + 144 Image(Image&); │ │ │ │ │ + 145 Image& operator=(Image&); │ │ │ │ │ + 146}; │ │ │ │ │ + 147 │ │ │ │ │ + 148} // End of section namespace SILLY │ │ │ │ │ + 149 │ │ │ │ │ + 150// Inclue inline function when needed │ │ │ │ │ + 151#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 152#include "SILLYImage.icpp" │ │ │ │ │ + 153#endif │ │ │ │ │ + 154 │ │ │ │ │ + 155#endif // end of guard _SILLYImage_h_ │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::PixelFormat │ │ │ │ │ +PixelFormat │ │ │ │ │ +List all pixel format supported. │ │ │ │ │ +Definition: SILLYBase.h:60 │ │ │ │ │ +SILLY::PixelOrigin │ │ │ │ │ +PixelOrigin │ │ │ │ │ +List all pixel origin supported. │ │ │ │ │ +Definition: SILLYBase.h:71 │ │ │ │ │ SILLY::DataSource │ │ │ │ │ This is an abstract class used to provide data to the loader. │ │ │ │ │ Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::MemoryDataSource │ │ │ │ │ -Load an image from a memory area. │ │ │ │ │ -Definition: SILLYMemoryDataSource.h:49 │ │ │ │ │ -SILLY::MemoryDataSource::getDataPtr │ │ │ │ │ -const byte * getDataPtr() const │ │ │ │ │ -Get raw access to the image data. │ │ │ │ │ -SILLY::MemoryDataSource::getSize │ │ │ │ │ -size_t getSize() const │ │ │ │ │ -Return the size of the data. │ │ │ │ │ +SILLY::Image │ │ │ │ │ +Image is the main user class of the library. │ │ │ │ │ +Definition: SILLYImage.h:47 │ │ │ │ │ +SILLY::Image::getSourcePixelFormat │ │ │ │ │ +PixelFormat getSourcePixelFormat() const │ │ │ │ │ +Retrieve the pixel format used for the image storage. │ │ │ │ │ +SILLY::Image::getLoaderIdentifierString │ │ │ │ │ +const char * getLoaderIdentifierString() const │ │ │ │ │ +Get Image loader identifier string. │ │ │ │ │ +SILLY::Image::getPixelsDataPtr │ │ │ │ │ +const byte * getPixelsDataPtr() const │ │ │ │ │ +Get a pointer to the pixels data. │ │ │ │ │ +SILLY::Image::isValid │ │ │ │ │ +bool isValid() const │ │ │ │ │ +Return true if the image is valid after its loading. │ │ │ │ │ +SILLY::Image::getPixelsDataSize │ │ │ │ │ +size_t getPixelsDataSize() const │ │ │ │ │ +Get the size of the pixel buffer. │ │ │ │ │ +SILLY::Image::~Image │ │ │ │ │ +~Image() │ │ │ │ │ +Destructor. │ │ │ │ │ +SILLY::Image::getWidth │ │ │ │ │ +size_t getWidth() const │ │ │ │ │ +Retrieve the width of the image. │ │ │ │ │ +SILLY::Image::getPixelFormat │ │ │ │ │ +PixelFormat getPixelFormat() const │ │ │ │ │ +Retrieve the pixel format of the resulting image. │ │ │ │ │ +SILLY::Image::getHeight │ │ │ │ │ +size_t getHeight() const │ │ │ │ │ +Retrieve the height of the image. │ │ │ │ │ +SILLY::ImageContext │ │ │ │ │ +Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ +Definition: SILLYImageContext.h:44 │ │ │ │ │ +SILLY::ImageLoader │ │ │ │ │ +This is an abstract class that define the interface of all image loader. │ │ │ │ │ +Definition: SILLYImageLoader.h:47 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00095_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYDataSource.icpp
│ │ │ │ +
SILLYMemoryDataSource.icpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYDataSource.icpp
│ │ │ │ +
2 Filename: SILLYMemoryDataSource.icpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │ -
4 author: ode@dalfy.dalfy.dyndns.org
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class
│ │ │ │ +
6 purpose: Inline function definition for MemoryDataSource class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,26 +75,27 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30
│ │ │ │
31// Start of section namespace SILLY
│ │ │ │
32namespace SILLY
│ │ │ │
33{
│ │ │ │ -
34inline DataSource::~DataSource()
│ │ │ │ -
35{
│ │ │ │ -
36}
│ │ │ │ -
37
│ │ │ │ -
38inline byte DataSource::operator[](size_t offset) const
│ │ │ │ -
39{
│ │ │ │ -
40 assert(offset < getSize() && "ASSERT: Trying to access pixel outside of the data");
│ │ │ │ -
41 return getDataPtr()[offset];
│ │ │ │ -
42}
│ │ │ │ -
43
│ │ │ │ -
44} // End of section namespace SILLY
│ │ │ │ -
45
│ │ │ │ +
34
│ │ │ │ +
35inline const byte* MemoryDataSource::getDataPtr() const
│ │ │ │ +
36{
│ │ │ │ +
37 return d_bytes;
│ │ │ │ +
38}
│ │ │ │ +
39
│ │ │ │ +
40inline size_t MemoryDataSource::getSize() const
│ │ │ │ +
41{
│ │ │ │ +
42 return d_size;
│ │ │ │ +
43}
│ │ │ │ +
44
│ │ │ │ +
45} // End of section namespace SILLY
│ │ │ │ +
46
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYDataSource.icpp │ │ │ │ │ +SILLYMemoryDataSource.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYDataSource.icpp │ │ │ │ │ + 2 Filename: SILLYMemoryDataSource.icpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ - 4 author: ode@dalfy.dalfy.dyndns.org │ │ │ │ │ + 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class │ │ │ │ │ + 6 purpose: Inline function definition for MemoryDataSource class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30 │ │ │ │ │ 31// Start of section namespace SILLY │ │ │ │ │ 32namespace SILLY │ │ │ │ │ 33{ │ │ │ │ │ - 34inline DataSource::~DataSource() │ │ │ │ │ - 35{ │ │ │ │ │ - 36} │ │ │ │ │ - 37 │ │ │ │ │ - 38inline byte DataSource::operator[](size_t offset) const │ │ │ │ │ - 39{ │ │ │ │ │ - 40 assert(offset < getSize() && "ASSERT: Trying to access pixel outside of the │ │ │ │ │ -data"); │ │ │ │ │ - 41 return getDataPtr()[offset]; │ │ │ │ │ - 42} │ │ │ │ │ - 43 │ │ │ │ │ - 44} // End of section namespace SILLY │ │ │ │ │ - 45 │ │ │ │ │ + 34 │ │ │ │ │ + 35inline const byte* MemoryDataSource::getDataPtr() const │ │ │ │ │ + 36{ │ │ │ │ │ + 37 return d_bytes; │ │ │ │ │ + 38} │ │ │ │ │ + 39 │ │ │ │ │ + 40inline size_t MemoryDataSource::getSize() const │ │ │ │ │ + 41{ │ │ │ │ │ + 42 return d_size; │ │ │ │ │ + 43} │ │ │ │ │ + 44 │ │ │ │ │ + 45} // End of section namespace SILLY │ │ │ │ │ + 46 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00098_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,124 +39,95 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImage.h
│ │ │ │ +
SILLYImageLoader.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1
│ │ │ │ -
2/***********************************************************************
│ │ │ │ -
3 filename: SILLYImage.h
│ │ │ │ -
4 created: 10 Jun 2006
│ │ │ │ -
5 author: Olivier Delannoy
│ │ │ │ -
6
│ │ │ │ -
7 purpose: Image class definition
│ │ │ │ -
8*************************************************************************/
│ │ │ │ -
9/***************************************************************************
│ │ │ │ -
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
11 *
│ │ │ │ -
12 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
13 * a copy of this software and associated documentation files (the
│ │ │ │ -
14 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
15 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
16 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
17 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
18 * the following conditions:
│ │ │ │ -
19 *
│ │ │ │ -
20 * The above copyright notice and this permission notice shall be
│ │ │ │ -
21 * included in all copies or substantial portions of the Software.
│ │ │ │ -
22 *
│ │ │ │ -
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
29 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
30 ***************************************************************************/
│ │ │ │ -
31#ifndef _SILLYImage_h_
│ │ │ │ -
32#define _SILLYImage_h_
│ │ │ │ -
33#include "SILLYBase.h"
│ │ │ │ -
34#include "SILLYImageContext.h"
│ │ │ │ -
35#include "SILLYDataSource.h"
│ │ │ │ -
36#include "SILLYImageLoader.h"
│ │ │ │ -
37
│ │ │ │ -
38// Start of section namespace SILLY
│ │ │ │ -
39namespace SILLY
│ │ │ │ -
40{
│ │ │ │ -
41
│ │ │ │ -
46class SILLY_EXPORT Image
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYImageLoader.h
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Abstract class for all image loader
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYImageLoader_h_
│ │ │ │ +
31#define _SILLYImageLoader_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33// Start of section namespace SILLY
│ │ │ │ +
34namespace SILLY
│ │ │ │ +
35{
│ │ │ │ +
36class DataSource; // Forward declaration
│ │ │ │ +
37class ImageContext; // Forward declaration
│ │ │ │ +
38
│ │ │ │ +
46class SILLY_EXPORT ImageLoader
│ │ │ │
47{
│ │ │ │ -
48public:
│ │ │ │ -
55 Image(DataSource& data);
│ │ │ │ -
56
│ │ │ │ - │ │ │ │ -
62
│ │ │ │ -
67 bool isValid() const;
│ │ │ │ -
68
│ │ │ │ -
69
│ │ │ │ -
76 bool loadImageHeader();
│ │ │ │ -
77
│ │ │ │ -
91 bool loadImageData(PixelFormat resultFormat = PF_RGBA, PixelOrigin origin = PO_TOP_LEFT);
│ │ │ │ -
92
│ │ │ │ -
97 size_t getWidth() const;
│ │ │ │ -
98
│ │ │ │ -
103 size_t getHeight() const;
│ │ │ │ -
104
│ │ │ │ - │ │ │ │ -
110
│ │ │ │ - │ │ │ │ -
116
│ │ │ │ -
120 const byte* getPixelsDataPtr() const;
│ │ │ │ -
125 size_t getPixelsDataSize() const;
│ │ │ │ -
130 const char* getLoaderIdentifierString() const;
│ │ │ │ -
131private:
│ │ │ │ -
132 bool allocate();
│ │ │ │ -
133
│ │ │ │ -
134private:
│ │ │ │ -
135
│ │ │ │ -
136 size_t d_bpp;
│ │ │ │ -
137 PixelFormat d_pfSource;
│ │ │ │ -
138 byte* d_pixels;
│ │ │ │ -
139 DataSource* d_data;
│ │ │ │ -
140 ImageContext* d_imageContext;
│ │ │ │ -
141 ImageLoader* d_imageLoader;
│ │ │ │ -
142
│ │ │ │ -
143 // Disabled operation
│ │ │ │ -
144 Image(Image&);
│ │ │ │ -
145 Image& operator=(Image&);
│ │ │ │ -
146};
│ │ │ │ -
147
│ │ │ │ -
148} // End of section namespace SILLY
│ │ │ │ -
149
│ │ │ │ -
150// Inclue inline function when needed
│ │ │ │ -
151#ifdef SILLY_OPT_INLINE
│ │ │ │ -
152#include "SILLYImage.icpp"
│ │ │ │ -
153#endif
│ │ │ │ -
154
│ │ │ │ -
155#endif // end of guard _SILLYImage_h_
│ │ │ │ +
48protected:
│ │ │ │ +
52 ImageLoader(const char* name);
│ │ │ │ +
53public:
│ │ │ │ +
54
│ │ │ │ +
59 virtual ~ImageLoader();
│ │ │ │ +
60
│ │ │ │ +
71 virtual ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data) = 0;
│ │ │ │ +
72
│ │ │ │ +
73
│ │ │ │ +
86 virtual bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context) = 0;
│ │ │ │ +
87
│ │ │ │ +
94 void destroyContext(ImageContext* context);
│ │ │ │ +
95
│ │ │ │ +
100 const char* getIdentifierString() const;
│ │ │ │ +
101private:
│ │ │ │ +
102 const char* d_name;
│ │ │ │ +
103
│ │ │ │ +
104};
│ │ │ │ +
105
│ │ │ │ +
106} // End of section namespace SILLY
│ │ │ │ +
107
│ │ │ │ +
108// Inclue inline function when needed
│ │ │ │ +
109#ifdef SILLY_OPT_INLINE
│ │ │ │ +
110#include "SILLYImageLoader.icpp"
│ │ │ │ +
111#endif
│ │ │ │ +
112
│ │ │ │ +
113#endif // end of guard _SILLYImageLoader_h_
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Image is the main user class of the library.
Definition: SILLYImage.h:47
│ │ │ │ -
PixelFormat getSourcePixelFormat() const
Retrieve the pixel format used for the image storage.
│ │ │ │ -
const char * getLoaderIdentifierString() const
Get Image loader identifier string.
│ │ │ │ -
const byte * getPixelsDataPtr() const
Get a pointer to the pixels data.
│ │ │ │ -
bool isValid() const
Return true if the image is valid after its loading.
│ │ │ │ -
size_t getPixelsDataSize() const
Get the size of the pixel buffer.
│ │ │ │ -
~Image()
Destructor.
│ │ │ │ -
size_t getWidth() const
Retrieve the width of the image.
│ │ │ │ -
PixelFormat getPixelFormat() const
Retrieve the pixel format of the resulting image.
│ │ │ │ -
size_t getHeight() const
Retrieve the height of the image.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
This is an abstract class that define the interface of all image loader.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ +
This is an abstract class that define the interface of all image loader.
│ │ │ │ +
ImageLoader(const char *name)
Constructor.
│ │ │ │ +
virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)=0
Parse the header of the image and fill the header struct.
│ │ │ │ +
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
│ │ │ │ +
virtual ~ImageLoader()
Destructor.
│ │ │ │ +
const char * getIdentifierString() const
Return the name of the loader.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,154 +4,118 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImage.h │ │ │ │ │ - 1 │ │ │ │ │ - 2/*********************************************************************** │ │ │ │ │ - 3 filename: SILLYImage.h │ │ │ │ │ - 4 created: 10 Jun 2006 │ │ │ │ │ - 5 author: Olivier Delannoy │ │ │ │ │ - 6 │ │ │ │ │ - 7 purpose: Image class definition │ │ │ │ │ - 8*************************************************************************/ │ │ │ │ │ - 9/*************************************************************************** │ │ │ │ │ - 10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ - 11 * │ │ │ │ │ - 12 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ - 13 * a copy of this software and associated documentation files (the │ │ │ │ │ - 14 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ - 15 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ - 16 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ - 17 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ - 18 * the following conditions: │ │ │ │ │ - 19 * │ │ │ │ │ - 20 * The above copyright notice and this permission notice shall be │ │ │ │ │ - 21 * included in all copies or substantial portions of the Software. │ │ │ │ │ - 22 * │ │ │ │ │ - 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ - 24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ - 25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ - 26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ - 27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ - 28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ - 29 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ - 30 │ │ │ │ │ +SILLYImageLoader.h │ │ │ │ │ + 1/*********************************************************************** │ │ │ │ │ + 2 filename: SILLYImageLoader.h │ │ │ │ │ + 3 created: 10 Jun 2006 │ │ │ │ │ + 4 author: Olivier Delannoy │ │ │ │ │ + 5 │ │ │ │ │ + 6 purpose: Abstract class for all image loader │ │ │ │ │ + 7*************************************************************************/ │ │ │ │ │ + 8/*************************************************************************** │ │ │ │ │ + 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ + 10 * │ │ │ │ │ + 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ + 12 * a copy of this software and associated documentation files (the │ │ │ │ │ + 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ + 14 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ + 15 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ + 16 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ + 17 * the following conditions: │ │ │ │ │ + 18 * │ │ │ │ │ + 19 * The above copyright notice and this permission notice shall be │ │ │ │ │ + 20 * included in all copies or substantial portions of the Software. │ │ │ │ │ + 21 * │ │ │ │ │ + 22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ + 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ + 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ + 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ + 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ + 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ + 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ + 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 31#ifndef _SILLYImage_h_ │ │ │ │ │ - 32#define _SILLYImage_h_ │ │ │ │ │ - 33#include "SILLYBase.h" │ │ │ │ │ - 34#include "SILLYImageContext.h" │ │ │ │ │ - 35#include "SILLYDataSource.h" │ │ │ │ │ - 36#include "SILLYImageLoader.h" │ │ │ │ │ - 37 │ │ │ │ │ - 38// Start of section namespace SILLY │ │ │ │ │ - 39namespace SILLY │ │ │ │ │ - 40{ │ │ │ │ │ - 41 │ │ │ │ │ -46class SILLY_EXPORT Image │ │ │ │ │ + 30#ifndef _SILLYImageLoader_h_ │ │ │ │ │ + 31#define _SILLYImageLoader_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33// Start of section namespace SILLY │ │ │ │ │ + 34namespace SILLY │ │ │ │ │ + 35{ │ │ │ │ │ + 36class DataSource; // Forward declaration │ │ │ │ │ + 37class ImageContext; // Forward declaration │ │ │ │ │ + 38 │ │ │ │ │ +46class SILLY_EXPORT ImageLoader │ │ │ │ │ 47{ │ │ │ │ │ - 48public: │ │ │ │ │ - 55 Image(DataSource& data); │ │ │ │ │ - 56 │ │ │ │ │ -61 ~Image(); │ │ │ │ │ - 62 │ │ │ │ │ -67 bool isValid() const; │ │ │ │ │ - 68 │ │ │ │ │ - 69 │ │ │ │ │ - 76 bool loadImageHeader(); │ │ │ │ │ - 77 │ │ │ │ │ - 91 bool loadImageData(PixelFormat resultFormat = PF_RGBA, PixelOrigin origin = │ │ │ │ │ -PO_TOP_LEFT); │ │ │ │ │ - 92 │ │ │ │ │ -97 size_t getWidth() const; │ │ │ │ │ - 98 │ │ │ │ │ -103 size_t getHeight() const; │ │ │ │ │ - 104 │ │ │ │ │ -109 PixelFormat getSourcePixelFormat() const; │ │ │ │ │ - 110 │ │ │ │ │ -115 PixelFormat getPixelFormat() const; │ │ │ │ │ - 116 │ │ │ │ │ -120 const byte* getPixelsDataPtr() const; │ │ │ │ │ -125 size_t getPixelsDataSize() const; │ │ │ │ │ -130 const char* getLoaderIdentifierString() const; │ │ │ │ │ - 131private: │ │ │ │ │ - 132 bool allocate(); │ │ │ │ │ - 133 │ │ │ │ │ - 134private: │ │ │ │ │ - 135 │ │ │ │ │ - 136 size_t d_bpp; │ │ │ │ │ - 137 PixelFormat d_pfSource; │ │ │ │ │ - 138 byte* d_pixels; │ │ │ │ │ - 139 DataSource* d_data; │ │ │ │ │ - 140 ImageContext* d_imageContext; │ │ │ │ │ - 141 ImageLoader* d_imageLoader; │ │ │ │ │ - 142 │ │ │ │ │ - 143 // Disabled operation │ │ │ │ │ - 144 Image(Image&); │ │ │ │ │ - 145 Image& operator=(Image&); │ │ │ │ │ - 146}; │ │ │ │ │ - 147 │ │ │ │ │ - 148} // End of section namespace SILLY │ │ │ │ │ - 149 │ │ │ │ │ - 150// Inclue inline function when needed │ │ │ │ │ - 151#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 152#include "SILLYImage.icpp" │ │ │ │ │ - 153#endif │ │ │ │ │ - 154 │ │ │ │ │ - 155#endif // end of guard _SILLYImage_h_ │ │ │ │ │ + 48protected: │ │ │ │ │ +52 ImageLoader(const char* name); │ │ │ │ │ + 53public: │ │ │ │ │ + 54 │ │ │ │ │ +59 virtual ~ImageLoader(); │ │ │ │ │ + 60 │ │ │ │ │ +71 virtual ImageContext* loadHeader(PixelFormat& formatSource, DataSource* │ │ │ │ │ +data) = 0; │ │ │ │ │ + 72 │ │ │ │ │ + 73 │ │ │ │ │ +86 virtual bool loadImageData(PixelOrigin origin, DataSource* data, │ │ │ │ │ +ImageContext* context) = 0; │ │ │ │ │ + 87 │ │ │ │ │ + 94 void destroyContext(ImageContext* context); │ │ │ │ │ + 95 │ │ │ │ │ +100 const char* getIdentifierString() const; │ │ │ │ │ + 101private: │ │ │ │ │ + 102 const char* d_name; │ │ │ │ │ + 103 │ │ │ │ │ + 104}; │ │ │ │ │ + 105 │ │ │ │ │ + 106} // End of section namespace SILLY │ │ │ │ │ + 107 │ │ │ │ │ + 108// Inclue inline function when needed │ │ │ │ │ + 109#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 110#include "SILLYImageLoader.icpp" │ │ │ │ │ + 111#endif │ │ │ │ │ + 112 │ │ │ │ │ + 113#endif // end of guard _SILLYImageLoader_h_ │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ SILLY::PixelFormat │ │ │ │ │ PixelFormat │ │ │ │ │ List all pixel format supported. │ │ │ │ │ Definition: SILLYBase.h:60 │ │ │ │ │ SILLY::PixelOrigin │ │ │ │ │ PixelOrigin │ │ │ │ │ List all pixel origin supported. │ │ │ │ │ Definition: SILLYBase.h:71 │ │ │ │ │ SILLY::DataSource │ │ │ │ │ This is an abstract class used to provide data to the loader. │ │ │ │ │ Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::Image │ │ │ │ │ -Image is the main user class of the library. │ │ │ │ │ -Definition: SILLYImage.h:47 │ │ │ │ │ -SILLY::Image::getSourcePixelFormat │ │ │ │ │ -PixelFormat getSourcePixelFormat() const │ │ │ │ │ -Retrieve the pixel format used for the image storage. │ │ │ │ │ -SILLY::Image::getLoaderIdentifierString │ │ │ │ │ -const char * getLoaderIdentifierString() const │ │ │ │ │ -Get Image loader identifier string. │ │ │ │ │ -SILLY::Image::getPixelsDataPtr │ │ │ │ │ -const byte * getPixelsDataPtr() const │ │ │ │ │ -Get a pointer to the pixels data. │ │ │ │ │ -SILLY::Image::isValid │ │ │ │ │ -bool isValid() const │ │ │ │ │ -Return true if the image is valid after its loading. │ │ │ │ │ -SILLY::Image::getPixelsDataSize │ │ │ │ │ -size_t getPixelsDataSize() const │ │ │ │ │ -Get the size of the pixel buffer. │ │ │ │ │ -SILLY::Image::~Image │ │ │ │ │ -~Image() │ │ │ │ │ -Destructor. │ │ │ │ │ -SILLY::Image::getWidth │ │ │ │ │ -size_t getWidth() const │ │ │ │ │ -Retrieve the width of the image. │ │ │ │ │ -SILLY::Image::getPixelFormat │ │ │ │ │ -PixelFormat getPixelFormat() const │ │ │ │ │ -Retrieve the pixel format of the resulting image. │ │ │ │ │ -SILLY::Image::getHeight │ │ │ │ │ -size_t getHeight() const │ │ │ │ │ -Retrieve the height of the image. │ │ │ │ │ SILLY::ImageContext │ │ │ │ │ Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ Definition: SILLYImageContext.h:44 │ │ │ │ │ SILLY::ImageLoader │ │ │ │ │ This is an abstract class that define the interface of all image loader. │ │ │ │ │ Definition: SILLYImageLoader.h:47 │ │ │ │ │ +SILLY::ImageLoader::ImageLoader │ │ │ │ │ +ImageLoader(const char *name) │ │ │ │ │ +Constructor. │ │ │ │ │ +SILLY::ImageLoader::loadHeader │ │ │ │ │ +virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource │ │ │ │ │ +*data)=0 │ │ │ │ │ +Parse the header of the image and fill the header struct. │ │ │ │ │ +SILLY::ImageLoader::loadImageData │ │ │ │ │ +virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext │ │ │ │ │ +*context)=0 │ │ │ │ │ +Parse the pixels data of the image and fill the header struct. │ │ │ │ │ +SILLY::ImageLoader::~ImageLoader │ │ │ │ │ +virtual ~ImageLoader() │ │ │ │ │ +Destructor. │ │ │ │ │ +SILLY::ImageLoader::getIdentifierString │ │ │ │ │ +const char * getIdentifierString() const │ │ │ │ │ +Return the name of the loader. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00101_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLY.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,64 +39,67 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageLoader.icpp
│ │ │ │ +
SILLY.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: ImageLoader.icpp
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline function definition for ImageLoader class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ -
34inline ImageLoader::ImageLoader(const char* name)
│ │ │ │ -
35 : d_name(name)
│ │ │ │ -
36{
│ │ │ │ -
37}
│ │ │ │ -
38inline ImageLoader::~ImageLoader()
│ │ │ │ -
39{
│ │ │ │ -
40}
│ │ │ │ -
41inline const char* ImageLoader::getIdentifierString() const
│ │ │ │ -
42{
│ │ │ │ -
43 return d_name;
│ │ │ │ -
44}
│ │ │ │ -
45
│ │ │ │ -
46} // End of section namespace SILLY
│ │ │ │ -
47
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLY.h
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Master include for the SILLY library
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLY_h_
│ │ │ │ +
31#define _SILLY_h_
│ │ │ │ +
109namespace SILLY
│ │ │ │ +
110{
│ │ │ │ +
111
│ │ │ │ +
112}
│ │ │ │ +
113
│ │ │ │ +
114
│ │ │ │ +
115
│ │ │ │ +
116
│ │ │ │ +
117#include "SILLYBase.h"
│ │ │ │ +
118#include "SILLYDataSource.h"
│ │ │ │ +
119#include "SILLYFileDataSource.h"
│ │ │ │ +
120#include "SILLYMemoryDataSource.h"
│ │ │ │ +
121#include "SILLYImageLoader.h"
│ │ │ │ +
122#include "SILLYImageContext.h"
│ │ │ │ +
123#include "SILLYImageLoaderManager.h"
│ │ │ │ +
124#include "SILLYImage.h"
│ │ │ │ +
125
│ │ │ │ +
126#endif // end of guard _SILLY_h_
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImageLoader.icpp │ │ │ │ │ +SILLY.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: ImageLoader.icpp │ │ │ │ │ + 2 filename: SILLY.h │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline function definition for ImageLoader class │ │ │ │ │ + 6 purpose: Master include for the SILLY library │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,28 +35,33 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ - 34inline ImageLoader::ImageLoader(const char* name) │ │ │ │ │ - 35 : d_name(name) │ │ │ │ │ - 36{ │ │ │ │ │ - 37} │ │ │ │ │ - 38inline ImageLoader::~ImageLoader() │ │ │ │ │ - 39{ │ │ │ │ │ - 40} │ │ │ │ │ - 41inline const char* ImageLoader::getIdentifierString() const │ │ │ │ │ - 42{ │ │ │ │ │ - 43 return d_name; │ │ │ │ │ - 44} │ │ │ │ │ - 45 │ │ │ │ │ - 46} // End of section namespace SILLY │ │ │ │ │ - 47 │ │ │ │ │ + 30#ifndef _SILLY_h_ │ │ │ │ │ + 31#define _SILLY_h_ │ │ │ │ │ + 109namespace SILLY │ │ │ │ │ + 110{ │ │ │ │ │ + 111 │ │ │ │ │ + 112} │ │ │ │ │ + 113 │ │ │ │ │ + 114 │ │ │ │ │ + 115 │ │ │ │ │ + 116 │ │ │ │ │ + 117#include "SILLYBase.h" │ │ │ │ │ + 118#include "SILLYDataSource.h" │ │ │ │ │ + 119#include "SILLYFileDataSource.h" │ │ │ │ │ + 120#include "SILLYMemoryDataSource.h" │ │ │ │ │ + 121#include "SILLYImageLoader.h" │ │ │ │ │ + 122#include "SILLYImageContext.h" │ │ │ │ │ + 123#include "SILLYImageLoaderManager.h" │ │ │ │ │ + 124#include "SILLYImage.h" │ │ │ │ │ + 125 │ │ │ │ │ + 126#endif // end of guard _SILLY_h_ │ │ │ │ │ +SILLY │ │ │ │ │ +Simple Image Loading LibrarY namespace. │ │ │ │ │ +Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00104_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYOptions.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,95 +39,56 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageLoader.h
│ │ │ │ +
SILLYOptions.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYImageLoader.h
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Abstract class for all image loader
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYImageLoader_h_
│ │ │ │ -
31#define _SILLYImageLoader_h_
│ │ │ │ -
32#include "SILLYBase.h"
│ │ │ │ -
33// Start of section namespace SILLY
│ │ │ │ -
34namespace SILLY
│ │ │ │ -
35{
│ │ │ │ -
36class DataSource; // Forward declaration
│ │ │ │ -
37class ImageContext; // Forward declaration
│ │ │ │ -
38
│ │ │ │ -
46class SILLY_EXPORT ImageLoader
│ │ │ │ -
47{
│ │ │ │ -
48protected:
│ │ │ │ -
52 ImageLoader(const char* name);
│ │ │ │ -
53public:
│ │ │ │ -
54
│ │ │ │ -
59 virtual ~ImageLoader();
│ │ │ │ -
60
│ │ │ │ -
71 virtual ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data) = 0;
│ │ │ │ -
72
│ │ │ │ -
73
│ │ │ │ -
86 virtual bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context) = 0;
│ │ │ │ -
87
│ │ │ │ -
94 void destroyContext(ImageContext* context);
│ │ │ │ -
95
│ │ │ │ -
100 const char* getIdentifierString() const;
│ │ │ │ -
101private:
│ │ │ │ -
102 const char* d_name;
│ │ │ │ -
103
│ │ │ │ -
104};
│ │ │ │ -
105
│ │ │ │ -
106} // End of section namespace SILLY
│ │ │ │ -
107
│ │ │ │ -
108// Inclue inline function when needed
│ │ │ │ -
109#ifdef SILLY_OPT_INLINE
│ │ │ │ -
110#include "SILLYImageLoader.icpp"
│ │ │ │ -
111#endif
│ │ │ │ -
112
│ │ │ │ -
113#endif // end of guard _SILLYImageLoader_h_
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
Store the data needed by an ImageLoader object during the parsing of an image.
│ │ │ │ -
This is an abstract class that define the interface of all image loader.
│ │ │ │ -
ImageLoader(const char *name)
Constructor.
│ │ │ │ -
virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)=0
Parse the header of the image and fill the header struct.
│ │ │ │ -
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
│ │ │ │ -
virtual ~ImageLoader()
Destructor.
│ │ │ │ -
const char * getIdentifierString() const
Return the name of the loader.
│ │ │ │ +
1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */
│ │ │ │ +
2/***********************************************************************
│ │ │ │ +
3 filename: SILLYOptions.h.in
│ │ │ │ +
4 created: 2006/06/10
│ │ │ │ +
5 author: Olivier Delannoy
│ │ │ │ +
6
│ │ │ │ +
7 purpose: Store options of the SILLY library
│ │ │ │ +
8*************************************************************************/
│ │ │ │ +
9/***************************************************************************
│ │ │ │ +
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
11 *
│ │ │ │ +
12 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
13 * a copy of this software and associated documentation files (the
│ │ │ │ +
14 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
15 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
16 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
17 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
18 * the following conditions:
│ │ │ │ +
19 *
│ │ │ │ +
20 * The above copyright notice and this permission notice shall be
│ │ │ │ +
21 * included in all copies or substantial portions of the Software.
│ │ │ │ +
22 *
│ │ │ │ +
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
29 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
30 ***************************************************************************/
│ │ │ │ +
31/* Defined to 1 if inline is enabled */
│ │ │ │ +
32#define SILLY_OPT_INLINE 1
│ │ │ │ +
33
│ │ │ │ +
34/* Defined to 1 if debug is enabled */
│ │ │ │ +
35/* #undef SILLY_OPT_DEBUG */
│ │ │ │ +
36
│ │ │ │ +
37/* Defined to 1 if profile is enabled */
│ │ │ │ +
38/* #undef SILLY_OPT_PROFILE */
│ │ │ │ +
39
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,118 +4,51 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImageLoader.h │ │ │ │ │ - 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYImageLoader.h │ │ │ │ │ - 3 created: 10 Jun 2006 │ │ │ │ │ - 4 author: Olivier Delannoy │ │ │ │ │ - 5 │ │ │ │ │ - 6 purpose: Abstract class for all image loader │ │ │ │ │ - 7*************************************************************************/ │ │ │ │ │ - 8/*************************************************************************** │ │ │ │ │ - 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ - 10 * │ │ │ │ │ - 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ - 12 * a copy of this software and associated documentation files (the │ │ │ │ │ - 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ - 14 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ - 15 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ - 16 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ - 17 * the following conditions: │ │ │ │ │ - 18 * │ │ │ │ │ - 19 * The above copyright notice and this permission notice shall be │ │ │ │ │ - 20 * included in all copies or substantial portions of the Software. │ │ │ │ │ - 21 * │ │ │ │ │ - 22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ - 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ - 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ - 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ - 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ - 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ - 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ - 29 │ │ │ │ │ +SILLYOptions.h │ │ │ │ │ + 1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */ │ │ │ │ │ + 2/*********************************************************************** │ │ │ │ │ + 3 filename: SILLYOptions.h.in │ │ │ │ │ + 4 created: 2006/06/10 │ │ │ │ │ + 5 author: Olivier Delannoy │ │ │ │ │ + 6 │ │ │ │ │ + 7 purpose: Store options of the SILLY library │ │ │ │ │ + 8*************************************************************************/ │ │ │ │ │ + 9/*************************************************************************** │ │ │ │ │ + 10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ + 11 * │ │ │ │ │ + 12 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ + 13 * a copy of this software and associated documentation files (the │ │ │ │ │ + 14 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ + 15 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ + 16 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ + 17 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ + 18 * the following conditions: │ │ │ │ │ + 19 * │ │ │ │ │ + 20 * The above copyright notice and this permission notice shall be │ │ │ │ │ + 21 * included in all copies or substantial portions of the Software. │ │ │ │ │ + 22 * │ │ │ │ │ + 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ + 24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ + 25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ + 26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ + 27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ + 28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ + 29 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ + 30 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYImageLoader_h_ │ │ │ │ │ - 31#define _SILLYImageLoader_h_ │ │ │ │ │ - 32#include "SILLYBase.h" │ │ │ │ │ - 33// Start of section namespace SILLY │ │ │ │ │ - 34namespace SILLY │ │ │ │ │ - 35{ │ │ │ │ │ - 36class DataSource; // Forward declaration │ │ │ │ │ - 37class ImageContext; // Forward declaration │ │ │ │ │ - 38 │ │ │ │ │ -46class SILLY_EXPORT ImageLoader │ │ │ │ │ - 47{ │ │ │ │ │ - 48protected: │ │ │ │ │ -52 ImageLoader(const char* name); │ │ │ │ │ - 53public: │ │ │ │ │ - 54 │ │ │ │ │ -59 virtual ~ImageLoader(); │ │ │ │ │ - 60 │ │ │ │ │ -71 virtual ImageContext* loadHeader(PixelFormat& formatSource, DataSource* │ │ │ │ │ -data) = 0; │ │ │ │ │ - 72 │ │ │ │ │ - 73 │ │ │ │ │ -86 virtual bool loadImageData(PixelOrigin origin, DataSource* data, │ │ │ │ │ -ImageContext* context) = 0; │ │ │ │ │ - 87 │ │ │ │ │ - 94 void destroyContext(ImageContext* context); │ │ │ │ │ - 95 │ │ │ │ │ -100 const char* getIdentifierString() const; │ │ │ │ │ - 101private: │ │ │ │ │ - 102 const char* d_name; │ │ │ │ │ - 103 │ │ │ │ │ - 104}; │ │ │ │ │ - 105 │ │ │ │ │ - 106} // End of section namespace SILLY │ │ │ │ │ - 107 │ │ │ │ │ - 108// Inclue inline function when needed │ │ │ │ │ - 109#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 110#include "SILLYImageLoader.icpp" │ │ │ │ │ - 111#endif │ │ │ │ │ - 112 │ │ │ │ │ - 113#endif // end of guard _SILLYImageLoader_h_ │ │ │ │ │ -SILLY │ │ │ │ │ -Simple Image Loading LibrarY namespace. │ │ │ │ │ -Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::PixelFormat │ │ │ │ │ -PixelFormat │ │ │ │ │ -List all pixel format supported. │ │ │ │ │ -Definition: SILLYBase.h:60 │ │ │ │ │ -SILLY::PixelOrigin │ │ │ │ │ -PixelOrigin │ │ │ │ │ -List all pixel origin supported. │ │ │ │ │ -Definition: SILLYBase.h:71 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::ImageContext │ │ │ │ │ -Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ │ -Definition: SILLYImageContext.h:44 │ │ │ │ │ -SILLY::ImageLoader │ │ │ │ │ -This is an abstract class that define the interface of all image loader. │ │ │ │ │ -Definition: SILLYImageLoader.h:47 │ │ │ │ │ -SILLY::ImageLoader::ImageLoader │ │ │ │ │ -ImageLoader(const char *name) │ │ │ │ │ -Constructor. │ │ │ │ │ -SILLY::ImageLoader::loadHeader │ │ │ │ │ -virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource │ │ │ │ │ -*data)=0 │ │ │ │ │ -Parse the header of the image and fill the header struct. │ │ │ │ │ -SILLY::ImageLoader::loadImageData │ │ │ │ │ -virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext │ │ │ │ │ -*context)=0 │ │ │ │ │ -Parse the pixels data of the image and fill the header struct. │ │ │ │ │ -SILLY::ImageLoader::~ImageLoader │ │ │ │ │ -virtual ~ImageLoader() │ │ │ │ │ -Destructor. │ │ │ │ │ -SILLY::ImageLoader::getIdentifierString │ │ │ │ │ -const char * getIdentifierString() const │ │ │ │ │ -Return the name of the loader. │ │ │ │ │ + 31/* Defined to 1 if inline is enabled */ │ │ │ │ │ + 32#define SILLY_OPT_INLINE 1 │ │ │ │ │ + 33 │ │ │ │ │ + 34/* Defined to 1 if debug is enabled */ │ │ │ │ │ + 35/* #undef SILLY_OPT_DEBUG */ │ │ │ │ │ + 36 │ │ │ │ │ + 37/* Defined to 1 if profile is enabled */ │ │ │ │ │ + 38/* #undef SILLY_OPT_PROFILE */ │ │ │ │ │ + 39 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00107_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLY.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLY.h
│ │ │ │ +
SILLYFileDataSource.h
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLY.h
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ +
2 filename: SILLYFileDataSource.h
│ │ │ │ +
3 created: 20 Jul 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Master include for the SILLY library
│ │ │ │ +
6 purpose: Provide file based image loading
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -71,35 +71,52 @@ │ │ │ │
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLY_h_
│ │ │ │ -
31#define _SILLY_h_
│ │ │ │ -
109namespace SILLY
│ │ │ │ -
110{
│ │ │ │ -
111
│ │ │ │ -
112}
│ │ │ │ -
113
│ │ │ │ -
114
│ │ │ │ -
115
│ │ │ │ -
116
│ │ │ │ -
117#include "SILLYBase.h"
│ │ │ │ -
118#include "SILLYDataSource.h"
│ │ │ │ -
119#include "SILLYFileDataSource.h"
│ │ │ │ -
120#include "SILLYMemoryDataSource.h"
│ │ │ │ -
121#include "SILLYImageLoader.h"
│ │ │ │ -
122#include "SILLYImageContext.h"
│ │ │ │ -
123#include "SILLYImageLoaderManager.h"
│ │ │ │ -
124#include "SILLYImage.h"
│ │ │ │ -
125
│ │ │ │ -
126#endif // end of guard _SILLY_h_
│ │ │ │ +
30#ifndef _SILLYFileDataSource_h_
│ │ │ │ +
31#define _SILLYFileDataSource_h_
│ │ │ │ +
32#include "SILLYBase.h"
│ │ │ │ +
33#include "SILLYDataSource.h"
│ │ │ │ +
34// Start of section namespace SILLY
│ │ │ │ +
35namespace SILLY
│ │ │ │ +
36{
│ │ │ │ +
37
│ │ │ │ +
48class SILLY_EXPORT FileDataSource : public DataSource
│ │ │ │ +
49{
│ │ │ │ +
50public:
│ │ │ │ +
60 FileDataSource(const char* filename);
│ │ │ │ + │ │ │ │ +
73 bool isValid() const;
│ │ │ │ +
74
│ │ │ │ +
75 const byte* getDataPtr() const;
│ │ │ │ +
76 size_t getSize() const;
│ │ │ │ +
77private:
│ │ │ │ +
78 bool d_error;
│ │ │ │ +
79 byte* d_bytes;
│ │ │ │ +
80 size_t d_size;
│ │ │ │ +
81};
│ │ │ │ +
82
│ │ │ │ +
83
│ │ │ │ +
84} // End of section namespace SILLY
│ │ │ │ +
85
│ │ │ │ +
86// Inclue inline function when needed
│ │ │ │ +
87#ifdef SILLY_OPT_INLINE
│ │ │ │ +
88#include "SILLYFileDataSource.icpp"
│ │ │ │ +
89#endif
│ │ │ │ +
90
│ │ │ │ +
91#endif // end of guard _SILLYFileDataSource_h_
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ +
This is an abstract class used to provide data to the loader.
│ │ │ │ +
This class allow the loading of an image directly from a file.
│ │ │ │ +
const byte * getDataPtr() const
Get raw access to the image data.
│ │ │ │ +
bool isValid() const
Check wether the loading is successfull or not.
│ │ │ │ +
size_t getSize() const
Return the size of the data.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLY.h │ │ │ │ │ +SILLYFileDataSource.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLY.h │ │ │ │ │ - 3 created: 10 Jun 2006 │ │ │ │ │ + 2 filename: SILLYFileDataSource.h │ │ │ │ │ + 3 created: 20 Jul 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Master include for the SILLY library │ │ │ │ │ + 6 purpose: Provide file based image loading │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,33 +35,60 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLY_h_ │ │ │ │ │ - 31#define _SILLY_h_ │ │ │ │ │ - 109namespace SILLY │ │ │ │ │ - 110{ │ │ │ │ │ - 111 │ │ │ │ │ - 112} │ │ │ │ │ - 113 │ │ │ │ │ - 114 │ │ │ │ │ - 115 │ │ │ │ │ - 116 │ │ │ │ │ - 117#include "SILLYBase.h" │ │ │ │ │ - 118#include "SILLYDataSource.h" │ │ │ │ │ - 119#include "SILLYFileDataSource.h" │ │ │ │ │ - 120#include "SILLYMemoryDataSource.h" │ │ │ │ │ - 121#include "SILLYImageLoader.h" │ │ │ │ │ - 122#include "SILLYImageContext.h" │ │ │ │ │ - 123#include "SILLYImageLoaderManager.h" │ │ │ │ │ - 124#include "SILLYImage.h" │ │ │ │ │ - 125 │ │ │ │ │ - 126#endif // end of guard _SILLY_h_ │ │ │ │ │ + 30#ifndef _SILLYFileDataSource_h_ │ │ │ │ │ + 31#define _SILLYFileDataSource_h_ │ │ │ │ │ + 32#include "SILLYBase.h" │ │ │ │ │ + 33#include "SILLYDataSource.h" │ │ │ │ │ + 34// Start of section namespace SILLY │ │ │ │ │ + 35namespace SILLY │ │ │ │ │ + 36{ │ │ │ │ │ + 37 │ │ │ │ │ +48class SILLY_EXPORT FileDataSource : public DataSource │ │ │ │ │ + 49{ │ │ │ │ │ + 50public: │ │ │ │ │ + 60 FileDataSource(const char* filename); │ │ │ │ │ + 64 ~FileDataSource(); │ │ │ │ │ +73 bool isValid() const; │ │ │ │ │ + 74 │ │ │ │ │ +75 const byte* getDataPtr() const; │ │ │ │ │ +76 size_t getSize() const; │ │ │ │ │ + 77private: │ │ │ │ │ + 78 bool d_error; │ │ │ │ │ + 79 byte* d_bytes; │ │ │ │ │ + 80 size_t d_size; │ │ │ │ │ + 81}; │ │ │ │ │ + 82 │ │ │ │ │ + 83 │ │ │ │ │ + 84} // End of section namespace SILLY │ │ │ │ │ + 85 │ │ │ │ │ + 86// Inclue inline function when needed │ │ │ │ │ + 87#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 88#include "SILLYFileDataSource.icpp" │ │ │ │ │ + 89#endif │ │ │ │ │ + 90 │ │ │ │ │ + 91#endif // end of guard _SILLYFileDataSource_h_ │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ +SILLY::DataSource │ │ │ │ │ +This is an abstract class used to provide data to the loader. │ │ │ │ │ +Definition: SILLYDataSource.h:47 │ │ │ │ │ +SILLY::FileDataSource │ │ │ │ │ +This class allow the loading of an image directly from a file. │ │ │ │ │ +Definition: SILLYFileDataSource.h:49 │ │ │ │ │ +SILLY::FileDataSource::getDataPtr │ │ │ │ │ +const byte * getDataPtr() const │ │ │ │ │ +Get raw access to the image data. │ │ │ │ │ +SILLY::FileDataSource::isValid │ │ │ │ │ +bool isValid() const │ │ │ │ │ +Check wether the loading is successfull or not. │ │ │ │ │ +SILLY::FileDataSource::getSize │ │ │ │ │ +size_t getSize() const │ │ │ │ │ +Return the size of the data. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00110_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYDataSource.h
│ │ │ │ +
SILLYImageLoaderManager.h
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYDataSource.h
│ │ │ │ +
2 filename: ImageLoaderManager.h
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: SILLY::DataSource declaration for the SILLY library
│ │ │ │ +
6 purpose: Manage all available loader
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -71,45 +71,78 @@ │ │ │ │
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYDataSource_h_
│ │ │ │ -
31#define _SILLYDataSource_h_
│ │ │ │ +
30#ifndef _SILLYImageLoaderManager_h_
│ │ │ │ +
31#define _SILLYImageLoaderManager_h_
│ │ │ │
32#include "SILLYBase.h"
│ │ │ │ -
33
│ │ │ │ +
33#include <vector>
│ │ │ │
34// Start of section namespace SILLY
│ │ │ │
35namespace SILLY
│ │ │ │
36{
│ │ │ │ -
37
│ │ │ │ -
46class SILLY_EXPORT DataSource
│ │ │ │ -
47{
│ │ │ │ -
48public:
│ │ │ │ -
53 virtual ~DataSource();
│ │ │ │ -
58 virtual const byte * getDataPtr() const = 0;
│ │ │ │ -
64 byte operator[] (size_t offset) const;
│ │ │ │ -
69 virtual size_t getSize() const = 0;
│ │ │ │ -
70};
│ │ │ │ -
71
│ │ │ │ -
72
│ │ │ │ -
73} // End of section namespace SILLY
│ │ │ │ -
74
│ │ │ │ -
75// Inclue inline function when needed
│ │ │ │ -
76#ifdef SILLY_OPT_INLINE
│ │ │ │ -
77#include "SILLYDataSource.icpp"
│ │ │ │ -
78#endif
│ │ │ │ -
79
│ │ │ │ -
80#endif // end of guard _SILLYDataSource_h_
│ │ │ │ +
37class ImageLoader; // Forward declaration
│ │ │ │ +
42typedef std::vector<ImageLoader*> ImageLoaderList;
│ │ │ │ +
43
│ │ │ │ +
44#if defined(_MSC_VER)
│ │ │ │ +
45
│ │ │ │ +
46# pragma warning(push)
│ │ │ │ +
47
│ │ │ │ +
48# pragma warning(disable : 4251)
│ │ │ │ +
49
│ │ │ │ +
50#endif
│ │ │ │ +
51
│ │ │ │ +
56class SILLY_EXPORT ImageLoaderManager
│ │ │ │ +
57{
│ │ │ │ +
58
│ │ │ │ +
59public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
74 ImageLoaderList::iterator begin();
│ │ │ │ +
79 ImageLoaderList::iterator end();
│ │ │ │ +
86 void add(ImageLoader* loader);
│ │ │ │ +
87
│ │ │ │ +
88private:
│ │ │ │ +
89 ImageLoaderList d_loaders;
│ │ │ │ +
90
│ │ │ │ +
91public:
│ │ │ │ +
92 static ImageLoaderManager* getSingletonPtr();
│ │ │ │ +
93 static ImageLoaderManager& getSingleton();
│ │ │ │ +
94
│ │ │ │ +
95private:
│ │ │ │ +
96 static ImageLoaderManager* d_instance;
│ │ │ │ +
97
│ │ │ │ +
98 // Disabled operations
│ │ │ │ + │ │ │ │ + │ │ │ │ +
101};
│ │ │ │ +
102
│ │ │ │ +
103#if defined(_MSC_VER)
│ │ │ │ +
104
│ │ │ │ +
105# pragma warning(pop)
│ │ │ │ +
106
│ │ │ │ +
107#endif
│ │ │ │ +
108
│ │ │ │ +
109} // End of section namespace SILLY
│ │ │ │ +
110
│ │ │ │ +
111// Inclue inline function when needed
│ │ │ │ +
112#ifdef SILLY_OPT_INLINE
│ │ │ │ +
113#include "SILLYImageLoaderManager.icpp"
│ │ │ │ +
114#endif
│ │ │ │ +
115
│ │ │ │ +
116#endif // end of guard _SILLYImageLoaderManager_h_
│ │ │ │
Simple Image Loading LibrarY namespace.
│ │ │ │ -
This is an abstract class used to provide data to the loader.
│ │ │ │ -
virtual size_t getSize() const =0
Return the size of the data.
│ │ │ │ -
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
│ │ │ │ -
virtual ~DataSource()
Destructor.
│ │ │ │ +
std::vector< ImageLoader * > ImageLoaderList
Typename for a collection of image loader.
│ │ │ │ +
This is an abstract class that define the interface of all image loader.
│ │ │ │ +
Manage the list of all supported ImageLoader.
│ │ │ │ +
void add(ImageLoader *loader)
Register an ImageLoader object.
│ │ │ │ +
ImageLoaderList::iterator begin()
Get an iterator to the first ImageLoader registered.
│ │ │ │ +
ImageLoaderList::iterator end()
Get an iterator to the first not registered ImageLoader.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYDataSource.h │ │ │ │ │ +SILLYImageLoaderManager.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYDataSource.h │ │ │ │ │ + 2 filename: ImageLoaderManager.h │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: SILLY::DataSource declaration for the SILLY library │ │ │ │ │ + 6 purpose: Manage all available loader │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,51 +35,89 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYDataSource_h_ │ │ │ │ │ - 31#define _SILLYDataSource_h_ │ │ │ │ │ + 30#ifndef _SILLYImageLoaderManager_h_ │ │ │ │ │ + 31#define _SILLYImageLoaderManager_h_ │ │ │ │ │ 32#include "SILLYBase.h" │ │ │ │ │ - 33 │ │ │ │ │ + 33#include │ │ │ │ │ 34// Start of section namespace SILLY │ │ │ │ │ 35namespace SILLY │ │ │ │ │ 36{ │ │ │ │ │ - 37 │ │ │ │ │ -46class SILLY_EXPORT DataSource │ │ │ │ │ - 47{ │ │ │ │ │ - 48public: │ │ │ │ │ -53 virtual ~DataSource(); │ │ │ │ │ -58 virtual const byte * getDataPtr() const = 0; │ │ │ │ │ -64 byte operator[] (size_t offset) const; │ │ │ │ │ -69 virtual size_t getSize() const = 0; │ │ │ │ │ - 70}; │ │ │ │ │ - 71 │ │ │ │ │ - 72 │ │ │ │ │ - 73} // End of section namespace SILLY │ │ │ │ │ - 74 │ │ │ │ │ - 75// Inclue inline function when needed │ │ │ │ │ - 76#ifdef SILLY_OPT_INLINE │ │ │ │ │ - 77#include "SILLYDataSource.icpp" │ │ │ │ │ - 78#endif │ │ │ │ │ - 79 │ │ │ │ │ - 80#endif // end of guard _SILLYDataSource_h_ │ │ │ │ │ + 37class ImageLoader; // Forward declaration │ │ │ │ │ +42typedef std::vector ImageLoaderList; │ │ │ │ │ + 43 │ │ │ │ │ + 44#if defined(_MSC_VER) │ │ │ │ │ + 45 │ │ │ │ │ + 46# pragma warning(push) │ │ │ │ │ + 47 │ │ │ │ │ + 48# pragma warning(disable : 4251) │ │ │ │ │ + 49 │ │ │ │ │ + 50#endif │ │ │ │ │ + 51 │ │ │ │ │ +56class SILLY_EXPORT ImageLoaderManager │ │ │ │ │ + 57{ │ │ │ │ │ + 58 │ │ │ │ │ + 59public: │ │ │ │ │ + 64 ImageLoaderManager(); │ │ │ │ │ + 69 ~ImageLoaderManager(); │ │ │ │ │ +74 ImageLoaderList::iterator begin(); │ │ │ │ │ +79 ImageLoaderList::iterator end(); │ │ │ │ │ +86 void add(ImageLoader* loader); │ │ │ │ │ + 87 │ │ │ │ │ + 88private: │ │ │ │ │ + 89 ImageLoaderList d_loaders; │ │ │ │ │ + 90 │ │ │ │ │ + 91public: │ │ │ │ │ + 92 static ImageLoaderManager* getSingletonPtr(); │ │ │ │ │ + 93 static ImageLoaderManager& getSingleton(); │ │ │ │ │ + 94 │ │ │ │ │ + 95private: │ │ │ │ │ + 96 static ImageLoaderManager* d_instance; │ │ │ │ │ + 97 │ │ │ │ │ + 98 // Disabled operations │ │ │ │ │ + 99 ImageLoaderManager(ImageLoaderManager&); │ │ │ │ │ + 100 ImageLoaderManager& operator=(ImageLoaderManager&); │ │ │ │ │ + 101}; │ │ │ │ │ + 102 │ │ │ │ │ + 103#if defined(_MSC_VER) │ │ │ │ │ + 104 │ │ │ │ │ + 105# pragma warning(pop) │ │ │ │ │ + 106 │ │ │ │ │ + 107#endif │ │ │ │ │ + 108 │ │ │ │ │ + 109} // End of section namespace SILLY │ │ │ │ │ + 110 │ │ │ │ │ + 111// Inclue inline function when needed │ │ │ │ │ + 112#ifdef SILLY_OPT_INLINE │ │ │ │ │ + 113#include "SILLYImageLoaderManager.icpp" │ │ │ │ │ + 114#endif │ │ │ │ │ + 115 │ │ │ │ │ + 116#endif // end of guard _SILLYImageLoaderManager_h_ │ │ │ │ │ SILLY │ │ │ │ │ Simple Image Loading LibrarY namespace. │ │ │ │ │ Definition: SILLYJPGImageContext.cpp:46 │ │ │ │ │ -SILLY::DataSource │ │ │ │ │ -This is an abstract class used to provide data to the loader. │ │ │ │ │ -Definition: SILLYDataSource.h:47 │ │ │ │ │ -SILLY::DataSource::getSize │ │ │ │ │ -virtual size_t getSize() const =0 │ │ │ │ │ -Return the size of the data. │ │ │ │ │ -SILLY::DataSource::getDataPtr │ │ │ │ │ -virtual const byte * getDataPtr() const =0 │ │ │ │ │ -Get raw access to the image data. │ │ │ │ │ -SILLY::DataSource::~DataSource │ │ │ │ │ -virtual ~DataSource() │ │ │ │ │ -Destructor. │ │ │ │ │ +SILLY::ImageLoaderList │ │ │ │ │ +std::vector< ImageLoader * > ImageLoaderList │ │ │ │ │ +Typename for a collection of image loader. │ │ │ │ │ +Definition: SILLYImageLoaderManager.h:42 │ │ │ │ │ +SILLY::ImageLoader │ │ │ │ │ +This is an abstract class that define the interface of all image loader. │ │ │ │ │ +Definition: SILLYImageLoader.h:47 │ │ │ │ │ +SILLY::ImageLoaderManager │ │ │ │ │ +Manage the list of all supported ImageLoader. │ │ │ │ │ +Definition: SILLYImageLoaderManager.h:57 │ │ │ │ │ +SILLY::ImageLoaderManager::add │ │ │ │ │ +void add(ImageLoader *loader) │ │ │ │ │ +Register an ImageLoader object. │ │ │ │ │ +SILLY::ImageLoaderManager::begin │ │ │ │ │ +ImageLoaderList::iterator begin() │ │ │ │ │ +Get an iterator to the first ImageLoader registered. │ │ │ │ │ +SILLY::ImageLoaderManager::end │ │ │ │ │ +ImageLoaderList::iterator end() │ │ │ │ │ +Get an iterator to the first not registered ImageLoader. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00113_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYMemoryDataSource.icpp
│ │ │ │ +
SILLYImage.icpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 Filename: SILLYMemoryDataSource.icpp
│ │ │ │ +
2 filename: SILLYImage.icpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Inline function definition for MemoryDataSource class
│ │ │ │ +
6 purpose: Inline definition of the image class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -76,26 +76,64 @@ │ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30
│ │ │ │
31// Start of section namespace SILLY
│ │ │ │
32namespace SILLY
│ │ │ │
33{
│ │ │ │
34
│ │ │ │ -
35inline const byte* MemoryDataSource::getDataPtr() const
│ │ │ │ +
35inline bool Image::isValid() const
│ │ │ │
36{
│ │ │ │ -
37 return d_bytes;
│ │ │ │ +
37 return d_imageContext && d_pixels;
│ │ │ │
38}
│ │ │ │
39
│ │ │ │ -
40inline size_t MemoryDataSource::getSize() const
│ │ │ │ +
40inline size_t Image::getWidth() const
│ │ │ │
41{
│ │ │ │ -
42 return d_size;
│ │ │ │ +
42 return d_imageContext->getWidth();
│ │ │ │
43}
│ │ │ │ -
44
│ │ │ │ -
45} // End of section namespace SILLY
│ │ │ │ -
46
│ │ │ │ +
44
│ │ │ │ +
45inline size_t Image::getHeight() const
│ │ │ │ +
46{
│ │ │ │ +
47 return d_imageContext->getHeight();
│ │ │ │ +
48}
│ │ │ │ +
49
│ │ │ │ +
50inline PixelFormat Image::getSourcePixelFormat() const
│ │ │ │ +
51{
│ │ │ │ +
52 return d_pfSource;
│ │ │ │ +
53}
│ │ │ │ +
54
│ │ │ │ +
55inline PixelFormat Image::getPixelFormat() const
│ │ │ │ +
56{
│ │ │ │ +
57 return d_imageContext->getPixelFormat();
│ │ │ │ +
58}
│ │ │ │ +
59
│ │ │ │ +
60inline const byte* Image::getPixelsDataPtr() const
│ │ │ │ +
61{
│ │ │ │ +
62 return d_pixels;
│ │ │ │ +
63}
│ │ │ │ +
64
│ │ │ │ +
65inline size_t Image::getPixelsDataSize() const
│ │ │ │ +
66{
│ │ │ │ +
67 return getWidth() * getHeight() * d_bpp;
│ │ │ │ +
68}
│ │ │ │ +
69
│ │ │ │ +
70inline Image::~Image()
│ │ │ │ +
71{
│ │ │ │ +
72 delete [] d_pixels;
│ │ │ │ +
73 if (d_imageLoader)
│ │ │ │ +
74 d_imageLoader->destroyContext(d_imageContext);
│ │ │ │ +
75}
│ │ │ │ +
76inline const char* Image::getLoaderIdentifierString() const
│ │ │ │ +
77{
│ │ │ │ +
78 if (d_imageLoader)
│ │ │ │ +
79 return d_imageLoader->getIdentifierString();
│ │ │ │ +
80 return 0;
│ │ │ │ +
81}
│ │ │ │ +
82
│ │ │ │ +
83} // End of section namespace SILLY
│ │ │ │ +
84
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYMemoryDataSource.icpp │ │ │ │ │ +SILLYImage.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 Filename: SILLYMemoryDataSource.icpp │ │ │ │ │ + 2 filename: SILLYImage.icpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline function definition for MemoryDataSource class │ │ │ │ │ + 6 purpose: Inline definition of the image class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -40,22 +40,60 @@ │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30 │ │ │ │ │ 31// Start of section namespace SILLY │ │ │ │ │ 32namespace SILLY │ │ │ │ │ 33{ │ │ │ │ │ 34 │ │ │ │ │ - 35inline const byte* MemoryDataSource::getDataPtr() const │ │ │ │ │ + 35inline bool Image::isValid() const │ │ │ │ │ 36{ │ │ │ │ │ - 37 return d_bytes; │ │ │ │ │ + 37 return d_imageContext && d_pixels; │ │ │ │ │ 38} │ │ │ │ │ 39 │ │ │ │ │ - 40inline size_t MemoryDataSource::getSize() const │ │ │ │ │ + 40inline size_t Image::getWidth() const │ │ │ │ │ 41{ │ │ │ │ │ - 42 return d_size; │ │ │ │ │ + 42 return d_imageContext->getWidth(); │ │ │ │ │ 43} │ │ │ │ │ 44 │ │ │ │ │ - 45} // End of section namespace SILLY │ │ │ │ │ - 46 │ │ │ │ │ + 45inline size_t Image::getHeight() const │ │ │ │ │ + 46{ │ │ │ │ │ + 47 return d_imageContext->getHeight(); │ │ │ │ │ + 48} │ │ │ │ │ + 49 │ │ │ │ │ + 50inline PixelFormat Image::getSourcePixelFormat() const │ │ │ │ │ + 51{ │ │ │ │ │ + 52 return d_pfSource; │ │ │ │ │ + 53} │ │ │ │ │ + 54 │ │ │ │ │ + 55inline PixelFormat Image::getPixelFormat() const │ │ │ │ │ + 56{ │ │ │ │ │ + 57 return d_imageContext->getPixelFormat(); │ │ │ │ │ + 58} │ │ │ │ │ + 59 │ │ │ │ │ + 60inline const byte* Image::getPixelsDataPtr() const │ │ │ │ │ + 61{ │ │ │ │ │ + 62 return d_pixels; │ │ │ │ │ + 63} │ │ │ │ │ + 64 │ │ │ │ │ + 65inline size_t Image::getPixelsDataSize() const │ │ │ │ │ + 66{ │ │ │ │ │ + 67 return getWidth() * getHeight() * d_bpp; │ │ │ │ │ + 68} │ │ │ │ │ + 69 │ │ │ │ │ + 70inline Image::~Image() │ │ │ │ │ + 71{ │ │ │ │ │ + 72 delete [] d_pixels; │ │ │ │ │ + 73 if (d_imageLoader) │ │ │ │ │ + 74 d_imageLoader->destroyContext(d_imageContext); │ │ │ │ │ + 75} │ │ │ │ │ + 76inline const char* Image::getLoaderIdentifierString() const │ │ │ │ │ + 77{ │ │ │ │ │ + 78 if (d_imageLoader) │ │ │ │ │ + 79 return d_imageLoader->getIdentifierString(); │ │ │ │ │ + 80 return 0; │ │ │ │ │ + 81} │ │ │ │ │ + 82 │ │ │ │ │ + 83} // End of section namespace SILLY │ │ │ │ │ + 84 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00116_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYOptions.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,56 +39,79 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYOptions.h
│ │ │ │ +
SILLYImageLoaderManager.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */
│ │ │ │ -
2/***********************************************************************
│ │ │ │ -
3 filename: SILLYOptions.h.in
│ │ │ │ -
4 created: 2006/06/10
│ │ │ │ -
5 author: Olivier Delannoy
│ │ │ │ -
6
│ │ │ │ -
7 purpose: Store options of the SILLY library
│ │ │ │ -
8*************************************************************************/
│ │ │ │ -
9/***************************************************************************
│ │ │ │ -
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
11 *
│ │ │ │ -
12 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
13 * a copy of this software and associated documentation files (the
│ │ │ │ -
14 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
15 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
16 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
17 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
18 * the following conditions:
│ │ │ │ -
19 *
│ │ │ │ -
20 * The above copyright notice and this permission notice shall be
│ │ │ │ -
21 * included in all copies or substantial portions of the Software.
│ │ │ │ -
22 *
│ │ │ │ -
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
29 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
30 ***************************************************************************/
│ │ │ │ -
31/* Defined to 1 if inline is enabled */
│ │ │ │ -
32#define SILLY_OPT_INLINE 1
│ │ │ │ -
33
│ │ │ │ -
34/* Defined to 1 if debug is enabled */
│ │ │ │ -
35/* #undef SILLY_OPT_DEBUG */
│ │ │ │ -
36
│ │ │ │ -
37/* Defined to 1 if profile is enabled */
│ │ │ │ -
38/* #undef SILLY_OPT_PROFILE */
│ │ │ │ -
39
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYImageLoaderManager.icpp
│ │ │ │ +
3 created: 10 Jun 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline definition for ImageLoaderManager class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34inline ImageLoaderList::iterator ImageLoaderManager::begin()
│ │ │ │ +
35{
│ │ │ │ +
36 return d_loaders.begin();
│ │ │ │ +
37}
│ │ │ │ +
38
│ │ │ │ +
39inline ImageLoaderList::iterator ImageLoaderManager::end()
│ │ │ │ +
40{
│ │ │ │ +
41 return d_loaders.end();
│ │ │ │ +
42}
│ │ │ │ +
43
│ │ │ │ +
44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr()
│ │ │ │ +
45{
│ │ │ │ +
46 return d_instance;
│ │ │ │ +
47}
│ │ │ │ +
48
│ │ │ │ +
49inline ImageLoaderManager& ImageLoaderManager::getSingleton()
│ │ │ │ +
50{
│ │ │ │ +
51 assert(d_instance && "ASSERT: Singleton object not yet created");
│ │ │ │ +
52 return *d_instance;
│ │ │ │ +
53}
│ │ │ │ +
54
│ │ │ │ +
55inline void ImageLoaderManager::add(ImageLoader* loader)
│ │ │ │ +
56{
│ │ │ │ +
57 assert(loader && "ASSERT: adding a none existing loader object");
│ │ │ │ +
58 d_loaders.push_back(loader);
│ │ │ │ +
59}
│ │ │ │ +
60
│ │ │ │ +
61} // End of section namespace SILLY
│ │ │ │ +
62
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,51 +4,74 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYOptions.h │ │ │ │ │ - 1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */ │ │ │ │ │ - 2/*********************************************************************** │ │ │ │ │ - 3 filename: SILLYOptions.h.in │ │ │ │ │ - 4 created: 2006/06/10 │ │ │ │ │ - 5 author: Olivier Delannoy │ │ │ │ │ - 6 │ │ │ │ │ - 7 purpose: Store options of the SILLY library │ │ │ │ │ - 8*************************************************************************/ │ │ │ │ │ - 9/*************************************************************************** │ │ │ │ │ - 10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ - 11 * │ │ │ │ │ - 12 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ - 13 * a copy of this software and associated documentation files (the │ │ │ │ │ - 14 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ - 15 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ - 16 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ - 17 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ - 18 * the following conditions: │ │ │ │ │ - 19 * │ │ │ │ │ - 20 * The above copyright notice and this permission notice shall be │ │ │ │ │ - 21 * included in all copies or substantial portions of the Software. │ │ │ │ │ - 22 * │ │ │ │ │ - 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ - 24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ - 25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ - 26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ - 27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ - 28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ - 29 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ - 30 │ │ │ │ │ +SILLYImageLoaderManager.icpp │ │ │ │ │ + 1/*********************************************************************** │ │ │ │ │ + 2 filename: SILLYImageLoaderManager.icpp │ │ │ │ │ + 3 created: 10 Jun 2006 │ │ │ │ │ + 4 author: Olivier Delannoy │ │ │ │ │ + 5 │ │ │ │ │ + 6 purpose: Inline definition for ImageLoaderManager class │ │ │ │ │ + 7*************************************************************************/ │ │ │ │ │ + 8/*************************************************************************** │ │ │ │ │ + 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ + 10 * │ │ │ │ │ + 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ + 12 * a copy of this software and associated documentation files (the │ │ │ │ │ + 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ + 14 * without limitation the rights to use, copy, modify, merge, publish, │ │ │ │ │ + 15 * distribute, sublicense, and/or sell copies of the Software, and to │ │ │ │ │ + 16 * permit persons to whom the Software is furnished to do so, subject to │ │ │ │ │ + 17 * the following conditions: │ │ │ │ │ + 18 * │ │ │ │ │ + 19 * The above copyright notice and this permission notice shall be │ │ │ │ │ + 20 * included in all copies or substantial portions of the Software. │ │ │ │ │ + 21 * │ │ │ │ │ + 22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, │ │ │ │ │ + 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF │ │ │ │ │ + 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ + 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ + 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ + 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ + 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ + 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 31/* Defined to 1 if inline is enabled */ │ │ │ │ │ - 32#define SILLY_OPT_INLINE 1 │ │ │ │ │ - 33 │ │ │ │ │ - 34/* Defined to 1 if debug is enabled */ │ │ │ │ │ - 35/* #undef SILLY_OPT_DEBUG */ │ │ │ │ │ - 36 │ │ │ │ │ - 37/* Defined to 1 if profile is enabled */ │ │ │ │ │ - 38/* #undef SILLY_OPT_PROFILE */ │ │ │ │ │ - 39 │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34inline ImageLoaderList::iterator ImageLoaderManager::begin() │ │ │ │ │ + 35{ │ │ │ │ │ + 36 return d_loaders.begin(); │ │ │ │ │ + 37} │ │ │ │ │ + 38 │ │ │ │ │ + 39inline ImageLoaderList::iterator ImageLoaderManager::end() │ │ │ │ │ + 40{ │ │ │ │ │ + 41 return d_loaders.end(); │ │ │ │ │ + 42} │ │ │ │ │ + 43 │ │ │ │ │ + 44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr() │ │ │ │ │ + 45{ │ │ │ │ │ + 46 return d_instance; │ │ │ │ │ + 47} │ │ │ │ │ + 48 │ │ │ │ │ + 49inline ImageLoaderManager& ImageLoaderManager::getSingleton() │ │ │ │ │ + 50{ │ │ │ │ │ + 51 assert(d_instance && "ASSERT: Singleton object not yet created"); │ │ │ │ │ + 52 return *d_instance; │ │ │ │ │ + 53} │ │ │ │ │ + 54 │ │ │ │ │ + 55inline void ImageLoaderManager::add(ImageLoader* loader) │ │ │ │ │ + 56{ │ │ │ │ │ + 57 assert(loader && "ASSERT: adding a none existing loader object"); │ │ │ │ │ + 58 d_loaders.push_back(loader); │ │ │ │ │ + 59} │ │ │ │ │ + 60 │ │ │ │ │ + 61} // End of section namespace SILLY │ │ │ │ │ + 62 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00119_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYBase.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,101 +39,99 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImage.icpp
│ │ │ │ +
SILLYBase.h
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYImage.icpp
│ │ │ │ -
3 created: 10 Jun 2006
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Inline definition of the image class
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30
│ │ │ │ -
31// Start of section namespace SILLY
│ │ │ │ -
32namespace SILLY
│ │ │ │ -
33{
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYBase.h
│ │ │ │ +
3 created: 2006/06/10
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Common header for the SILLY library
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30#ifndef _SILLYBase_h_
│ │ │ │ +
31#define _SILLYBase_h_
│ │ │ │ +
32#include <cassert>
│ │ │ │ +
33#include <cstddef>
│ │ │ │
34
│ │ │ │ -
35inline bool Image::isValid() const
│ │ │ │ -
36{
│ │ │ │ -
37 return d_imageContext && d_pixels;
│ │ │ │ -
38}
│ │ │ │ -
39
│ │ │ │ -
40inline size_t Image::getWidth() const
│ │ │ │ -
41{
│ │ │ │ -
42 return d_imageContext->getWidth();
│ │ │ │ -
43}
│ │ │ │ -
44
│ │ │ │ -
45inline size_t Image::getHeight() const
│ │ │ │ -
46{
│ │ │ │ -
47 return d_imageContext->getHeight();
│ │ │ │ -
48}
│ │ │ │ -
49
│ │ │ │ -
50inline PixelFormat Image::getSourcePixelFormat() const
│ │ │ │ -
51{
│ │ │ │ -
52 return d_pfSource;
│ │ │ │ -
53}
│ │ │ │ +
35#if defined(USE_SILLYOPTIONS_H)
│ │ │ │ +
36#include "SILLYOptions.h"
│ │ │ │ +
37#endif
│ │ │ │ +
38
│ │ │ │ +
39#if defined(_WIN32) || defined(__WIN32__)
│ │ │ │ +
40# undef SILLY_OPT_INLINE // No inlining
│ │ │ │ +
41# undef SILLY_BE // Little Endian
│ │ │ │ +
42# ifdef SILLY_EXPORTS
│ │ │ │ +
43# define SILLY_EXPORT __declspec(dllexport)
│ │ │ │ +
44# else
│ │ │ │ +
45# define SILLY_EXPORT __declspec(dllimport)
│ │ │ │ +
46# endif
│ │ │ │ +
47#else
│ │ │ │ +
48# define SILLY_EXPORT
│ │ │ │ +
49#endif
│ │ │ │ +
50
│ │ │ │ +
51// Start of section namespace SILLY
│ │ │ │ +
52namespace SILLY
│ │ │ │ +
53{
│ │ │ │
54
│ │ │ │ -
55inline PixelFormat Image::getPixelFormat() const
│ │ │ │ -
56{
│ │ │ │ -
57 return d_imageContext->getPixelFormat();
│ │ │ │ -
58}
│ │ │ │ -
59
│ │ │ │ -
60inline const byte* Image::getPixelsDataPtr() const
│ │ │ │ -
61{
│ │ │ │ -
62 return d_pixels;
│ │ │ │ -
63}
│ │ │ │ -
64
│ │ │ │ -
65inline size_t Image::getPixelsDataSize() const
│ │ │ │ -
66{
│ │ │ │ -
67 return getWidth() * getHeight() * d_bpp;
│ │ │ │ -
68}
│ │ │ │ -
69
│ │ │ │ -
70inline Image::~Image()
│ │ │ │ + │ │ │ │ +
60{
│ │ │ │ +
61 PF_A1B5G5R5, //<! 16 bits, pixel format is A1R5G5B5 (GGGBBBBB,ARRRRRGG on disk)
│ │ │ │ +
62 PF_RGB, //<! 24 bits, pixel format is 8 bits for R, G, B
│ │ │ │ +
63 PF_RGBA, //<! 32 bits, pixel format is 8 bits for R, G, B and A channel
│ │ │ │ +
64 PF_ORIGIN, //<! This format is used when the input storage use a specific pixel format
│ │ │ │ +
65};
│ │ │ │ + │ │ │ │
71{
│ │ │ │ -
72 delete [] d_pixels;
│ │ │ │ -
73 if (d_imageLoader)
│ │ │ │ -
74 d_imageLoader->destroyContext(d_imageContext);
│ │ │ │ -
75}
│ │ │ │ -
76inline const char* Image::getLoaderIdentifierString() const
│ │ │ │ -
77{
│ │ │ │ -
78 if (d_imageLoader)
│ │ │ │ -
79 return d_imageLoader->getIdentifierString();
│ │ │ │ -
80 return 0;
│ │ │ │ -
81}
│ │ │ │ -
82
│ │ │ │ -
83} // End of section namespace SILLY
│ │ │ │ -
84
│ │ │ │ +
72 PO_TOP_LEFT, //<! The resulting image origine is Top Left
│ │ │ │ +
73 PO_BOTTOM_LEFT, //<! The resulting image origine is Bottom Left
│ │ │ │ +
74};
│ │ │ │ +
75
│ │ │ │ +
80typedef unsigned char byte;
│ │ │ │ +
88bool SILLY_EXPORT SILLYInit();
│ │ │ │ +
89
│ │ │ │ +
94void SILLY_EXPORT SILLYCleanup();
│ │ │ │ +
95
│ │ │ │ +
96} // End of section namespace SILLY
│ │ │ │ +
97
│ │ │ │ +
98#endif // end of guard _SILLYBase_h_
│ │ │ │ +
99
│ │ │ │ +
Simple Image Loading LibrarY namespace.
│ │ │ │ +
unsigned char byte
Typename for a byte.
Definition: SILLYBase.h:80
│ │ │ │ +
void SILLYCleanup()
Cleanup SILLY library internal.
│ │ │ │ +
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ +
bool SILLYInit()
Initialize the SILLY Library.
│ │ │ │ +
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImage.icpp │ │ │ │ │ +SILLYBase.h │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYImage.icpp │ │ │ │ │ - 3 created: 10 Jun 2006 │ │ │ │ │ + 2 filename: SILLYBase.h │ │ │ │ │ + 3 created: 2006/06/10 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition of the image class │ │ │ │ │ + 6 purpose: Common header for the SILLY library │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,65 +35,82 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30 │ │ │ │ │ - 31// Start of section namespace SILLY │ │ │ │ │ - 32namespace SILLY │ │ │ │ │ - 33{ │ │ │ │ │ + 30#ifndef _SILLYBase_h_ │ │ │ │ │ + 31#define _SILLYBase_h_ │ │ │ │ │ + 32#include │ │ │ │ │ + 33#include │ │ │ │ │ 34 │ │ │ │ │ - 35inline bool Image::isValid() const │ │ │ │ │ - 36{ │ │ │ │ │ - 37 return d_imageContext && d_pixels; │ │ │ │ │ - 38} │ │ │ │ │ - 39 │ │ │ │ │ - 40inline size_t Image::getWidth() const │ │ │ │ │ - 41{ │ │ │ │ │ - 42 return d_imageContext->getWidth(); │ │ │ │ │ - 43} │ │ │ │ │ - 44 │ │ │ │ │ - 45inline size_t Image::getHeight() const │ │ │ │ │ - 46{ │ │ │ │ │ - 47 return d_imageContext->getHeight(); │ │ │ │ │ - 48} │ │ │ │ │ - 49 │ │ │ │ │ - 50inline PixelFormat Image::getSourcePixelFormat() const │ │ │ │ │ - 51{ │ │ │ │ │ - 52 return d_pfSource; │ │ │ │ │ - 53} │ │ │ │ │ + 35#if defined(USE_SILLYOPTIONS_H) │ │ │ │ │ + 36#include "SILLYOptions.h" │ │ │ │ │ + 37#endif │ │ │ │ │ + 38 │ │ │ │ │ + 39#if defined(_WIN32) || defined(__WIN32__) │ │ │ │ │ + 40# undef SILLY_OPT_INLINE // No inlining │ │ │ │ │ + 41# undef SILLY_BE // Little Endian │ │ │ │ │ + 42# ifdef SILLY_EXPORTS │ │ │ │ │ + 43# define SILLY_EXPORT __declspec(dllexport) │ │ │ │ │ + 44# else │ │ │ │ │ + 45# define SILLY_EXPORT __declspec(dllimport) │ │ │ │ │ + 46# endif │ │ │ │ │ + 47#else │ │ │ │ │ + 48# define SILLY_EXPORT │ │ │ │ │ + 49#endif │ │ │ │ │ + 50 │ │ │ │ │ + 51// Start of section namespace SILLY │ │ │ │ │ + 52namespace SILLY │ │ │ │ │ + 53{ │ │ │ │ │ 54 │ │ │ │ │ - 55inline PixelFormat Image::getPixelFormat() const │ │ │ │ │ - 56{ │ │ │ │ │ - 57 return d_imageContext->getPixelFormat(); │ │ │ │ │ - 58} │ │ │ │ │ - 59 │ │ │ │ │ - 60inline const byte* Image::getPixelsDataPtr() const │ │ │ │ │ - 61{ │ │ │ │ │ - 62 return d_pixels; │ │ │ │ │ - 63} │ │ │ │ │ - 64 │ │ │ │ │ - 65inline size_t Image::getPixelsDataSize() const │ │ │ │ │ - 66{ │ │ │ │ │ - 67 return getWidth() * getHeight() * d_bpp; │ │ │ │ │ - 68} │ │ │ │ │ - 69 │ │ │ │ │ - 70inline Image::~Image() │ │ │ │ │ +59enum PixelFormat │ │ │ │ │ + 60{ │ │ │ │ │ + 61 PF_A1B5G5R5, //destroyContext(d_imageContext); │ │ │ │ │ - 75} │ │ │ │ │ - 76inline const char* Image::getLoaderIdentifierString() const │ │ │ │ │ - 77{ │ │ │ │ │ - 78 if (d_imageLoader) │ │ │ │ │ - 79 return d_imageLoader->getIdentifierString(); │ │ │ │ │ - 80 return 0; │ │ │ │ │ - 81} │ │ │ │ │ - 82 │ │ │ │ │ - 83} // End of section namespace SILLY │ │ │ │ │ - 84 │ │ │ │ │ + 72 PO_TOP_LEFT, // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.icpp Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYImageLoaderManager.icpp
│ │ │ │ +
SILLYImageLoader.icpp
│ │ │ │
│ │ │ │
│ │ │ │
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYImageLoaderManager.icpp
│ │ │ │ +
2 filename: ImageLoader.icpp
│ │ │ │
3 created: 10 Jun 2006
│ │ │ │
4 author: Olivier Delannoy
│ │ │ │
5
│ │ │ │ -
6 purpose: Inline definition for ImageLoaderManager class
│ │ │ │ +
6 purpose: Inline function definition for ImageLoader class
│ │ │ │
7*************************************************************************/
│ │ │ │
8/***************************************************************************
│ │ │ │
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │
10 *
│ │ │ │
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │
12 * a copy of this software and associated documentation files (the
│ │ │ │
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ @@ -75,43 +75,28 @@ │ │ │ │
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │
29 ***************************************************************************/
│ │ │ │
30
│ │ │ │
31// Start of section namespace SILLY
│ │ │ │
32namespace SILLY
│ │ │ │
33{
│ │ │ │ -
34inline ImageLoaderList::iterator ImageLoaderManager::begin()
│ │ │ │ -
35{
│ │ │ │ -
36 return d_loaders.begin();
│ │ │ │ +
34inline ImageLoader::ImageLoader(const char* name)
│ │ │ │ +
35 : d_name(name)
│ │ │ │ +
36{
│ │ │ │
37}
│ │ │ │ -
38
│ │ │ │ -
39inline ImageLoaderList::iterator ImageLoaderManager::end()
│ │ │ │ -
40{
│ │ │ │ -
41 return d_loaders.end();
│ │ │ │ -
42}
│ │ │ │ -
43
│ │ │ │ -
44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr()
│ │ │ │ -
45{
│ │ │ │ -
46 return d_instance;
│ │ │ │ -
47}
│ │ │ │ -
48
│ │ │ │ -
49inline ImageLoaderManager& ImageLoaderManager::getSingleton()
│ │ │ │ -
50{
│ │ │ │ -
51 assert(d_instance && "ASSERT: Singleton object not yet created");
│ │ │ │ -
52 return *d_instance;
│ │ │ │ -
53}
│ │ │ │ -
54
│ │ │ │ -
55inline void ImageLoaderManager::add(ImageLoader* loader)
│ │ │ │ -
56{
│ │ │ │ -
57 assert(loader && "ASSERT: adding a none existing loader object");
│ │ │ │ -
58 d_loaders.push_back(loader);
│ │ │ │ -
59}
│ │ │ │ -
60
│ │ │ │ -
61} // End of section namespace SILLY
│ │ │ │ -
62
│ │ │ │ +
38inline ImageLoader::~ImageLoader()
│ │ │ │ +
39{
│ │ │ │ +
40}
│ │ │ │ +
41inline const char* ImageLoader::getIdentifierString() const
│ │ │ │ +
42{
│ │ │ │ +
43 return d_name;
│ │ │ │ +
44}
│ │ │ │ +
45
│ │ │ │ +
46} // End of section namespace SILLY
│ │ │ │ +
47
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYImageLoaderManager.icpp │ │ │ │ │ +SILLYImageLoader.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYImageLoaderManager.icpp │ │ │ │ │ + 2 filename: ImageLoader.icpp │ │ │ │ │ 3 created: 10 Jun 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Inline definition for ImageLoaderManager class │ │ │ │ │ + 6 purpose: Inline function definition for ImageLoader class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -39,39 +39,24 @@ │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ 30 │ │ │ │ │ 31// Start of section namespace SILLY │ │ │ │ │ 32namespace SILLY │ │ │ │ │ 33{ │ │ │ │ │ - 34inline ImageLoaderList::iterator ImageLoaderManager::begin() │ │ │ │ │ - 35{ │ │ │ │ │ - 36 return d_loaders.begin(); │ │ │ │ │ + 34inline ImageLoader::ImageLoader(const char* name) │ │ │ │ │ + 35 : d_name(name) │ │ │ │ │ + 36{ │ │ │ │ │ 37} │ │ │ │ │ - 38 │ │ │ │ │ - 39inline ImageLoaderList::iterator ImageLoaderManager::end() │ │ │ │ │ - 40{ │ │ │ │ │ - 41 return d_loaders.end(); │ │ │ │ │ - 42} │ │ │ │ │ - 43 │ │ │ │ │ - 44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr() │ │ │ │ │ - 45{ │ │ │ │ │ - 46 return d_instance; │ │ │ │ │ - 47} │ │ │ │ │ - 48 │ │ │ │ │ - 49inline ImageLoaderManager& ImageLoaderManager::getSingleton() │ │ │ │ │ - 50{ │ │ │ │ │ - 51 assert(d_instance && "ASSERT: Singleton object not yet created"); │ │ │ │ │ - 52 return *d_instance; │ │ │ │ │ - 53} │ │ │ │ │ - 54 │ │ │ │ │ - 55inline void ImageLoaderManager::add(ImageLoader* loader) │ │ │ │ │ - 56{ │ │ │ │ │ - 57 assert(loader && "ASSERT: adding a none existing loader object"); │ │ │ │ │ - 58 d_loaders.push_back(loader); │ │ │ │ │ - 59} │ │ │ │ │ - 60 │ │ │ │ │ - 61} // End of section namespace SILLY │ │ │ │ │ - 62 │ │ │ │ │ + 38inline ImageLoader::~ImageLoader() │ │ │ │ │ + 39{ │ │ │ │ │ + 40} │ │ │ │ │ + 41inline const char* ImageLoader::getIdentifierString() const │ │ │ │ │ + 42{ │ │ │ │ │ + 43 return d_name; │ │ │ │ │ + 44} │ │ │ │ │ + 45 │ │ │ │ │ + 46} // End of section namespace SILLY │ │ │ │ │ + 47 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.4 │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00125_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYBase.h Source File │ │ │ │ +Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.icpp Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -39,99 +39,67 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
SILLYBase.h
│ │ │ │ +
SILLYFileDataSource.icpp
│ │ │ │
│ │ │ │
│ │ │ │ -
1/***********************************************************************
│ │ │ │ -
2 filename: SILLYBase.h
│ │ │ │ -
3 created: 2006/06/10
│ │ │ │ -
4 author: Olivier Delannoy
│ │ │ │ -
5
│ │ │ │ -
6 purpose: Common header for the SILLY library
│ │ │ │ -
7*************************************************************************/
│ │ │ │ -
8/***************************************************************************
│ │ │ │ -
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ -
10 *
│ │ │ │ -
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ -
12 * a copy of this software and associated documentation files (the
│ │ │ │ -
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ -
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ -
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ -
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ -
17 * the following conditions:
│ │ │ │ -
18 *
│ │ │ │ -
19 * The above copyright notice and this permission notice shall be
│ │ │ │ -
20 * included in all copies or substantial portions of the Software.
│ │ │ │ -
21 *
│ │ │ │ -
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ -
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ -
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ -
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ -
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ -
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ -
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ -
29 ***************************************************************************/
│ │ │ │ -
30#ifndef _SILLYBase_h_
│ │ │ │ -
31#define _SILLYBase_h_
│ │ │ │ -
32#include <cassert>
│ │ │ │ -
33#include <cstddef>
│ │ │ │ -
34
│ │ │ │ -
35#if defined(USE_SILLYOPTIONS_H)
│ │ │ │ -
36#include "SILLYOptions.h"
│ │ │ │ -
37#endif
│ │ │ │ +
1/***********************************************************************
│ │ │ │ +
2 filename: SILLYFileDataSource.icpp
│ │ │ │ +
3 created: 20 Jul 2006
│ │ │ │ +
4 author: Olivier Delannoy
│ │ │ │ +
5
│ │ │ │ +
6 purpose: Inline function definition for the FileDataSource class
│ │ │ │ +
7*************************************************************************/
│ │ │ │ +
8/***************************************************************************
│ │ │ │ +
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
│ │ │ │ +
10 *
│ │ │ │ +
11 * Permission is hereby granted, free of charge, to any person obtaining
│ │ │ │ +
12 * a copy of this software and associated documentation files (the
│ │ │ │ +
13 * "Software"), to deal in the Software without restriction, including
│ │ │ │ +
14 * without limitation the rights to use, copy, modify, merge, publish,
│ │ │ │ +
15 * distribute, sublicense, and/or sell copies of the Software, and to
│ │ │ │ +
16 * permit persons to whom the Software is furnished to do so, subject to
│ │ │ │ +
17 * the following conditions:
│ │ │ │ +
18 *
│ │ │ │ +
19 * The above copyright notice and this permission notice shall be
│ │ │ │ +
20 * included in all copies or substantial portions of the Software.
│ │ │ │ +
21 *
│ │ │ │ +
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
│ │ │ │ +
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
│ │ │ │ +
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
│ │ │ │ +
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
│ │ │ │ +
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
│ │ │ │ +
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
│ │ │ │ +
28 * OTHER DEALINGS IN THE SOFTWARE.
│ │ │ │ +
29 ***************************************************************************/
│ │ │ │ +
30
│ │ │ │ +
31// Start of section namespace SILLY
│ │ │ │ +
32namespace SILLY
│ │ │ │ +
33{
│ │ │ │ +
34inline bool FileDataSource::isValid() const
│ │ │ │ +
35{
│ │ │ │ +
36 return d_error;
│ │ │ │ +
37}
│ │ │ │
38
│ │ │ │ -
39#if defined(_WIN32) || defined(__WIN32__)
│ │ │ │ -
40# undef SILLY_OPT_INLINE // No inlining
│ │ │ │ -
41# undef SILLY_BE // Little Endian
│ │ │ │ -
42# ifdef SILLY_EXPORTS
│ │ │ │ -
43# define SILLY_EXPORT __declspec(dllexport)
│ │ │ │ -
44# else
│ │ │ │ -
45# define SILLY_EXPORT __declspec(dllimport)
│ │ │ │ -
46# endif
│ │ │ │ -
47#else
│ │ │ │ -
48# define SILLY_EXPORT
│ │ │ │ -
49#endif
│ │ │ │ +
39inline const byte* FileDataSource::getDataPtr() const
│ │ │ │ +
40{
│ │ │ │ +
41 return d_bytes;
│ │ │ │ +
42}
│ │ │ │ +
43
│ │ │ │ +
44inline size_t FileDataSource::getSize() const
│ │ │ │ +
45{
│ │ │ │ +
46 return d_size;
│ │ │ │ +
47}
│ │ │ │ +
48
│ │ │ │ +
49} // End of section namespace SILLY
│ │ │ │
50
│ │ │ │ -
51// Start of section namespace SILLY
│ │ │ │ -
52namespace SILLY
│ │ │ │ -
53{
│ │ │ │ -
54
│ │ │ │ - │ │ │ │ -
60{
│ │ │ │ -
61 PF_A1B5G5R5, //<! 16 bits, pixel format is A1R5G5B5 (GGGBBBBB,ARRRRRGG on disk)
│ │ │ │ -
62 PF_RGB, //<! 24 bits, pixel format is 8 bits for R, G, B
│ │ │ │ -
63 PF_RGBA, //<! 32 bits, pixel format is 8 bits for R, G, B and A channel
│ │ │ │ -
64 PF_ORIGIN, //<! This format is used when the input storage use a specific pixel format
│ │ │ │ -
65};
│ │ │ │ - │ │ │ │ -
71{
│ │ │ │ -
72 PO_TOP_LEFT, //<! The resulting image origine is Top Left
│ │ │ │ -
73 PO_BOTTOM_LEFT, //<! The resulting image origine is Bottom Left
│ │ │ │ -
74};
│ │ │ │ -
75
│ │ │ │ -
80typedef unsigned char byte;
│ │ │ │ -
88bool SILLY_EXPORT SILLYInit();
│ │ │ │ -
89
│ │ │ │ -
94void SILLY_EXPORT SILLYCleanup();
│ │ │ │ -
95
│ │ │ │ -
96} // End of section namespace SILLY
│ │ │ │ -
97
│ │ │ │ -
98#endif // end of guard _SILLYBase_h_
│ │ │ │ -
99
│ │ │ │ -
Simple Image Loading LibrarY namespace.
│ │ │ │ -
unsigned char byte
Typename for a byte.
Definition: SILLYBase.h:80
│ │ │ │ -
void SILLYCleanup()
Cleanup SILLY library internal.
│ │ │ │ -
PixelFormat
List all pixel format supported.
Definition: SILLYBase.h:60
│ │ │ │ -
bool SILLYInit()
Initialize the SILLY Library.
│ │ │ │ -
PixelOrigin
List all pixel origin supported.
Definition: SILLYBase.h:71
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,21 @@ │ │ │ │ │ │ │ │ │ │ Simple Image Loading LibrarY 0.1.0 │ │ │ │ │ │ │ │ │ │ * build │ │ │ │ │ * reproducible-path │ │ │ │ │ * silly-0.1.0 │ │ │ │ │ * include │ │ │ │ │ -SILLYBase.h │ │ │ │ │ +SILLYFileDataSource.icpp │ │ │ │ │ 1/*********************************************************************** │ │ │ │ │ - 2 filename: SILLYBase.h │ │ │ │ │ - 3 created: 2006/06/10 │ │ │ │ │ + 2 filename: SILLYFileDataSource.icpp │ │ │ │ │ + 3 created: 20 Jul 2006 │ │ │ │ │ 4 author: Olivier Delannoy │ │ │ │ │ 5 │ │ │ │ │ - 6 purpose: Common header for the SILLY library │ │ │ │ │ + 6 purpose: Inline function definition for the FileDataSource class │ │ │ │ │ 7*************************************************************************/ │ │ │ │ │ 8/*************************************************************************** │ │ │ │ │ 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team │ │ │ │ │ 10 * │ │ │ │ │ 11 * Permission is hereby granted, free of charge, to any person obtaining │ │ │ │ │ 12 * a copy of this software and associated documentation files (the │ │ │ │ │ 13 * "Software"), to deal in the Software without restriction, including │ │ │ │ │ @@ -35,82 +35,31 @@ │ │ │ │ │ 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. │ │ │ │ │ 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR │ │ │ │ │ 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ │ │ │ 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR │ │ │ │ │ 28 * OTHER DEALINGS IN THE SOFTWARE. │ │ │ │ │ 29 │ │ │ │ │ ***************************************************************************/ │ │ │ │ │ - 30#ifndef _SILLYBase_h_ │ │ │ │ │ - 31#define _SILLYBase_h_ │ │ │ │ │ - 32#include │ │ │ │ │ - 33#include │ │ │ │ │ - 34 │ │ │ │ │ - 35#if defined(USE_SILLYOPTIONS_H) │ │ │ │ │ - 36#include "SILLYOptions.h" │ │ │ │ │ - 37#endif │ │ │ │ │ + 30 │ │ │ │ │ + 31// Start of section namespace SILLY │ │ │ │ │ + 32namespace SILLY │ │ │ │ │ + 33{ │ │ │ │ │ + 34inline bool FileDataSource::isValid() const │ │ │ │ │ + 35{ │ │ │ │ │ + 36 return d_error; │ │ │ │ │ + 37} │ │ │ │ │ 38 │ │ │ │ │ - 39#if defined(_WIN32) || defined(__WIN32__) │ │ │ │ │ - 40# undef SILLY_OPT_INLINE // No inlining │ │ │ │ │ - 41# undef SILLY_BE // Little Endian │ │ │ │ │ - 42# ifdef SILLY_EXPORTS │ │ │ │ │ - 43# define SILLY_EXPORT __declspec(dllexport) │ │ │ │ │ - 44# else │ │ │ │ │ - 45# define SILLY_EXPORT __declspec(dllimport) │ │ │ │ │ - 46# endif │ │ │ │ │ - 47#else │ │ │ │ │ - 48# define SILLY_EXPORT │ │ │ │ │ - 49#endif │ │ │ │ │ + 39inline const byte* FileDataSource::getDataPtr() const │ │ │ │ │ + 40{ │ │ │ │ │ + 41 return d_bytes; │ │ │ │ │ + 42} │ │ │ │ │ + 43 │ │ │ │ │ + 44inline size_t FileDataSource::getSize() const │ │ │ │ │ + 45{ │ │ │ │ │ + 46 return d_size; │ │ │ │ │ + 47} │ │ │ │ │ + 48 │ │ │ │ │ + 49} // End of section namespace SILLY │ │ │ │ │ 50 │ │ │ │ │ - 51// Start of section namespace SILLY │ │ │ │ │ - 52namespace SILLY │ │ │ │ │ - 53{ │ │ │ │ │ - 54 │ │ │ │ │ -59enum PixelFormat │ │ │ │ │ - 60{ │ │ │ │ │ - 61 PF_A1B5G5R5, //typedef unsigned char byte │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Typename for a byte.

│ │ │ │ │ │ │ │ -

Definition at line 80 of file SILLYBase.h.

│ │ │ │ +

Definition at line 80 of file SILLYBase.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ImageLoaderList

│ │ │ │ │ │ │ │
│ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │ typedef std::vector<ImageLoader*> ImageLoaderList │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Typename for a collection of image loader.

│ │ │ │ │ │ │ │ -

Definition at line 42 of file SILLYImageLoaderManager.h.

│ │ │ │ +

Definition at line 42 of file SILLYImageLoaderManager.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Enumeration Type Documentation

│ │ │ │ │ │ │ │

◆ PixelFormat

│ │ │ │ │ │ │ │ @@ -201,15 +201,15 @@ │ │ │ │ enum PixelFormat │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

List all pixel format supported.

│ │ │ │ │ │ │ │ -

Definition at line 59 of file SILLYBase.h.

│ │ │ │ +

Definition at line 59 of file SILLYBase.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ PixelOrigin

│ │ │ │ │ │ │ │
│ │ │ │ @@ -219,15 +219,15 @@ │ │ │ │ enum PixelOrigin │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

List all pixel origin supported.

│ │ │ │ │ │ │ │ -

Definition at line 70 of file SILLYBase.h.

│ │ │ │ +

Definition at line 70 of file SILLYBase.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Function Documentation

│ │ │ │ │ │ │ │

◆ JPG_emit_message()

│ │ │ │ │ │ │ │ @@ -390,15 +390,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 64 of file SILLYPNGImageLoader.cpp.

│ │ │ │ +

Definition at line 64 of file SILLYPNGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ PNG_read_function()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -426,15 +426,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 48 of file SILLYPNGImageLoader.cpp.

│ │ │ │ +

Definition at line 48 of file SILLYPNGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ PNG_warning_function()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -456,15 +456,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 58 of file SILLYPNGImageLoader.cpp.

│ │ │ │ +

Definition at line 58 of file SILLYPNGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ SILLYCleanup()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -477,15 +477,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Cleanup SILLY library internal.

│ │ │ │ │ │ │ │ -

Definition at line 100 of file SILLYImageLoaderManager.cpp.

│ │ │ │ +

Definition at line 100 of file SILLYImageLoaderManager.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ SILLYInit()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -499,15 +499,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Initialize the SILLY Library.

│ │ │ │
Returns
True if the initialization was successfull false otherwise.
│ │ │ │ │ │ │ │ -

Definition at line 87 of file SILLYImageLoaderManager.cpp.

│ │ │ │ +

Definition at line 87 of file SILLYImageLoaderManager.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Variable Documentation

│ │ │ │ │ │ │ │

◆ silly_init_counter

│ │ │ │ │ │ │ │ @@ -524,15 +524,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ static │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 58 of file SILLYImageLoaderManager.cpp.

│ │ │ │ +

Definition at line 58 of file SILLYImageLoaderManager.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Image Context for JPG image loader. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYJPGImageContext.h>

│ │ │ │ +

#include <SILLYJPGImageContext.h>

│ │ │ │
│ │ │ │ Inheritance diagram for JPGImageContext:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -128,15 +128,15 @@ │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Image Context for JPG image loader.

│ │ │ │

Most of the code of this loader is taken from Corona and adapted to our image loading framework

│ │ │ │

Multiple loading is not handle yet.

│ │ │ │ │ │ │ │ -

Definition at line 56 of file SILLYJPGImageContext.h.

│ │ │ │ +

Definition at line 56 of file SILLYJPGImageContext.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ JPGImageContext()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Flip pixel ordering.

│ │ │ │
Returns
true on success false otherwise
│ │ │ │ │ │ │ │ -

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ +

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ setImageSize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -231,15 +231,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
jpeg_decompress_struct cinfo
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 66 of file SILLYJPGImageContext.h.

│ │ │ │ +

Definition at line 66 of file SILLYJPGImageContext.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ d_error_mgr

│ │ │ │ │ │ │ │
│ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
jpeg_error_mgr d_error_mgr
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file SILLYJPGImageContext.h.

│ │ │ │ +

Definition at line 68 of file SILLYJPGImageContext.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ d_source

│ │ │ │ │ │ │ │
│ │ │ │ @@ -263,15 +263,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
DataSource* d_source
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file SILLYJPGImageContext.h.

│ │ │ │ +

Definition at line 70 of file SILLYJPGImageContext.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ setjmp_buffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -279,15 +279,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
jmp_buf setjmp_buffer
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 69 of file SILLYJPGImageContext.h.

│ │ │ │ +

Definition at line 69 of file SILLYJPGImageContext.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ src_mgr

│ │ │ │ │ │ │ │
│ │ │ │ @@ -295,20 +295,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
jpeg_source_mgr src_mgr
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 65 of file SILLYJPGImageContext.h.

│ │ │ │ +

Definition at line 65 of file SILLYJPGImageContext.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00949.html │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │
JPGImageLoader Class Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Loader class for JPG Image. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYJPGImageLoader.h>

│ │ │ │ +

#include <SILLYJPGImageLoader.h>

│ │ │ │
│ │ │ │ Inheritance diagram for JPGImageLoader:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │  Parse the pixels data of the image and fill the header struct. More...
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Loader class for JPG Image.

│ │ │ │ │ │ │ │ -

Definition at line 42 of file SILLYJPGImageLoader.h.

│ │ │ │ +

Definition at line 42 of file SILLYJPGImageLoader.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ JPGImageLoader()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │
Parameters
│ │ │ │
│ │ │ │ │ │ │ │
contexta pointer to the context
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ +

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ loadHeader()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │

Implements ImageLoader.

│ │ │ │ │ │ │ │

Definition at line 90 of file SILLYJPGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00953.html │ │ │ │ @@ -51,15 +51,15 @@ │ │ │ │
PNGImageContext Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Image Context for PNG Image Loader. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYPNGImageContext.h>

│ │ │ │ +

#include <SILLYPNGImageContext.h>

│ │ │ │
│ │ │ │ Inheritance diagram for PNGImageContext:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -115,15 +115,15 @@ │ │ │ │ Friends │ │ │ │ class PNGImageLoader │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Image Context for PNG Image Loader.

│ │ │ │ │ │ │ │ -

Definition at line 45 of file SILLYPNGImageContext.h.

│ │ │ │ +

Definition at line 45 of file SILLYPNGImageContext.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ PNGImageContext()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -133,15 +133,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
DataSourcedata)
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 59 of file SILLYPNGImageContext.cpp.

│ │ │ │ +

Definition at line 59 of file SILLYPNGImageContext.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~PNGImageContext()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -152,15 +152,15 @@ │ │ │ │ ( │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 65 of file SILLYPNGImageContext.cpp.

│ │ │ │ +

Definition at line 65 of file SILLYPNGImageContext.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ flipVertically()

│ │ │ │ │ │ │ │ @@ -183,15 +183,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Flip pixel ordering.

│ │ │ │
Returns
true on success false otherwise
│ │ │ │ │ │ │ │ -

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ +

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ read()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -213,15 +213,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 46 of file SILLYPNGImageContext.cpp.

│ │ │ │ +

Definition at line 46 of file SILLYPNGImageContext.cpp.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Friends And Related Function Documentation

│ │ │ │ │ │ │ │

◆ PNGImageLoader

│ │ │ │ │ │ │ │ @@ -238,21 +238,21 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file SILLYPNGImageContext.h.

│ │ │ │ +

Definition at line 70 of file SILLYPNGImageContext.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00957.html │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │
PNGImageLoader Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Loader for PNG Image. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYPNGImageLoader.h>

│ │ │ │ +

#include <SILLYPNGImageLoader.h>

│ │ │ │
│ │ │ │ Inheritance diagram for PNGImageLoader:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │  Parse the pixels data of the image and fill the header struct. More...
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Loader for PNG Image.

│ │ │ │ │ │ │ │ -

Definition at line 42 of file SILLYPNGImageLoader.h.

│ │ │ │ +

Definition at line 42 of file SILLYPNGImageLoader.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ PNGImageLoader()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -105,15 +105,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
()
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 79 of file SILLYPNGImageLoader.cpp.

│ │ │ │ +

Definition at line 79 of file SILLYPNGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~PNGImageLoader()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │ ( │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 83 of file SILLYPNGImageLoader.cpp.

│ │ │ │ +

Definition at line 83 of file SILLYPNGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ destroyContext()

│ │ │ │ │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │
Parameters
│ │ │ │ │ │ │ │ │ │ │ │
contexta pointer to the context
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ +

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ loadHeader()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -211,15 +211,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
Context for the rest of the parsing or 0 if an error occured
│ │ │ │ │ │ │ │

Implements ImageLoader.

│ │ │ │ │ │ │ │ -

Definition at line 88 of file SILLYPNGImageLoader.cpp.

│ │ │ │ +

Definition at line 88 of file SILLYPNGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ loadImageData()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -268,21 +268,21 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
true on success false on error
│ │ │ │ │ │ │ │

Implements ImageLoader.

│ │ │ │ │ │ │ │ -

Definition at line 154 of file SILLYPNGImageLoader.cpp.

│ │ │ │ +

Definition at line 154 of file SILLYPNGImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00961.html │ │ │ │ @@ -51,15 +51,15 @@ │ │ │ │
TGAImageContext Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Image Context for Targa image. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYTGAImageContext.h>

│ │ │ │ +

#include <SILLYTGAImageContext.h>

│ │ │ │
│ │ │ │ Inheritance diagram for TGAImageContext:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -114,15 +114,15 @@ │ │ │ │ Friends │ │ │ │ class TGAImageLoader │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Image Context for Targa image.

│ │ │ │ │ │ │ │ -

Definition at line 42 of file SILLYTGAImageContext.h.

│ │ │ │ +

Definition at line 42 of file SILLYTGAImageContext.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ flipVertically()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -142,15 +142,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Flip pixel ordering.

│ │ │ │
Returns
true on success false otherwise
│ │ │ │ │ │ │ │ -

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ +

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Friends And Related Function Documentation

│ │ │ │ │ │ │ │

◆ TGAImageLoader

│ │ │ │ │ │ │ │ @@ -167,20 +167,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 54 of file SILLYTGAImageContext.h.

│ │ │ │ +

Definition at line 54 of file SILLYTGAImageContext.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00965.html │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │
TGAImageLoader Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Loader for Targa image. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYTGAImageLoader.h>

│ │ │ │ +

#include <SILLYTGAImageLoader.h>

│ │ │ │
│ │ │ │ Inheritance diagram for TGAImageLoader:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context) │ │ │ │  Parse the pixels data of the image and fill the header struct. More...
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Loader for Targa image.

│ │ │ │ │ │ │ │ -

Definition at line 43 of file SILLYTGAImageLoader.h.

│ │ │ │ +

Definition at line 43 of file SILLYTGAImageLoader.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ TGAImageLoader()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │
Parameters
│ │ │ │
│ │ │ │ │ │ │ │
contexta pointer to the context
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ +

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ loadHeader()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │

Implements ImageLoader.

│ │ │ │ │ │ │ │

Definition at line 134 of file SILLYTGAImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00969.html │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │
DataSource Class Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

This is an abstract class used to provide data to the loader. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYDataSource.h>

│ │ │ │ +

#include <SILLYDataSource.h>

│ │ │ │
│ │ │ │ Inheritance diagram for DataSource:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -82,15 +82,15 @@ │ │ │ │  Destructor.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

This is an abstract class used to provide data to the loader.

│ │ │ │

This class defines abstract data loading operation required for the library.

│ │ │ │ │ │ │ │ -

Definition at line 46 of file SILLYDataSource.h.

│ │ │ │ +

Definition at line 46 of file SILLYDataSource.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ getDataPtr()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -143,15 +143,15 @@ │ │ │ │

Return the size of the data.

│ │ │ │ │ │ │ │

Implemented in FileDataSource, and MemoryDataSource.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.h
  • │ │ │ │ +
  • /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00973.html │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │
FileDataSource Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

This class allow the loading of an image directly from a file. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYFileDataSource.h>

│ │ │ │ +

#include <SILLYFileDataSource.h>

│ │ │ │
│ │ │ │ Inheritance diagram for FileDataSource:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
 destructor More...
 
│ │ │ │

Detailed Description

│ │ │ │

This class allow the loading of an image directly from a file.

│ │ │ │

This class provides the services required to load an from a file. The loading is done once at initialization. We wanted to avoid exception. This is why user must check whether the object is valid or not after creation.

│ │ │ │ │ │ │ │ -

Definition at line 48 of file SILLYFileDataSource.h.

│ │ │ │ +

Definition at line 48 of file SILLYFileDataSource.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ FileDataSource()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -122,15 +122,15 @@ │ │ │ │
Parameters
│ │ │ │
│ │ │ │ │ │ │ │
filenamethe name of the file containing the data
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 46 of file SILLYFileDataSource.cpp.

│ │ │ │ +

Definition at line 46 of file SILLYFileDataSource.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~FileDataSource()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -143,15 +143,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

destructor

│ │ │ │ │ │ │ │ -

Definition at line 86 of file SILLYFileDataSource.cpp.

│ │ │ │ +

Definition at line 86 of file SILLYFileDataSource.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ getDataPtr()

│ │ │ │ │ │ │ │ @@ -228,16 +228,16 @@ │ │ │ │

Check wether the loading is successfull or not.

│ │ │ │

One must call this function after creating this object in order to be sure the loading was successfull.

│ │ │ │
Returns
true if the loading is successfull.
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00977.html │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │
Image Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Image is the main user class of the library. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYImage.h>

│ │ │ │ +

#include <SILLYImage.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

│ │ │ │ size_t getHeight () const
 Retrieve the height of the image.
 
~Image ()
 Destructor.
 
│ │ │ │

Detailed Description

│ │ │ │

Image is the main user class of the library.

│ │ │ │ │ │ │ │ -

Definition at line 46 of file SILLYImage.h.

│ │ │ │ +

Definition at line 46 of file SILLYImage.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Image()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -128,15 +128,15 @@ │ │ │ │
Parameters
│ │ │ │
│ │ │ │ │ │ │ │
datathe raw input containing the image
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 48 of file SILLYImage.cpp.

│ │ │ │ +

Definition at line 48 of file SILLYImage.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ loadImageData()

│ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ originexpected origin position for the pixels │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
true on success false if an error occured
│ │ │ │
Note
this function can be called several time if the pixel format are different the format is reloaded
│ │ │ │ │ │ │ │ -

Definition at line 68 of file SILLYImage.cpp.

│ │ │ │ +

Definition at line 68 of file SILLYImage.cpp.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ loadImageHeader()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -192,21 +192,21 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Retrieve the information concerning the image object.

│ │ │ │
Returns
true on success
│ │ │ │ │ │ │ │ -

Definition at line 54 of file SILLYImage.cpp.

│ │ │ │ +

Definition at line 54 of file SILLYImage.cpp.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files:
    │ │ │ │ -
  • /build/reproducible-path/silly-0.1.0/include/SILLYImage.h
  • │ │ │ │ -
  • /build/reproducible-path/silly-0.1.0/src/SILLYImage.cpp
  • │ │ │ │ +
  • /build/reproducible-path/silly-0.1.0/include/SILLYImage.h
  • │ │ │ │ +
  • /build/reproducible-path/silly-0.1.0/src/SILLYImage.cpp
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00981.html │ │ │ │ @@ -50,15 +50,15 @@ │ │ │ │
ImageContext Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Store the data needed by an ImageLoader object during the parsing of an image. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYImageContext.h>

│ │ │ │ +

#include <SILLYImageContext.h>

│ │ │ │
│ │ │ │ Inheritance diagram for ImageContext:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -105,15 +105,15 @@ │ │ │ │ │ │ │ │ void setWidth (size_t width) │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Store the data needed by an ImageLoader object during the parsing of an image.

│ │ │ │ │ │ │ │ -

Definition at line 43 of file SILLYImageContext.h.

│ │ │ │ +

Definition at line 43 of file SILLYImageContext.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ImageContext()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -171,21 +171,21 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Flip pixel ordering.

│ │ │ │
Returns
true on success false otherwise
│ │ │ │ │ │ │ │ -

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ +

Definition at line 45 of file SILLYImageContext.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00985.html │ │ │ │ @@ -50,15 +50,15 @@ │ │ │ │
ImageLoader Class Referenceabstract
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

This is an abstract class that define the interface of all image loader. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYImageLoader.h>

│ │ │ │ +

#include <SILLYImageLoader.h>

│ │ │ │
│ │ │ │ Inheritance diagram for ImageLoader:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │  Constructor.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

This is an abstract class that define the interface of all image loader.

│ │ │ │

In order to add support for new image format one have to inherits this class and implement all required function.

│ │ │ │ │ │ │ │ -

Definition at line 46 of file SILLYImageLoader.h.

│ │ │ │ +

Definition at line 46 of file SILLYImageLoader.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ destroyContext()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │
Parameters
│ │ │ │
│ │ │ │ │ │ │ │
contexta pointer to the context
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ +

Definition at line 47 of file SILLYImageLoader.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ loadHeader()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -228,16 +228,16 @@ │ │ │ │
Returns
true on success false on error
│ │ │ │ │ │ │ │

Implemented in JPGImageLoader, PNGImageLoader, and TGAImageLoader.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00989.html │ │ │ │ @@ -50,15 +50,15 @@ │ │ │ │
ImageLoaderManager Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Manage the list of all supported ImageLoader. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYImageLoaderManager.h>

│ │ │ │ +

#include <SILLYImageLoaderManager.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

void add (ImageLoader *loader)
 Register an ImageLoader object. More...
 
│ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │
│ │ │ │ static ImageLoaderManagergetSingletonPtr ()
 
│ │ │ │

Detailed Description

│ │ │ │

Manage the list of all supported ImageLoader.

│ │ │ │ │ │ │ │ -

Definition at line 56 of file SILLYImageLoaderManager.h.

│ │ │ │ +

Definition at line 56 of file SILLYImageLoaderManager.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ImageLoaderManager()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Constructor.

│ │ │ │ │ │ │ │ -

Definition at line 62 of file SILLYImageLoaderManager.cpp.

│ │ │ │ +

Definition at line 62 of file SILLYImageLoaderManager.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~ImageLoaderManager()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Destructor.

│ │ │ │ │ │ │ │ -

Definition at line 77 of file SILLYImageLoaderManager.cpp.

│ │ │ │ +

Definition at line 77 of file SILLYImageLoaderManager.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ add()

│ │ │ │ │ │ │ │ @@ -156,16 +156,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/a00993.html │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │
MemoryDataSource Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Load an image from a memory area. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <SILLYMemoryDataSource.h>

│ │ │ │ +

#include <SILLYMemoryDataSource.h>

│ │ │ │
│ │ │ │ Inheritance diagram for MemoryDataSource:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │  Retieve the byte at offset.
│ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Load an image from a memory area.

│ │ │ │

This class provides the services required to load an image from a byte array. The object does not change the memory area and does no take owner chip of the data.

│ │ │ │ │ │ │ │ -

Definition at line 48 of file SILLYMemoryDataSource.h.

│ │ │ │ +

Definition at line 48 of file SILLYMemoryDataSource.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ MemoryDataSource()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -127,15 +127,15 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
dataa byte array of size size
sizethe size of data
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 46 of file SILLYMemoryDataSource.cpp.

│ │ │ │ +

Definition at line 46 of file SILLYMemoryDataSource.cpp.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ getDataPtr()

│ │ │ │ │ │ │ │ @@ -191,16 +191,16 @@ │ │ │ │

Return the size of the data.

│ │ │ │ │ │ │ │

Implements DataSource.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/dir_0d87e2e7ddaae8a2a8572c0afc59fe0d.html │ │ │ │ @@ -60,47 +60,47 @@ │ │ │ │

│ │ │ │ Directories

│ │ │ │ directory  loaders │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Files

file  SILLY.h [code]
file  SILLY.h [code]
 
file  SILLYBase.h [code]
file  SILLYBase.h [code]
 
file  SILLYDataSource.h [code]
file  SILLYDataSource.h [code]
 
file  SILLYDataSource.icpp [code]
file  SILLYDataSource.icpp [code]
 
file  SILLYFileDataSource.h [code]
file  SILLYFileDataSource.h [code]
 
file  SILLYFileDataSource.icpp [code]
file  SILLYFileDataSource.icpp [code]
 
file  SILLYImage.h [code]
file  SILLYImage.h [code]
 
file  SILLYImage.icpp [code]
file  SILLYImage.icpp [code]
 
file  SILLYImageContext.h [code]
file  SILLYImageContext.h [code]
 
file  SILLYImageContext.icpp [code]
file  SILLYImageContext.icpp [code]
 
file  SILLYImageLoader.h [code]
file  SILLYImageLoader.h [code]
 
file  SILLYImageLoader.icpp [code]
file  SILLYImageLoader.icpp [code]
 
file  SILLYImageLoaderManager.h [code]
file  SILLYImageLoaderManager.h [code]
 
file  SILLYImageLoaderManager.icpp [code]
file  SILLYImageLoaderManager.icpp [code]
 
file  SILLYMemoryDataSource.h [code]
file  SILLYMemoryDataSource.h [code]
 
file  SILLYMemoryDataSource.icpp [code]
file  SILLYMemoryDataSource.icpp [code]
 
file  SILLYOptions.h [code]
file  SILLYOptions.h [code]
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libsilly-doc/html/dir_7b011f4828cd5682692dd5e7c066fc3b.html │ │ │ │ @@ -58,19 +58,19 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Files

file  SILLYJPGImageContext.cpp [code]
 
file  SILLYJPGImageLoader.cpp [code]
 
file  SILLYPNGImageContext.cpp [code]
file  SILLYPNGImageContext.cpp [code]
 
file  SILLYPNGImageLoader.cpp [code]
file  SILLYPNGImageLoader.cpp [code]
 
file  SILLYTGAImageContext.cpp [code]
file  SILLYTGAImageContext.cpp [code]
 
file  SILLYTGAImageLoader.cpp [code]
 
│ │ │ │ │ │ │ │ │ │ │ │