{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.xPpOa4Kw/b1/silly_0.1.0-8.1_amd64.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.xPpOa4Kw/b2/silly_0.1.0-8.1_amd64.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,5 +1,5 @@\n \n 80f4e2e41714c7e465a12b3d2c1086df 64392 debug optional libsilly-dbgsym_0.1.0-8.1_amd64.deb\n cb2bed6e30a5625664d199a784e10fa3 24388 libdevel extra libsilly-dev_0.1.0-8.1_amd64.deb\n- 0aac0fcba6634b5067f527ad79cb206c 209472 doc extra libsilly-doc_0.1.0-8.1_all.deb\n+ a828e66f94583f7a0a00f0e4d24ff0d9 209588 doc extra libsilly-doc_0.1.0-8.1_all.deb\n e50ac0c7a625a1e3563e95cac0e1d79d 15332 libs extra libsilly_0.1.0-8.1_amd64.deb\n"}, {"source1": "libsilly-doc_0.1.0-8.1_all.deb", "source2": "libsilly-doc_0.1.0-8.1_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2021-01-03 15:26:07.000000 debian-binary\n--rw-r--r-- 0 0 0 3852 2021-01-03 15:26:07.000000 control.tar.xz\n--rw-r--r-- 0 0 0 205428 2021-01-03 15:26:07.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 3860 2021-01-03 15:26:07.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 205536 2021-01-03 15:26:07.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -4,55 +4,55 @@\n drwxr-xr-x 0 root (0) root (0) 0 2021-01-03 15:26:07.000000 ./usr/share/doc/\n drwxr-xr-x 0 root (0) root (0) 0 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/\n -rw-r--r-- 0 root (0) root (0) 643 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/changelog.Debian.gz\n -rw-r--r-- 0 root (0) root (0) 387 2006-08-11 08:21:50.000000 ./usr/share/doc/libsilly-doc/changelog.gz\n -rw-r--r-- 0 root (0) root (0) 3404 2012-04-10 11:20:35.000000 ./usr/share/doc/libsilly-doc/copyright\n drwxr-xr-x 0 root (0) root (0) 0 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/\n -rw-r--r-- 0 root (0) root (0) 22980 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00002_source.html\n--rw-r--r-- 0 root (0) root (0) 12352 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00005_source.html\n--rw-r--r-- 0 root (0) root (0) 12614 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00008_source.html\n--rw-r--r-- 0 root (0) root (0) 17532 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00011_source.html\n--rw-r--r-- 0 root (0) root (0) 23456 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00014_source.html\n--rw-r--r-- 0 root (0) root (0) 54330 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00017_source.html\n--rw-r--r-- 0 root (0) root (0) 35912 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00020_source.html\n--rw-r--r-- 0 root (0) root (0) 10914 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00023_source.html\n--rw-r--r-- 0 root (0) root (0) 21484 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00026_source.html\n--rw-r--r-- 0 root (0) root (0) 15793 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00029_source.html\n--rw-r--r-- 0 root (0) root (0) 28761 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00032_source.html\n+-rw-r--r-- 0 root (0) root (0) 15793 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00005_source.html\n+-rw-r--r-- 0 root (0) root (0) 28761 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00008_source.html\n+-rw-r--r-- 0 root (0) root (0) 21484 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00011_source.html\n+-rw-r--r-- 0 root (0) root (0) 10914 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00014_source.html\n+-rw-r--r-- 0 root (0) root (0) 35912 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00017_source.html\n+-rw-r--r-- 0 root (0) root (0) 54330 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00020_source.html\n+-rw-r--r-- 0 root (0) root (0) 23456 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00023_source.html\n+-rw-r--r-- 0 root (0) root (0) 12614 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00026_source.html\n+-rw-r--r-- 0 root (0) root (0) 17532 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00029_source.html\n+-rw-r--r-- 0 root (0) root (0) 12352 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00032_source.html\n -rw-r--r-- 0 root (0) root (0) 10751 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00035_source.html\n -rw-r--r-- 0 root (0) root (0) 16110 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00038_source.html\n--rw-r--r-- 0 root (0) root (0) 14314 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00041_source.html\n--rw-r--r-- 0 root (0) root (0) 18929 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00044_source.html\n--rw-r--r-- 0 root (0) root (0) 10749 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00047_source.html\n--rw-r--r-- 0 root (0) root (0) 8821 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00050_source.html\n--rw-r--r-- 0 root (0) root (0) 9235 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00053_source.html\n--rw-r--r-- 0 root (0) root (0) 15443 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00056_source.html\n--rw-r--r-- 0 root (0) root (0) 17517 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00059_source.html\n--rw-r--r-- 0 root (0) root (0) 8816 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00062_source.html\n--rw-r--r-- 0 root (0) root (0) 23504 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00065_source.html\n--rw-r--r-- 0 root (0) root (0) 14954 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00068_source.html\n--rw-r--r-- 0 root (0) root (0) 18192 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00071_source.html\n--rw-r--r-- 0 root (0) root (0) 12945 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00074_source.html\n--rw-r--r-- 0 root (0) root (0) 8925 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00077_source.html\n--rw-r--r-- 0 root (0) root (0) 18535 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00080_source.html\n--rw-r--r-- 0 root (0) root (0) 7850 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00083_source.html\n--rw-r--r-- 0 root (0) root (0) 7846 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00086_source.html\n--rw-r--r-- 0 root (0) root (0) 7845 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00089_source.html\n--rw-r--r-- 0 root (0) root (0) 8729 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00092_source.html\n--rw-r--r-- 0 root (0) root (0) 16404 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00095_source.html\n--rw-r--r-- 0 root (0) root (0) 7850 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00098_source.html\n--rw-r--r-- 0 root (0) root (0) 15721 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00101_source.html\n--rw-r--r-- 0 root (0) root (0) 14968 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00104_source.html\n--rw-r--r-- 0 root (0) root (0) 7855 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00107_source.html\n--rw-r--r-- 0 root (0) root (0) 16006 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00110_source.html\n--rw-r--r-- 0 root (0) root (0) 15882 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00113_source.html\n--rw-r--r-- 0 root (0) root (0) 13840 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00116_source.html\n--rw-r--r-- 0 root (0) root (0) 10785 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00119_source.html\n--rw-r--r-- 0 root (0) root (0) 13735 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00122_source.html\n--rw-r--r-- 0 root (0) root (0) 9222 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00125_source.html\n+-rw-r--r-- 0 root (0) root (0) 8925 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00041_source.html\n+-rw-r--r-- 0 root (0) root (0) 16404 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00044_source.html\n+-rw-r--r-- 0 root (0) root (0) 7846 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00047_source.html\n+-rw-r--r-- 0 root (0) root (0) 7850 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00050_source.html\n+-rw-r--r-- 0 root (0) root (0) 15882 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00053_source.html\n+-rw-r--r-- 0 root (0) root (0) 14968 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00056_source.html\n+-rw-r--r-- 0 root (0) root (0) 7855 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00059_source.html\n+-rw-r--r-- 0 root (0) root (0) 7850 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00062_source.html\n+-rw-r--r-- 0 root (0) root (0) 15721 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00065_source.html\n+-rw-r--r-- 0 root (0) root (0) 7845 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00068_source.html\n+-rw-r--r-- 0 root (0) root (0) 13840 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00071_source.html\n+-rw-r--r-- 0 root (0) root (0) 16006 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00074_source.html\n+-rw-r--r-- 0 root (0) root (0) 8729 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00077_source.html\n+-rw-r--r-- 0 root (0) root (0) 13735 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00080_source.html\n+-rw-r--r-- 0 root (0) root (0) 10785 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00083_source.html\n+-rw-r--r-- 0 root (0) root (0) 18192 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00086_source.html\n+-rw-r--r-- 0 root (0) root (0) 8816 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00089_source.html\n+-rw-r--r-- 0 root (0) root (0) 18929 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00092_source.html\n+-rw-r--r-- 0 root (0) root (0) 14314 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00095_source.html\n+-rw-r--r-- 0 root (0) root (0) 9235 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00098_source.html\n+-rw-r--r-- 0 root (0) root (0) 9222 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00101_source.html\n+-rw-r--r-- 0 root (0) root (0) 23504 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00104_source.html\n+-rw-r--r-- 0 root (0) root (0) 8821 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00107_source.html\n+-rw-r--r-- 0 root (0) root (0) 12945 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00110_source.html\n+-rw-r--r-- 0 root (0) root (0) 15443 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00113_source.html\n+-rw-r--r-- 0 root (0) root (0) 10749 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00116_source.html\n+-rw-r--r-- 0 root (0) root (0) 17517 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00119_source.html\n+-rw-r--r-- 0 root (0) root (0) 18535 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00122_source.html\n+-rw-r--r-- 0 root (0) root (0) 14954 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00125_source.html\n -rw-r--r-- 0 root (0) root (0) 32995 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00129.html\n -rw-r--r-- 0 root (0) root (0) 6976 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00942.html\n -rw-r--r-- 0 root (0) root (0) 20984 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00943.png\n -rw-r--r-- 0 root (0) root (0) 4742 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00944.png\n -rw-r--r-- 0 root (0) root (0) 19999 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00945.html\n -rw-r--r-- 0 root (0) root (0) 4488 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00946.html\n -rw-r--r-- 0 root (0) root (0) 3997 2021-01-03 15:26:07.000000 ./usr/share/doc/libsilly-doc/html/a00947.png\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00002_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00002_source.html", "unified_diff": "@@ -165,21 +165,21 @@\n
105 }
\n
106}
\n \n
107
\n
108} // End of SILLY namespace section
\n
109
\n
110
\n-
SILLY
Simple Image Loading LibrarY namespace.
Definition SILLYJPGImageContext.cpp:46
\n+
SILLY
Simple Image Loading LibrarY namespace.
Definition SILLYJPGImageContext.cpp:46
\n
SILLY::SILLYCleanup
void SILLYCleanup()
Cleanup SILLY library internal.
Definition SILLYImageLoaderManager.cpp:100
\n
SILLY::SILLYInit
bool SILLYInit()
Initialize the SILLY Library.
Definition SILLYImageLoaderManager.cpp:87
\n-
SILLY::JPGImageLoader
Loader class for JPG Image.
Definition SILLYJPGImageLoader.h:43
\n-
SILLY::PNGImageLoader
Loader for PNG Image.
Definition SILLYPNGImageLoader.h:43
\n-
SILLY::TGAImageLoader
Loader for Targa image.
Definition SILLYTGAImageLoader.h:44
\n-
SILLY::ImageLoaderManager
Manage the list of all supported ImageLoader.
Definition SILLYImageLoaderManager.h:57
\n+
SILLY::JPGImageLoader
Loader class for JPG Image.
Definition SILLYJPGImageLoader.h:43
\n+
SILLY::PNGImageLoader
Loader for PNG Image.
Definition SILLYPNGImageLoader.h:43
\n+
SILLY::TGAImageLoader
Loader for Targa image.
Definition SILLYTGAImageLoader.h:44
\n+
SILLY::ImageLoaderManager
Manage the list of all supported ImageLoader.
Definition SILLYImageLoaderManager.h:57
\n
SILLY::ImageLoaderManager::~ImageLoaderManager
~ImageLoaderManager()
Destructor.
Definition SILLYImageLoaderManager.cpp:77
\n
SILLY::ImageLoaderManager::add
void add(ImageLoader *loader)
Register an ImageLoader object.
\n
SILLY::ImageLoaderManager::ImageLoaderManager
ImageLoaderManager()
Constructor.
Definition SILLYImageLoaderManager.cpp:62
\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00005_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00005_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYMemoryDataSource.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageContext.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYMemoryDataSource.cpp
\n+
SILLYPNGImageContext.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYMemoryDataSource.cpp
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYPNGImageContext.cpp
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: SILLYMemoryDataSource definition for the SILLY library
\n+
6 purpose: Definition of PNGImageContext methods
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,40 +80,66 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "SILLYMemoryDataSource.h"
\n+
34#include "loaders/SILLYPNGImageContext.h"
\n
35
\n
36#ifndef SILLY_OPT_INLINE
\n
37#define inline
\n-
38#include "SILLYMemoryDataSource.icpp"
\n+
38#include "loaders/SILLYPNGImageContext.icpp"
\n
39#undef inline
\n-
40#endif
\n-
41
\n-
42// Start of SILLY namespace section
\n-
43namespace SILLY
\n-
44{
\n-
45
\n-
\n-
46MemoryDataSource::MemoryDataSource(const byte* data, size_t size)
\n-
47 : d_bytes(data), d_size(size)
\n-
48{
\n-
49 assert(data && "ASSERT: data point to an invalid memory");
\n-
50 assert(size && "ASSERT: size is equal to 0");
\n-
51}
\n-
\n-
52
\n-
53} // End of SILLY namespace section
\n-
54
\n-
55
\n-
Simple Image Loading LibrarY namespace.
\n-
MemoryDataSource(const byte *data, size_t size)
Create a data source from an existing memory area.
\n+
40#endif
\n+
41#include <string.h>
\n+
42
\n+
43// Start section of namespace SILLY
\n+
44namespace SILLY
\n+
45{
\n+
46int PNGImageContext::read(png_bytep data, png_size_t length)
\n+
47{
\n+
48 //printf("PNG Read: %d bytes offset: %d, size %d\\n",
\n+
49 // length, d_offset, d_data->getSize());
\n+
50
\n+
51 if (d_offset + length > d_data->getSize())
\n+
52 return -1;
\n+
53 memcpy(data, d_data->getDataPtr() + d_offset, length);
\n+
54 d_offset += length;
\n+
55 return length;
\n+
56}
\n+
57
\n+
58
\n+
59PNGImageContext::PNGImageContext(DataSource* data)
\n+
60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0)
\n+
61{
\n+
62
\n+
63}
\n+
64
\n+
65PNGImageContext::~PNGImageContext()
\n+
66{
\n+
67 if (d_info_ptr)
\n+
68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0);
\n+
69 if (d_png_ptr)
\n+
70 png_destroy_read_struct(&d_png_ptr, 0, 0);
\n+
71}
\n+
72
\n+
73
\n+
74void PNGImageContext::setImageSize()
\n+
75{
\n+
76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr));
\n+
77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr));
\n+
78
\n+
79}
\n+
80
\n+
81
\n+
82} // End section of namespace SILLY
\n+
Simple Image Loading LibrarY namespace.
\n+
virtual size_t getSize() const =0
Return the size of the data.
\n+
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n-SILLYMemoryDataSource.cpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYPNGImageContext.cpp\n 1/***********************************************************************\n-2 filename: SILLYMemoryDataSource.cpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYPNGImageContext.cpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: SILLYMemoryDataSource definition for the SILLY library\n+6 purpose: Definition of PNGImageContext methods\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -33,38 +34,67 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"SILLYMemoryDataSource.h\"\n+34#include \"loaders/SILLYPNGImageContext.h\"\n 35\n 36#ifndef SILLY_OPT_INLINE\n 37#define inline\n-38#include \"SILLYMemoryDataSource.icpp\"\n+38#include \"loaders/SILLYPNGImageContext.icpp\"\n 39#undef inline\n 40#endif\n-41\n-42// Start of SILLY namespace section\n-43namespace _\bS_\bI_\bL_\bL_\bY\n-44{\n-45\n-_\b4_\b6_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const byte* data, size_t size)\n-47 : d_bytes(data), d_size(size)\n-48{\n-49 assert(data && \"ASSERT: data point to an invalid memory\");\n-50 assert(size && \"ASSERT: size is equal to 0\");\n-51}\n-52\n-53} // End of SILLY namespace section\n-54\n-55\n+41#include \n+42\n+43// Start section of namespace SILLY\n+44namespace _\bS_\bI_\bL_\bL_\bY\n+45{\n+46int PNGImageContext::read(png_bytep data, png_size_t length)\n+47{\n+48 //printf(\"PNG Read: %d bytes offset: %d, size %d\\n\",\n+49 // length, d_offset, d_data->getSize());\n+50\n+51 if (d_offset + length > d_data->_\bg_\be_\bt_\bS_\bi_\bz_\be())\n+52 return -1;\n+53 memcpy(data, d_data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() + d_offset, length);\n+54 d_offset += length;\n+55 return length;\n+56}\n+57\n+58\n+59PNGImageContext::PNGImageContext(DataSource* data)\n+60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0)\n+61{\n+62\n+63}\n+64\n+65PNGImageContext::~PNGImageContext()\n+66{\n+67 if (d_info_ptr)\n+68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0);\n+69 if (d_png_ptr)\n+70 png_destroy_read_struct(&d_png_ptr, 0, 0);\n+71}\n+72\n+73\n+74void PNGImageContext::setImageSize()\n+75{\n+76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr));\n+77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr));\n+78\n+79}\n+80\n+81\n+82} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-MemoryDataSource(const byte *data, size_t size)\n-Create a data source from an existing memory area.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n+virtual size_t getSize() const =0\n+Return the size of the data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n+virtual const byte * getDataPtr() const =0\n+Get raw access to the image data.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00008_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00008_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageLoader.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYJPGImageLoader.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYImageLoader.cpp
\n+
SILLYJPGImageLoader.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: ImageLoader.cpp
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYJPGImageLoader.cpp
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Implementation of the ImageLoader
\n+
6 purpose: Definition of JPGImageLoader methods
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,43 +80,150 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "SILLYImageLoader.h"
\n-
35#ifndef SILLY_OPT_INLINE
\n-
36#define inline
\n-
37#include "SILLYImageLoader.icpp"
\n-
38#undef inline
\n-
39#endif
\n-
40#include "SILLYImageContext.h"
\n-
41
\n-
42// Start of SILLY namespace section
\n-
43namespace SILLY
\n-
44{
\n-
45
\n-
46
\n-
\n-\n+
34#include "loaders/SILLYJPGImageLoader.h"
\n+
35
\n+
36#ifndef SILLY_OPT_INLINE
\n+
37#define inline
\n+
38#include "loaders/SILLYJPGImageLoader.icpp"
\n+
39#undef inline
\n+
40#endif
\n+
41#include "loaders/SILLYJPGImageContext.h"
\n+
42
\n+
43// Start section of namespace SILLY
\n+
44namespace SILLY
\n+
45{
\n+
46JPGImageLoader::JPGImageLoader()
\n+
47 : ImageLoader("JPG Image Loader based on jpeg-6b")
\n
48{
\n-
49 delete context;
\n-
50}
\n-
\n-
51
\n-
52
\n-
53} // end of SILLY namespace section
\n+
49}
\n+
50
\n+
51JPGImageLoader::~JPGImageLoader()
\n+
52{
\n+
53}
\n
54
\n
55
\n-
56
\n-
57
\n-
Simple Image Loading LibrarY namespace.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
void destroyContext(ImageContext *context)
Destroy the image context.
\n+
\n+
56ImageContext* JPGImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
\n+
57{
\n+\n+
59 jpg->d_source = data;
\n+
60
\n+
61 if (! jpg)
\n+
62 return 0;
\n+
63 if (setjmp(jpg->setjmp_buffer))
\n+
64 {
\n+
65 delete jpg;
\n+
66 return 0;
\n+
67 }
\n+
68 jpeg_read_header(&(jpg->cinfo), TRUE);
\n+
69 if (! jpeg_start_decompress(&(jpg->cinfo)))
\n+
70 {
\n+
71 delete jpg;
\n+
72 return 0;
\n+
73 }
\n+
74
\n+
75
\n+
76 if (jpg->cinfo.output_components != 1 && jpg->cinfo.output_components != 3)
\n+
77 {
\n+
78 printf("JPG unsupported bpp: %d\\n", jpg->cinfo.output_components );
\n+
79 jpeg_finish_decompress(& jpg->cinfo);
\n+
80 delete jpg;
\n+
81 return 0;
\n+
82 }
\n+
83 formatSource = PF_RGB; // It's not true but we handle both the same way
\n+
84 //printf("Image info: size: %dx%d - bpp: %d\\n", jpg->cinfo.output_width, jpg->cinfo.output_height, jpg->cinfo.output_components);
\n+
85
\n+
86 jpg->setImageSize();
\n+
87 return jpg;
\n+
88}
\n+
\n+
89
\n+
\n+
90bool JPGImageLoader::loadImageData(PixelOrigin origin,
\n+
91 DataSource* data,
\n+
92 ImageContext* context)
\n+
93{
\n+
94 JPGImageContext* jpg = static_cast<JPGImageContext*>(context);
\n+
95
\n+
96 // Allocate a buffer
\n+
97 int row_stride = jpg->getWidth() * jpg->cinfo.output_components;
\n+
98 JSAMPARRAY buffer = (* jpg->cinfo.mem->alloc_sarray)(
\n+
99 (j_common_ptr)(& jpg->cinfo),
\n+
100 JPOOL_IMAGE,
\n+
101 row_stride,
\n+
102 1);
\n+
103 bool finished = true;
\n+
104 size_t height = jpg->getHeight();
\n+
105 size_t width = jpg->getWidth();
\n+
106
\n+
107
\n+
108 while(jpg->cinfo.output_scanline < height)
\n+
109 {
\n+
110 int num_rows = jpeg_read_scanlines(& jpg->cinfo, buffer, 1);
\n+
111 if (num_rows != 1)
\n+
112 {
\n+
113 jpeg_finish_decompress(& jpg->cinfo);
\n+
114 return false;
\n+
115 }
\n+
116 byte red;
\n+
117 byte green;
\n+
118 byte blue;
\n+
119 const byte alpha = 0xff;
\n+
120 byte* in = (byte*)(*buffer);
\n+
121 // Grayscale image
\n+
122 if (jpg->cinfo.output_components == 1)
\n+
123 {
\n+
124 for(size_t i = 0 ; i < width * num_rows ; ++i)
\n+
125 {
\n+
126 red = *in;
\n+
127 green = *in;
\n+
128 blue = *in;
\n+
129 jpg->setNextPixel(red, green, blue, alpha);
\n+
130 in += 1;
\n+
131 }
\n+
132 }
\n+
133 // RGB image
\n+
134 else
\n+
135 {
\n+
136 for(size_t i = 0 ; i < width * num_rows ; ++i)
\n+
137 {
\n+
138 red = *(in++);
\n+
139 green = *(in++);
\n+
140 blue = *(in++);
\n+
141 jpg->setNextPixel(red, green, blue, alpha);
\n+
142 }
\n+
143 }
\n+
144 }
\n+
145 jpeg_finish_decompress(& jpg->cinfo);
\n+
146
\n+
147 if (origin == PO_BOTTOM_LEFT)
\n+
148 return jpg->flipVertically();
\n+
149 return true;
\n+
150}
\n+
\n+
151
\n+
152
\n+
153
\n+
154
\n+
155
\n+
156
\n+
157} // End section of namespace SILLY
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
Image Context for JPG image loader.
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
\n+
bool flipVertically()
Flip pixel ordering.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n-SILLYImageLoader.cpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYJPGImageLoader.cpp\n 1/***********************************************************************\n-2 filename: ImageLoader.cpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYJPGImageLoader.cpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Implementation of the ImageLoader\n+6 purpose: Definition of JPGImageLoader methods\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -33,43 +34,162 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"SILLYImageLoader.h\"\n-35#ifndef SILLY_OPT_INLINE\n-36#define inline\n-37#include \"SILLYImageLoader.icpp\"\n-38#undef inline\n-39#endif\n-40#include \"SILLYImageContext.h\"\n-41\n-42// Start of SILLY namespace section\n-43namespace _\bS_\bI_\bL_\bL_\bY\n-44{\n-45\n-46\n-_\b4_\b7void _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bd_\be_\bs_\bt_\br_\bo_\by_\bC_\bo_\bn_\bt_\be_\bx_\bt(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n+34#include \"loaders/SILLYJPGImageLoader.h\"\n+35\n+36#ifndef SILLY_OPT_INLINE\n+37#define inline\n+38#include \"loaders/SILLYJPGImageLoader.icpp\"\n+39#undef inline\n+40#endif\n+41#include \"loaders/SILLYJPGImageContext.h\"\n+42\n+43// Start section of namespace SILLY\n+44namespace _\bS_\bI_\bL_\bL_\bY\n+45{\n+46JPGImageLoader::JPGImageLoader()\n+47 : ImageLoader(\"JPG Image Loader based on jpeg-6b\")\n 48{\n-49 delete context;\n-50}\n-51\n-52\n-53} // end of SILLY namespace section\n+49}\n+50\n+51JPGImageLoader::~JPGImageLoader()\n+52{\n+53}\n 54\n 55\n-56\n-57\n+_\b5_\b6_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* JPGImageLoader::loadHeader(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource,\n+_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data)\n+57{\n+58 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = new _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt;\n+59 jpg->d_source = data;\n+60\n+61 if (! jpg)\n+62 return 0;\n+63 if (setjmp(jpg->setjmp_buffer))\n+64 {\n+65 delete jpg;\n+66 return 0;\n+67 }\n+68 jpeg_read_header(&(jpg->cinfo), TRUE);\n+69 if (! jpeg_start_decompress(&(jpg->cinfo)))\n+70 {\n+71 delete jpg;\n+72 return 0;\n+73 }\n+74\n+75\n+76 if (jpg->cinfo.output_components != 1 && jpg->cinfo.output_components != 3)\n+77 {\n+78 printf(\"JPG unsupported bpp: %d\\n\", jpg->cinfo.output_components );\n+79 jpeg_finish_decompress(& jpg->cinfo);\n+80 delete jpg;\n+81 return 0;\n+82 }\n+83 formatSource = PF_RGB; // It's not true but we handle both the same way\n+84 //printf(\"Image info: size: %dx%d - bpp: %d\\n\", jpg->cinfo.output_width,\n+jpg->cinfo.output_height, jpg->cinfo.output_components);\n+85\n+86 jpg->setImageSize();\n+87 return jpg;\n+88}\n+89\n+_\b9_\b0bool JPGImageLoader::loadImageData(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n+91 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n+92 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n+93{\n+94 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = static_cast<_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(context);\n+95\n+96 // Allocate a buffer\n+97 int row_stride = jpg->getWidth() * jpg->cinfo.output_components;\n+98 JSAMPARRAY buffer = (* jpg->cinfo.mem->alloc_sarray)(\n+99 (j_common_ptr)(& jpg->cinfo),\n+100 JPOOL_IMAGE,\n+101 row_stride,\n+102 1);\n+103 bool finished = true;\n+104 size_t height = jpg->getHeight();\n+105 size_t width = jpg->getWidth();\n+106\n+107\n+108 while(jpg->cinfo.output_scanline < height)\n+109 {\n+110 int num_rows = jpeg_read_scanlines(& jpg->cinfo, buffer, 1);\n+111 if (num_rows != 1)\n+112 {\n+113 jpeg_finish_decompress(& jpg->cinfo);\n+114 return false;\n+115 }\n+116 byte red;\n+117 byte green;\n+118 byte blue;\n+119 const byte alpha = 0xff;\n+120 byte* in = (byte*)(*buffer);\n+121 // Grayscale image\n+122 if (jpg->cinfo.output_components == 1)\n+123 {\n+124 for(size_t i = 0 ; i < width * num_rows ; ++i)\n+125 {\n+126 red = *in;\n+127 green = *in;\n+128 blue = *in;\n+129 jpg->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+130 in += 1;\n+131 }\n+132 }\n+133 // RGB image\n+134 else\n+135 {\n+136 for(size_t i = 0 ; i < width * num_rows ; ++i)\n+137 {\n+138 red = *(in++);\n+139 green = *(in++);\n+140 blue = *(in++);\n+141 jpg->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+142 }\n+143 }\n+144 }\n+145 jpeg_finish_decompress(& jpg->cinfo);\n+146\n+147 if (origin == PO_BOTTOM_LEFT)\n+148 return jpg->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n+149 return true;\n+150}\n+151\n+152\n+153\n+154\n+155\n+156\n+157} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat\n+List all pixel format supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n+PixelOrigin\n+List all pixel origin supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Image Context for JPG image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b5_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n Store the data needed by an ImageLoader object during the parsing of an image.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bd_\be_\bs_\bt_\br_\bo_\by_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-void destroyContext(ImageContext *context)\n-Destroy the image context.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl\n+void setNextPixel(byte red, byte green, byte bleu, byte alpha)\n+Set the next pixel of the image.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by\n+bool flipVertically()\n+Flip pixel ordering.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b5\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00011_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00011_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYFileDataSource.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYJPGImageContext.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYFileDataSource.cpp
\n+
SILLYJPGImageContext.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYFileDataSource.cpp
\n-
3 created: 20 Jul 2006
\n+
2 filename: SILLYJPGImageContext.cpp
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Implementation of the FileDataSource methods
\n+
6 purpose: Definition of the JPGImageContext class methods
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,80 +80,109 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "SILLYFileDataSource.h"
\n+
34#include "loaders/SILLYJPGImageContext.h"
\n
35
\n
36#ifndef SILLY_OPT_INLINE
\n
37#define inline
\n-
38#include "SILLYFileDataSource.icpp"
\n+
38#include "loaders/SILLYJPGImageContext.icpp"
\n
39#undef inline
\n-
40#endif
\n-
41#include <stdio.h>
\n-
42// Start section of namespace SILLY
\n-
43namespace SILLY
\n-
44{
\n-
45
\n-
\n-
46FileDataSource::FileDataSource(const char* filename)
\n-
47 : d_error(true), d_bytes(0), d_size(0)
\n-
48{
\n-
49 FILE* data = fopen(filename, "rb");
\n-
50 if (data)
\n-
51 {
\n-
52 long status = fseek(data, 0, SEEK_END);
\n-
53 if (status == -1)
\n-
54 {
\n-
55 fclose(data);
\n-
56 return;
\n-
57 }
\n-
58 status = ftell(data);
\n-
59 if (status == -1)
\n-
60 {
\n-
61 fclose(data);
\n-
62 return;
\n-
63 }
\n-
64 d_size = status;
\n-
65 if (d_size)
\n-
66 d_bytes = new byte[d_size];
\n-
67 if (! d_bytes)
\n-
68 {
\n-
69 fclose(data);
\n-
70 return;
\n-
71 }
\n-
72 rewind(data);
\n-
73 status = fread(reinterpret_cast<void*>(d_bytes), 1, d_size, data);
\n-
74 if (status != d_size)
\n-
75 {
\n-
76 delete [] d_bytes;
\n-
77 d_bytes = 0;
\n-
78 fclose(data);
\n-
79 }
\n-
80 fclose(data);
\n-
81 d_error = false;
\n-
82 }
\n-
83}
\n+
40#endif
\n+
41
\n+
42#include <jpeglib.h>
\n+
43
\n+
44// Start section of namespace SILLY
\n+
\n+
45namespace SILLY
\n+
46{
\n+
47
\n+
48
\n+
49void JPG_init_source(j_decompress_ptr cinfo)
\n+
50{
\n+
51 // Nothing to do
\n+
52}
\n+
53
\n+
54boolean JPG_fill_input_buffer(j_decompress_ptr cinfo)
\n+
55{
\n+
56 JPGImageContext* jpg = reinterpret_cast<JPGImageContext*>(cinfo->client_data);
\n+
57 cinfo->src->next_input_byte = jpg->d_source->getDataPtr();
\n+
58 cinfo->src->bytes_in_buffer = jpg->d_source->getSize();
\n+
59 return TRUE;
\n+
60}
\n+
61
\n+
62void JPG_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
\n+
63{
\n+
64 if (num_bytes > 0)
\n+
65 {
\n+
66 cinfo->src->next_input_byte += (size_t)num_bytes;
\n+
67 cinfo->src->bytes_in_buffer -= (size_t)num_bytes;
\n+
68 }
\n+
69}
\n+
70
\n+
71void JPG_term_source(j_decompress_ptr cinfo)
\n+
72{
\n+
73 // Nothing to do
\n+
74}
\n+
75
\n+
76void JPG_error_exit(j_common_ptr cinfo)
\n+
77{
\n+
78 JPGImageContext* jpg = reinterpret_cast<JPGImageContext*>(cinfo->client_data);
\n+
79 // TODO
\n+
80 longjmp(jpg->setjmp_buffer, 1);
\n+
81
\n+
82}
\n+
83
\n+
84void JPG_emit_message(j_common_ptr cinfo, int msg_level)
\n+
85{
\n+
86 // Ignore
\n+
87}
\n+
88
\n+
89
\n+
90JPGImageContext::JPGImageContext()
\n+
91 : ImageContext(0, 0)
\n+
92{
\n+
93 src_mgr.bytes_in_buffer = 0;
\n+
94 src_mgr.next_input_byte = 0;
\n+
95 src_mgr.init_source = JPG_init_source;
\n+
96 src_mgr.fill_input_buffer = JPG_fill_input_buffer;
\n+
97 src_mgr.skip_input_data = JPG_skip_input_data;
\n+
98 src_mgr.resync_to_restart = jpeg_resync_to_restart;
\n+
99 src_mgr.term_source = JPG_term_source;
\n+
100 jpeg_create_decompress(&cinfo);
\n+
101 cinfo.src = &src_mgr;
\n+
102 cinfo.client_data = this;
\n+
103 cinfo.err = jpeg_std_error(&d_error_mgr);
\n+
104 d_error_mgr.error_exit = JPG_error_exit;
\n+
105
\n+
106}
\n+
107
\n+
108
\n+
109JPGImageContext::~JPGImageContext()
\n+
110{
\n+
111 jpeg_destroy_decompress(&cinfo);
\n+
112}
\n+
113
\n+
114
\n+
115void JPGImageContext::setImageSize()
\n+
116{
\n+
117 setWidth(cinfo.output_width);
\n+
118 setHeight(cinfo.output_height);
\n+
119}
\n+
120
\n+
121} // End section of namespace SILLY
\n
\n-
84
\n-
85
\n-
\n-\n-
87{
\n-
88 delete [] d_bytes;
\n-
89}
\n-
\n-
90
\n-
91
\n-
92} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n-
FileDataSource(const char *filename)
Create a data source from an existing file.
\n-\n+
Simple Image Loading LibrarY namespace.
\n+
Image Context for JPG image loader.
\n+
virtual size_t getSize() const =0
Return the size of the data.
\n+
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n-SILLYFileDataSource.cpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYJPGImageContext.cpp\n 1/***********************************************************************\n-2 filename: SILLYFileDataSource.cpp\n-3 created: 20 Jul 2006\n+2 filename: SILLYJPGImageContext.cpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Implementation of the FileDataSource methods\n+6 purpose: Definition of the JPGImageContext class methods\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -33,79 +34,114 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"SILLYFileDataSource.h\"\n+34#include \"loaders/SILLYJPGImageContext.h\"\n 35\n 36#ifndef SILLY_OPT_INLINE\n 37#define inline\n-38#include \"SILLYFileDataSource.icpp\"\n+38#include \"loaders/SILLYJPGImageContext.icpp\"\n 39#undef inline\n 40#endif\n-41#include \n-42// Start section of namespace SILLY\n-43namespace _\bS_\bI_\bL_\bL_\bY\n-44{\n-45\n-_\b4_\b6_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const char* filename)\n-47 : d_error(true), d_bytes(0), d_size(0)\n-48{\n-49 FILE* data = fopen(filename, \"rb\");\n-50 if (data)\n-51 {\n-52 long status = fseek(data, 0, SEEK_END);\n-53 if (status == -1)\n-54 {\n-55 fclose(data);\n-56 return;\n-57 }\n-58 status = ftell(data);\n-59 if (status == -1)\n-60 {\n-61 fclose(data);\n-62 return;\n-63 }\n-64 d_size = status;\n-65 if (d_size)\n-66 d_bytes = new byte[d_size];\n-67 if (! d_bytes)\n-68 {\n-69 fclose(data);\n-70 return;\n-71 }\n-72 rewind(data);\n-73 status = fread(reinterpret_cast(d_bytes), 1, d_size, data);\n-74 if (status != d_size)\n-75 {\n-76 delete [] d_bytes;\n-77 d_bytes = 0;\n-78 fclose(data);\n-79 }\n-80 fclose(data);\n-81 d_error = false;\n-82 }\n-83}\n-84\n-85\n-_\b8_\b6_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\b~_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be()\n-87{\n-88 delete [] d_bytes;\n-89}\n-90\n-91\n-92} // End section of namespace SILLY\n+41\n+42#include \n+43\n+44// Start section of namespace SILLY\n+_\b4_\b5namespace _\bS_\bI_\bL_\bL_\bY\n+46{\n+47\n+48\n+49void JPG_init_source(j_decompress_ptr cinfo)\n+50{\n+51 // Nothing to do\n+52}\n+53\n+54boolean JPG_fill_input_buffer(j_decompress_ptr cinfo)\n+55{\n+56 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = reinterpret_cast<_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(cinfo-\n+>client_data);\n+57 cinfo->src->next_input_byte = jpg->d_source->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br();\n+58 cinfo->src->bytes_in_buffer = jpg->d_source->_\bg_\be_\bt_\bS_\bi_\bz_\be();\n+59 return TRUE;\n+60}\n+61\n+62void JPG_skip_input_data(j_decompress_ptr cinfo, long num_bytes)\n+63{\n+64 if (num_bytes > 0)\n+65 {\n+66 cinfo->src->next_input_byte += (size_t)num_bytes;\n+67 cinfo->src->bytes_in_buffer -= (size_t)num_bytes;\n+68 }\n+69}\n+70\n+71void JPG_term_source(j_decompress_ptr cinfo)\n+72{\n+73 // Nothing to do\n+74}\n+75\n+76void JPG_error_exit(j_common_ptr cinfo)\n+77{\n+78 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = reinterpret_cast<_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(cinfo-\n+>client_data);\n+79 // TODO\n+80 longjmp(jpg->setjmp_buffer, 1);\n+81\n+82}\n+83\n+84void JPG_emit_message(j_common_ptr cinfo, int msg_level)\n+85{\n+86 // Ignore\n+87}\n+88\n+89\n+90JPGImageContext::JPGImageContext()\n+91 : _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(0, 0)\n+92{\n+93 src_mgr.bytes_in_buffer = 0;\n+94 src_mgr.next_input_byte = 0;\n+95 src_mgr.init_source = JPG_init_source;\n+96 src_mgr.fill_input_buffer = JPG_fill_input_buffer;\n+97 src_mgr.skip_input_data = JPG_skip_input_data;\n+98 src_mgr.resync_to_restart = jpeg_resync_to_restart;\n+99 src_mgr.term_source = JPG_term_source;\n+100 jpeg_create_decompress(&cinfo);\n+101 cinfo.src = &src_mgr;\n+102 cinfo.client_data = this;\n+103 cinfo.err = jpeg_std_error(&d_error_mgr);\n+104 d_error_mgr.error_exit = JPG_error_exit;\n+105\n+106}\n+107\n+108\n+109JPGImageContext::~JPGImageContext()\n+110{\n+111 jpeg_destroy_decompress(&cinfo);\n+112}\n+113\n+114\n+115void JPGImageContext::setImageSize()\n+116{\n+117 setWidth(cinfo.output_width);\n+118 setHeight(cinfo.output_height);\n+119}\n+120\n+121} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-FileDataSource(const char *filename)\n-Create a data source from an existing file.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\b~_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-~FileDataSource()\n-destructor\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bc_\bp_\bp_\b:_\b8_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Image Context for JPG image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b5_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n+virtual size_t getSize() const =0\n+Return the size of the data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n+virtual const byte * getDataPtr() const =0\n+Get raw access to the image data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Store the data needed by an ImageLoader object during the parsing of an image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00014_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00014_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImage.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYTGAImageContext.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYImage.cpp
\n+
SILLYTGAImageContext.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYImage.cpp
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYTGAImageContext.cpp
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Implementation of the Image class
\n+
6 purpose: Definition of the TGAImageContext methods
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,106 +80,31 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "SILLYImage.h"
\n+
34#include "loaders/SILLYTGAImageContext.h"
\n
35
\n
36#ifndef SILLY_OPT_INLINE
\n
37#define inline
\n-
38#include "SILLYImage.icpp"
\n+
38#include "loaders/SILLYTGAImageContext.icpp"
\n
39#undef inline
\n
40#endif
\n-
41#include "SILLYImageLoaderManager.h"
\n-
42
\n-
43
\n-
44// Start section of namespace SILLY
\n-
45namespace SILLY
\n-
46{
\n+
41#include <cstring>
\n+
42#include <cstdio>
\n+
43// Start section of namespace SILLY
\n+
44namespace SILLY
\n+
45{
\n+
46
\n
47
\n-
\n-\n-
49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader(0)
\n-
50{
\n-
51}
\n-
\n-
52
\n-
53
\n-
\n-\n-
55{
\n-
56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin();
\n-
57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() ; ++iter)
\n-
58 {
\n-
59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data);
\n-
60 if (d_imageContext)
\n-
61 d_imageLoader = (*iter);
\n-
62 }
\n-
63 assert((! d_imageLoader || d_imageContext) && "ASSERT: Internal state of image invalid");
\n-
64 return d_imageLoader != 0;
\n-
65
\n-
66}
\n-
\n-
67
\n-
\n-\n-
69{
\n-
70 switch (resultFormat)
\n-
71 {
\n-
72 case PF_A1B5G5R5:
\n-
73 d_bpp = 2;
\n-
74 break;
\n-
75 case PF_RGB:
\n-
76 d_bpp = 3;
\n-
77 break;
\n-
78
\n-
79 case PF_RGBA:
\n-
80 d_bpp = 4;
\n-
81 break;
\n-
82 //default:
\n-
83 // Unsupported format
\n-
84 };
\n-
85
\n-
86 if (! allocate())
\n-
87 {
\n-
88 return false;
\n-
89 }
\n-
90 d_imageContext->setDestination(d_pixels, getWidth() * getHeight() * d_bpp, resultFormat);
\n-
91
\n-
92 if (! d_imageLoader->loadImageData(order, d_data, d_imageContext))
\n-
93 {
\n-
94 delete [] d_pixels;
\n-
95 return false;
\n-
96 }
\n-
97 return true;
\n-
98}
\n-
\n-
99
\n-
100bool Image::allocate()
\n-
101{
\n-
102 delete [] d_pixels;
\n-
103 d_pixels = 0;
\n-
104 d_pixels = new byte[d_bpp * getWidth() * getHeight()];
\n-
105 return d_pixels != 0;
\n-
106}
\n-
107
\n-
108} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
This is an abstract class used to provide data to the loader.
\n-
Image(DataSource &data)
Constructor.
\n-
bool loadImageHeader()
Retrieve the information concerning the image object.
\n-
bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin origin=PO_TOP_LEFT)
Load the image pixels in memory and store them in resultFormat.
\n-
size_t getWidth() const
Retrieve the width of the image.
\n-
size_t getHeight() const
Retrieve the height of the image.
\n-
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
\n-
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
\n+
48
\n+
49} // End section of namespace SILLY
\n+
Simple Image Loading LibrarY namespace.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n-SILLYImage.cpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYTGAImageContext.cpp\n 1/***********************************************************************\n-2 filename: SILLYImage.cpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYTGAImageContext.cpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Implementation of the Image class\n+6 purpose: Definition of the TGAImageContext methods\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -33,128 +34,28 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"SILLYImage.h\"\n+34#include \"loaders/SILLYTGAImageContext.h\"\n 35\n 36#ifndef SILLY_OPT_INLINE\n 37#define inline\n-38#include \"SILLYImage.icpp\"\n+38#include \"loaders/SILLYTGAImageContext.icpp\"\n 39#undef inline\n 40#endif\n-41#include \"SILLYImageLoaderManager.h\"\n-42\n-43\n-44// Start section of namespace SILLY\n-45namespace _\bS_\bI_\bL_\bL_\bY\n-46{\n+41#include \n+42#include \n+43// Start section of namespace SILLY\n+44namespace _\bS_\bI_\bL_\bL_\bY\n+45{\n+46\n 47\n-_\b4_\b8_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bI_\bm_\ba_\bg_\be(_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be& source)\n-49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader\n-(0)\n-50{\n-51}\n-52\n-53\n-_\b5_\b4bool _\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bH_\be_\ba_\bd_\be_\br()\n-55{\n-56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin();\n-57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() ;\n-++iter)\n-58 {\n-59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data);\n-60 if (d_imageContext)\n-61 d_imageLoader = (*iter);\n-62 }\n-63 assert((! d_imageLoader || d_imageContext) && \"ASSERT: Internal state of\n-image invalid\");\n-64 return d_imageLoader != 0;\n-65\n-66}\n-67\n-_\b6_\b8bool _\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt resultFormat, _\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn order)\n-69{\n-70 switch (resultFormat)\n-71 {\n-72 case PF_A1B5G5R5:\n-73 d_bpp = 2;\n-74 break;\n-75 case PF_RGB:\n-76 d_bpp = 3;\n-77 break;\n-78\n-79 case PF_RGBA:\n-80 d_bpp = 4;\n-81 break;\n-82 //default:\n-83 // Unsupported format\n-84 };\n-85\n-86 if (! allocate())\n-87 {\n-88 return false;\n-89 }\n-90 d_imageContext->_\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn(d_pixels, _\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh() * _\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt() * d_bpp,\n-resultFormat);\n-91\n-92 if (! d_imageLoader->_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(order, d_data, d_imageContext))\n-93 {\n-94 delete [] d_pixels;\n-95 return false;\n-96 }\n-97 return true;\n-98}\n-99\n-100bool Image::allocate()\n-101{\n-102 delete [] d_pixels;\n-103 d_pixels = 0;\n-104 d_pixels = new byte[d_bpp * _\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh() * _\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt()];\n-105 return d_pixels != 0;\n-106}\n-107\n-108} // End section of namespace SILLY\n+48\n+49} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat\n-List all pixel format supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n-PixelOrigin\n-List all pixel origin supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bI_\bm_\ba_\bg_\be\n-Image(DataSource &data)\n-Constructor.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bc_\bp_\bp_\b:_\b4_\b8\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bH_\be_\ba_\bd_\be_\br\n-bool loadImageHeader()\n-Retrieve the information concerning the image object.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bc_\bp_\bp_\b:_\b5_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n-bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin\n-origin=PO_TOP_LEFT)\n-Load the image pixels in memory and store them in resultFormat.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bc_\bp_\bp_\b:_\b6_\b8\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh\n-size_t getWidth() const\n-Retrieve the width of the image.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt\n-size_t getHeight() const\n-Retrieve the height of the image.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn\n-void setDestination(byte *pixels, size_t length, PixelFormat format)\n-Set the destination of the loading.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n-virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext\n-*context)=0\n-Parse the pixels data of the image and fill the header struct.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00017_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00017_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYTGAImageLoader.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageLoader.cpp Source File\n \n \n \n \n \n \n
\n@@ -44,23 +44,23 @@\n \n \n
\n
\n-
SILLYTGAImageLoader.cpp
\n+
SILLYPNGImageLoader.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYTGAImageLoader.cpp
\n+
2 filename: SILLYPNGImageLoader.cpp
\n
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n+
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Load TGA Image
\n+
6 purpose: Definition of the PNGImageLoader methods
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -78,313 +78,200 @@\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n-
32#endif
\n-
33
\n-
34#include "loaders/SILLYTGAImageLoader.h"
\n-
35
\n-
36#ifndef SILLY_OPT_INLINE
\n-
37#define inline
\n-
38#include "loaders/SILLYTGAImageLoader.icpp"
\n-
39#undef inline
\n-
40#endif
\n-
41#include "SILLYDataSource.h"
\n-
42#include "loaders/SILLYTGAImageContext.h"
\n-
43
\n-
44#include <cstring>
\n-
45#include <cstdio>
\n-
46
\n-
47// Start section of namespace SILLY
\n-
48namespace SILLY
\n+
32#include <string.h>
\n+
33#endif
\n+
34
\n+
35#include "loaders/SILLYPNGImageLoader.h"
\n+
36
\n+
37#ifndef SILLY_OPT_INLINE
\n+
38#define inline
\n+
39#include "loaders/SILLYPNGImageLoader.icpp"
\n+
40#undef inline
\n+
41#endif
\n+
42
\n+
43#include "loaders/SILLYPNGImageContext.h"
\n+
44#include <png.h>
\n+
45// Start section of namespace SILLY
\n+
46namespace SILLY
\n+
47{
\n+
48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t length)
\n
49{
\n-
50
\n-
51TGAImageLoader::TGAImageLoader()
\n-
52 : ImageLoader("TGA Image loader (builtin)")
\n-
53{
\n-
54}
\n-
55
\n-
56TGAImageLoader::~TGAImageLoader()
\n-
57{
\n-
58}
\n-
59
\n-
60#ifdef SILLY_BE
\n-
61#define READ_WORD(res, start) \\
\n-
62 (res) = 0; \\
\n-
63 (res) = data->getDataPtr()[(start) + 1]; \\
\n-
64 (res) = (res) << 8; \\
\n-
65 (res) |= data->getDataPtr()[(start)];
\n-
66#else
\n-
67#define READ_WORD(res, start) \\
\n-
68 (res) = 0; \\
\n-
69 (res) = data->getDataPtr()[(start)]; \\
\n-
70 (res) = (res) << 8; \\
\n-
71 (res) |= data->getDataPtr()[(start) + 1];
\n-
72#endif
\n-
73
\n-
\n-
74ImageContext* TGAImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
\n-
75{
\n-
76 byte idLength = data->getDataPtr()[0];
\n-
77 byte colorMapType = data->getDataPtr()[1];
\n-
78 byte imageType = data->getDataPtr()[2];
\n-
79 size_t width;
\n-
80 size_t height;
\n-
81 byte depth;
\n-
82 byte description;
\n-
83 if ((imageType != 2 && imageType != 10) || colorMapType)
\n-
84 {
\n-
85 // Unsupported image format
\n-
86 return 0;
\n-
87 }
\n-
88 // offset: 3 Skip color map + 5 bytes
\n-
89 // offset: 8 Skip xorg / yorg + 4 bytes
\n-
90#ifdef SILLY_BE
\n-
91 width = data->getDataPtr()[12];
\n-
92 width = width << 8;
\n-
93 width |= data->getDataPtr()[13];
\n-
94 height = data->getDataPtr()[14];
\n-
95 height = height << 8;
\n-
96 height |= data->getDataPtr()[15];
\n-
97#else
\n-
98 width = data->getDataPtr()[13];
\n-
99 width = width << 8;
\n-
100 width |= data->getDataPtr()[12];
\n-
101 height = data->getDataPtr()[15];
\n-
102 height = height << 8;
\n-
103 height |= data->getDataPtr()[14];
\n-
104#endif
\n-
105 depth = data->getDataPtr()[16] >> 3;
\n-
106 switch (depth)
\n-
107 {
\n-
108 case 2:
\n-
109 formatSource = PF_A1B5G5R5;
\n-
110 break;
\n-
111 case 3:
\n-
112 formatSource = PF_RGB;
\n-
113 break;
\n-
114 case 4:
\n-
115 formatSource = PF_RGBA;
\n-
116 break;
\n-
117 default:
\n-
118 return 0;
\n-
119 }
\n-
120 description = (*data)[17];
\n-
121
\n-
122
\n-
123 TGAImageContext* context = new TGAImageContext(width, height);
\n-
124 if (context)
\n-
125 {
\n-
126 context->d_idLength = idLength;
\n-
127 context->d_imageType = imageType;
\n-
128 context->d_depth = depth;
\n-
129 context->d_description = description;
\n-
130 }
\n-
131 return context;
\n-
132}
\n+
50 PNGImageContext* png = reinterpret_cast<PNGImageContext*>(png_get_io_ptr(png_ptr));
\n+
51 int readed = png->read(data, length);
\n+
52 if (readed != (int)length)
\n+
53 {
\n+
54 png_error(png_ptr, "PNG_read_function error");
\n+
55 }
\n+
56}
\n+
57
\n+
58void PNG_warning_function(png_structp png_ptr,
\n+
59 png_const_charp error)
\n+
60{
\n+
61// printf("PNG Warning: %s\\n", error);
\n+
62}
\n+
63
\n+
64void PNG_error_function(png_structp png_ptr,
\n+
65 png_const_charp error)
\n+
66{
\n+
67 // printf("PNG Error: %s\\n", error);
\n+
68 // copied from libpng's pngerror.cpp
\n+
69 jmp_buf buf;
\n+
70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
\n+
71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf));
\n+
72#else
\n+
73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
\n+
74#endif
\n+
75 longjmp(buf, 1);
\n+
76}
\n+
77
\n+
78
\n+
79PNGImageLoader::PNGImageLoader()
\n+
80 : ImageLoader("PNG Image Loader based on libpng")
\n+
81{
\n+
82}
\n+
83PNGImageLoader::~PNGImageLoader()
\n+
84{
\n+
85}
\n+
86
\n+
87
\n+
\n+
88ImageContext* PNGImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
\n+
89{
\n+
90 PNGImageContext* png = new PNGImageContext(data);
\n+
91 if (!png)
\n+
92 {
\n+
93 return 0;
\n+
94
\n+
95 }
\n+
96 // Prepare png loading
\n+
97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
\n+
98 if (png->d_png_ptr == 0)
\n+
99 {
\n+
100 delete png;
\n+
101 return 0;
\n+
102 }
\n+
103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr);
\n+
104 if (png->d_info_ptr == 0)
\n+
105 {
\n+
106 delete png;
\n+
107 return 0;
\n+
108 }
\n+
109 if (setjmp(png_jmpbuf(png->d_png_ptr)))
\n+
110 {
\n+
111 delete png;
\n+
112 return 0;
\n+
113 }
\n+
114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function, PNG_warning_function);
\n+
115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function);
\n+
116 //png_set_sig_bytes(png->d_png_ptr, 8);
\n+
117
\n+
118
\n+
119
\n+
120 // Read header Check whether PNG can depaletize transparently or not
\n+
121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND;
\n+
122 //printf("Start reading png\\n");
\n+
123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0);
\n+
124 png->setImageSize();
\n+
125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr);
\n+
126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr);
\n+
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);
\n+
128 if (png->d_bit_depth == 8)
\n+
129 {
\n+
130 if (png->d_num_channels == 4)
\n+
131 {
\n+
132 formatSource = PF_RGBA;
\n+
133 }
\n+
134 else if (png->d_num_channels == 3)
\n+
135 {
\n+
136 formatSource = PF_RGB;
\n+
137 }
\n+
138 else
\n+
139 {
\n+
140 delete png;
\n+
141 return 0;
\n+
142 }
\n+
143 }
\n+
144 // Paletized or grayscale not yet handled
\n+
145 else
\n+
146 {
\n+
147 delete png;
\n+
148 return 0;
\n+
149 }
\n+
150 return png;
\n+
151}
\n
\n-
133
\n-
\n-
134bool TGAImageLoader::loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context)
\n-
135{
\n-
136 TGAImageContext* tga = static_cast<TGAImageContext*>(context);
\n-
137 size_t bpp = tga->d_depth;
\n-
138 size_t w = tga->getWidth();
\n-
139 size_t h = tga->getHeight();
\n-
140 size_t imgSize = w * h * bpp;
\n-
141 size_t offset = 18 + tga->d_idLength;
\n-
142 size_t numPixels = w * h;
\n-
143 const byte* input = data->getDataPtr() + offset;
\n-
144 // Read image data
\n-
145 byte red;
\n-
146 byte green;
\n-
147 byte blue;
\n-
148 byte alpha;
\n-
149 // Uncompressed
\n-
150 if (tga->d_imageType == 2)
\n-
151 {
\n-
152
\n-
153 switch(bpp)
\n-
154 {
\n-
155 case 2: //A1B5G5R5
\n-
156 for(size_t i = 0 ; i < numPixels ; ++i)
\n-
157 {
\n-
158 unsigned short pixel;
\n-
159 pixel = *(input++);
\n-
160 pixel = pixel << 8;
\n-
161 pixel |= *(input++);
\n-
162
\n-
163 alpha = pixel & 0xf000 ? 0xff : 0x00;
\n-
164 blue = static_cast<byte>((pixel & 0x1f) << 3);
\n-
165 green = static_cast<byte>(((pixel >> 5) & 0x1f) << 3);
\n-
166 red = static_cast<byte>(((pixel >> 10) & 0x1f) << 3);
\n-
167 context->setNextPixel(red, green, blue, alpha);
\n-
168 }
\n-
169 break;
\n-
170
\n-
171 case 3: // BGR_24
\n-
172 alpha = 0xff;
\n-
173 for(size_t i = 0 ; i < numPixels ; ++i)
\n-
174 {
\n-
175 blue = *(input++);
\n-
176 green = *(input++);
\n-
177 red = *(input++);
\n-
178 context->setNextPixel(red, green, blue, alpha);
\n-
179 }
\n-
180 break;
\n-
181
\n-
182 case 4: // BGRA_32
\n-
183 alpha = 0xff;
\n-
184 for(size_t i = 0 ; i < numPixels ; ++i)
\n-
185 {
\n-
186 blue = *(input++);
\n-
187 green = *(input++);
\n-
188 red = *(input++);
\n-
189 alpha = *(input++);
\n-
190 context->setNextPixel(red, green, blue, alpha);
\n-
191 }
\n-
192 break;
\n-
193 }
\n-
194 }
\n-
195 else
\n-
196 {
\n-
197 size_t pixelsRead = 0;
\n-
198 size_t num, i;
\n-
199 byte header;
\n-
200
\n-
201 switch(bpp)
\n-
202 {
\n-
203 case 2: //A1B5G5R5
\n-
204 while(pixelsRead < numPixels)
\n-
205 {
\n-
206 header = *(input++);
\n-
207 num = 1 + (header & 0x7f);
\n-
208 if (header & 0x80)
\n-
209 {
\n-
210 unsigned short pixel;
\n-
211 pixel = *(input++);
\n-
212 pixel = pixel << 8;
\n-
213 pixel |= *(input++);
\n-
214
\n-
215 alpha = pixel & 0xf000 ? 0xff : 0x00;
\n-
216 blue = static_cast<byte>((pixel & 0x1f) << 3);
\n-
217 green = static_cast<byte>(((pixel >> 5) & 0x1f) << 3);
\n-
218 red = static_cast<byte>(((pixel >> 10) & 0x1f) << 3);
\n-
219 for(i = 0 ; i < num ; ++i)
\n-
220 {
\n-
221 context->setNextPixel(red, green, blue, alpha);
\n-
222 }
\n-
223 }
\n-
224 else
\n-
225 {
\n-
226 for (i = 0 ; i < num ; ++i)
\n-
227 {
\n-
228 unsigned short pixel;
\n-
229 pixel = *(input++);
\n-
230 pixel = pixel << 8;
\n-
231 pixel |= *(input++);
\n-
232 alpha = pixel & 0xf000 ? 0xff : 0x00;
\n-
233 blue = static_cast<byte>((pixel & 0x1f) << 3);
\n-
234 green = static_cast<byte>(((pixel >> 5) & 0x1f) << 3);
\n-
235 red = static_cast<byte>(((pixel >> 10) & 0x1f) << 3);
\n-
236 context->setNextPixel(red, green, blue, alpha);
\n-
237 }
\n-
238 }
\n-
239 pixelsRead += num;
\n-
240 }
\n-
241
\n-
242 break;
\n-
243 case 3:
\n-
244 alpha = 0xff;
\n-
245 while(pixelsRead < numPixels)
\n-
246 {
\n-
247 header = *(input++);
\n-
248 num = 1 + (header & 0x7f);
\n-
249 if (header & 0x80)
\n-
250 {
\n-
251 blue = *(input++);
\n-
252 green = *(input++);
\n-
253 red = *(input++);
\n-
254 for(i = 0 ; i < num ; ++i)
\n-
255 {
\n-
256 context->setNextPixel(red, green, blue, alpha);
\n-
257 }
\n-
258 }
\n-
259 else
\n-
260 {
\n-
261 for (i = 0 ; i < num ; ++i)
\n-
262 {
\n-
263 blue = *(input++);
\n-
264 green = *(input++);
\n-
265 red = *(input++);
\n-
266 context->setNextPixel(red, green, blue, alpha);
\n-
267 }
\n-
268 }
\n-
269 pixelsRead += num;
\n-
270 }
\n-
271 break;
\n-
272
\n-
273 case 4:
\n-
274 while(pixelsRead < numPixels)
\n-
275 {
\n-
276 header = *(input++);
\n-
277 num = 1 + (header & 0x7f);
\n-
278 if (header & 0x80)
\n-
279 {
\n-
280 blue = *(input++);
\n-
281 green = *(input++);
\n-
282 red = *(input++);
\n-
283 alpha = *(input++);
\n-
284 for(i = 0 ; i < num ; ++i)
\n-
285 {
\n-
286 context->setNextPixel(red, green, blue, alpha);
\n-
287 }
\n-
288 }
\n-
289 else
\n-
290 {
\n-
291 for (i = 0 ; i < num ; ++i)
\n-
292 {
\n-
293 blue = *(input++);
\n-
294 green = *(input++);
\n-
295 red = *(input++);
\n-
296 alpha = *(input++);
\n-
297 context->setNextPixel(red, green, blue, alpha);
\n-
298 }
\n-
299 }
\n-
300 pixelsRead += num;
\n-
301 }
\n-
302 break;
\n-
303 }
\n-
304 }
\n-
305 // Flip or not flip that is the question
\n-
306 if ((tga->d_description & 0x10) == 0x10) // Upper Left origin
\n-
307 {
\n-
308 if (origin == PO_BOTTOM_LEFT)
\n-
309 return tga->flipVertically();
\n-
310 }
\n-
311 else
\n-
312 {
\n-
313 if (origin == PO_TOP_LEFT)
\n-
314 return tga->flipVertically();
\n-
315 }
\n-
316 return true;
\n-
317}
\n+
152
\n+
153
\n+
\n+
154bool PNGImageLoader::loadImageData(PixelOrigin origin,
\n+
155 DataSource* data,
\n+
156 ImageContext* context)
\n+
157{
\n+
158 PNGImageContext* png = static_cast<PNGImageContext*>(context);
\n+
159 byte red;
\n+
160 byte green;
\n+
161 byte blue;
\n+
162 byte alpha;
\n+
163 size_t width = png->getWidth();
\n+
164 size_t height = png->getHeight();
\n+
165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr);
\n+
166 if (png->d_bit_depth == 8)
\n+
167 {
\n+
168 // Read RGBA
\n+
169 if (png->d_num_channels == 4)
\n+
170 {
\n+
171 for (size_t j = 0 ; j < height ; ++j)
\n+
172 {
\n+
173 for(size_t i = 0 ; i < width ; ++i)
\n+
174 {
\n+
175 size_t pixel_offset = 4 * i;
\n+
176 red = *(row_pointers[j] + pixel_offset);
\n+
177 green = *(row_pointers[j] + pixel_offset + 1);
\n+
178 blue = *(row_pointers[j] + pixel_offset + 2);
\n+
179 alpha = *(row_pointers[j] + pixel_offset + 3);
\n+
180 png->setNextPixel(red, green, blue, alpha);
\n+
181 }
\n+
182 }
\n+
183 }
\n+
184 else if (png->d_num_channels == 3)
\n+
185 {
\n+
186 alpha = 0xff;
\n+
187 for (size_t j = 0 ; j < height ; ++j)
\n+
188 {
\n+
189 for(size_t i = 0 ; i < width ; ++i)
\n+
190 {
\n+
191 size_t pixel_offset = 3 * i;
\n+
192 red = *(row_pointers[j] + pixel_offset);
\n+
193 green = *(row_pointers[j] + pixel_offset + 1);
\n+
194 blue = *(row_pointers[j] + pixel_offset + 2);
\n+
195 png->setNextPixel(red, green, blue, alpha);
\n+
196 }
\n+
197 }
\n+
198
\n+
199 }
\n+
200 }
\n+
201 if (origin == PO_BOTTOM_LEFT)
\n+
202 return png->flipVertically();
\n+
203
\n+
204 return true;
\n+
205}
\n
\n-
318
\n-
319} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
Image Context for Targa image.
\n-
This is an abstract class used to provide data to the loader.
\n-
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
206
\n+
207} // End section of namespace SILLY
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
Image Context for PNG Image Loader.
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
\n
bool flipVertically()
Flip pixel ordering.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYTGAImageLoader.cpp\n+SILLYPNGImageLoader.cpp\n 1/***********************************************************************\n-2 filename: SILLYTGAImageLoader.cpp\n+2 filename: SILLYPNGImageLoader.cpp\n 3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Load TGA Image\n+6 purpose: Definition of the PNGImageLoader methods\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -32,324 +32,212 @@\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n-32#endif\n-33\n-34#include \"loaders/SILLYTGAImageLoader.h\"\n-35\n-36#ifndef SILLY_OPT_INLINE\n-37#define inline\n-38#include \"loaders/SILLYTGAImageLoader.icpp\"\n-39#undef inline\n-40#endif\n-41#include \"SILLYDataSource.h\"\n-42#include \"loaders/SILLYTGAImageContext.h\"\n-43\n-44#include \n-45#include \n-46\n-47// Start section of namespace SILLY\n-48namespace _\bS_\bI_\bL_\bL_\bY\n+32#include \n+33#endif\n+34\n+35#include \"loaders/SILLYPNGImageLoader.h\"\n+36\n+37#ifndef SILLY_OPT_INLINE\n+38#define inline\n+39#include \"loaders/SILLYPNGImageLoader.icpp\"\n+40#undef inline\n+41#endif\n+42\n+43#include \"loaders/SILLYPNGImageContext.h\"\n+44#include \n+45// Start section of namespace SILLY\n+46namespace _\bS_\bI_\bL_\bL_\bY\n+47{\n+48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t\n+length)\n 49{\n-50\n-51TGAImageLoader::TGAImageLoader()\n-52 : ImageLoader(\"TGA Image loader (builtin)\")\n-53{\n-54}\n-55\n-56TGAImageLoader::~TGAImageLoader()\n-57{\n-58}\n-59\n-60#ifdef SILLY_BE\n-61#define READ_WORD(res, start) \\\n-62 (res) = 0; \\\n-63 (res) = data->getDataPtr()[(start) + 1]; \\\n-64 (res) = (res) << 8; \\\n-65 (res) |= data->getDataPtr()[(start)];\n-66#else\n-67#define READ_WORD(res, start) \\\n-68 (res) = 0; \\\n-69 (res) = data->getDataPtr()[(start)]; \\\n-70 (res) = (res) << 8; \\\n-71 (res) |= data->getDataPtr()[(start) + 1];\n-72#endif\n-73\n-_\b7_\b4_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* TGAImageLoader::loadHeader(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource,\n+50 PNGImageContext* png = reinterpret_cast(png_get_io_ptr\n+(png_ptr));\n+51 int readed = png->read(data, length);\n+52 if (readed != (int)length)\n+53 {\n+54 png_error(png_ptr, \"PNG_read_function error\");\n+55 }\n+56}\n+57\n+58void PNG_warning_function(png_structp png_ptr,\n+59 png_const_charp error)\n+60{\n+61// printf(\"PNG Warning: %s\\n\", error);\n+62}\n+63\n+64void PNG_error_function(png_structp png_ptr,\n+65 png_const_charp error)\n+66{\n+67 // printf(\"PNG Error: %s\\n\", error);\n+68 // copied from libpng's pngerror.cpp\n+69 jmp_buf buf;\n+70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4\n+71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf));\n+72#else\n+73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));\n+74#endif\n+75 longjmp(buf, 1);\n+76}\n+77\n+78\n+79PNGImageLoader::PNGImageLoader()\n+80 : ImageLoader(\"PNG Image Loader based on libpng\")\n+81{\n+82}\n+83PNGImageLoader::~PNGImageLoader()\n+84{\n+85}\n+86\n+87\n+_\b8_\b8_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* PNGImageLoader::loadHeader(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource,\n _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data)\n-75{\n-76 byte idLength = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[0];\n-77 byte colorMapType = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[1];\n-78 byte imageType = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[2];\n-79 size_t width;\n-80 size_t height;\n-81 byte depth;\n-82 byte description;\n-83 if ((imageType != 2 && imageType != 10) || colorMapType)\n-84 {\n-85 // Unsupported image format\n-86 return 0;\n-87 }\n-88 // offset: 3 Skip color map + 5 bytes\n-89 // offset: 8 Skip xorg / yorg + 4 bytes\n-90#ifdef SILLY_BE\n-91 width = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[12];\n-92 width = width << 8;\n-93 width |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[13];\n-94 height = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[14];\n-95 height = height << 8;\n-96 height |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[15];\n-97#else\n-98 width = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[13];\n-99 width = width << 8;\n-100 width |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[12];\n-101 height = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[15];\n-102 height = height << 8;\n-103 height |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[14];\n-104#endif\n-105 depth = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[16] >> 3;\n-106 switch (depth)\n-107 {\n-108 case 2:\n-109 formatSource = PF_A1B5G5R5;\n-110 break;\n-111 case 3:\n-112 formatSource = PF_RGB;\n-113 break;\n-114 case 4:\n-115 formatSource = PF_RGBA;\n-116 break;\n-117 default:\n-118 return 0;\n-119 }\n-120 description = (*data)[17];\n-121\n-122\n-123 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context = new _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(width, height);\n-124 if (context)\n-125 {\n-126 context->d_idLength = idLength;\n-127 context->d_imageType = imageType;\n-128 context->d_depth = depth;\n-129 context->d_description = description;\n-130 }\n-131 return context;\n-132}\n-133\n-_\b1_\b3_\b4bool TGAImageLoader::loadImageData(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n-_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n-135{\n-136 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* tga = static_cast<_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(context);\n-137 size_t bpp = tga->d_depth;\n-138 size_t w = tga->getWidth();\n-139 size_t h = tga->getHeight();\n-140 size_t imgSize = w * h * bpp;\n-141 size_t offset = 18 + tga->d_idLength;\n-142 size_t numPixels = w * h;\n-143 const byte* input = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() + offset;\n-144 // Read image data\n-145 byte red;\n-146 byte green;\n-147 byte blue;\n-148 byte alpha;\n-149 // Uncompressed\n-150 if (tga->d_imageType == 2)\n-151 {\n+89{\n+90 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* png = new _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(data);\n+91 if (!png)\n+92 {\n+93 return 0;\n+94\n+95 }\n+96 // Prepare png loading\n+97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);\n+98 if (png->d_png_ptr == 0)\n+99 {\n+100 delete png;\n+101 return 0;\n+102 }\n+103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr);\n+104 if (png->d_info_ptr == 0)\n+105 {\n+106 delete png;\n+107 return 0;\n+108 }\n+109 if (setjmp(png_jmpbuf(png->d_png_ptr)))\n+110 {\n+111 delete png;\n+112 return 0;\n+113 }\n+114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function,\n+PNG_warning_function);\n+115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function);\n+116 //png_set_sig_bytes(png->d_png_ptr, 8);\n+117\n+118\n+119\n+120 // Read header Check whether PNG can depaletize transparently or not\n+121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND;\n+122 //printf(\"Start reading png\\n\");\n+123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0);\n+124 png->setImageSize();\n+125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr);\n+126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr);\n+127 //printf(\"PNG Info: width: %d height: %d bpp: %d channels: %d\\n\", png-\n+>getWidth(), png->getHeight(), png->d_bit_depth, png->d_num_channels);\n+128 if (png->d_bit_depth == 8)\n+129 {\n+130 if (png->d_num_channels == 4)\n+131 {\n+132 formatSource = PF_RGBA;\n+133 }\n+134 else if (png->d_num_channels == 3)\n+135 {\n+136 formatSource = PF_RGB;\n+137 }\n+138 else\n+139 {\n+140 delete png;\n+141 return 0;\n+142 }\n+143 }\n+144 // Paletized or grayscale not yet handled\n+145 else\n+146 {\n+147 delete png;\n+148 return 0;\n+149 }\n+150 return png;\n+151}\n 152\n-153 switch(bpp)\n-154 {\n-155 case 2: //A1B5G5R5\n-156 for(size_t i = 0 ; i < numPixels ; ++i)\n-157 {\n-158 unsigned short pixel;\n-159 pixel = *(input++);\n-160 pixel = pixel << 8;\n-161 pixel |= *(input++);\n-162\n-163 alpha = pixel & 0xf000 ? 0xff : 0x00;\n-164 blue = static_cast((pixel & 0x1f) << 3);\n-165 green = static_cast(((pixel >> 5) & 0x1f) << 3);\n-166 red = static_cast(((pixel >> 10) & 0x1f) << 3);\n-167 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-168 }\n-169 break;\n-170\n-171 case 3: // BGR_24\n-172 alpha = 0xff;\n-173 for(size_t i = 0 ; i < numPixels ; ++i)\n+153\n+_\b1_\b5_\b4bool PNGImageLoader::loadImageData(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n+155 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n+156 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n+157{\n+158 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* png = static_cast<_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(context);\n+159 byte red;\n+160 byte green;\n+161 byte blue;\n+162 byte alpha;\n+163 size_t width = png->getWidth();\n+164 size_t height = png->getHeight();\n+165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr);\n+166 if (png->d_bit_depth == 8)\n+167 {\n+168 // Read RGBA\n+169 if (png->d_num_channels == 4)\n+170 {\n+171 for (size_t j = 0 ; j < height ; ++j)\n+172 {\n+173 for(size_t i = 0 ; i < width ; ++i)\n 174 {\n-175 blue = *(input++);\n-176 green = *(input++);\n-177 red = *(input++);\n-178 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-179 }\n-180 break;\n-181\n-182 case 4: // BGRA_32\n-183 alpha = 0xff;\n-184 for(size_t i = 0 ; i < numPixels ; ++i)\n+175 size_t pixel_offset = 4 * i;\n+176 red = *(row_pointers[j] + pixel_offset);\n+177 green = *(row_pointers[j] + pixel_offset + 1);\n+178 blue = *(row_pointers[j] + pixel_offset + 2);\n+179 alpha = *(row_pointers[j] + pixel_offset + 3);\n+180 png->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+181 }\n+182 }\n+183 }\n+184 else if (png->d_num_channels == 3)\n 185 {\n-186 blue = *(input++);\n-187 green = *(input++);\n-188 red = *(input++);\n-189 alpha = *(input++);\n-190 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-191 }\n-192 break;\n-193 }\n-194 }\n-195 else\n-196 {\n-197 size_t pixelsRead = 0;\n-198 size_t num, i;\n-199 byte header;\n-200\n-201 switch(bpp)\n-202 {\n-203 case 2: //A1B5G5R5\n-204 while(pixelsRead < numPixels)\n-205 {\n-206 header = *(input++);\n-207 num = 1 + (header & 0x7f);\n-208 if (header & 0x80)\n-209 {\n-210 unsigned short pixel;\n-211 pixel = *(input++);\n-212 pixel = pixel << 8;\n-213 pixel |= *(input++);\n-214\n-215 alpha = pixel & 0xf000 ? 0xff : 0x00;\n-216 blue = static_cast((pixel & 0x1f) << 3);\n-217 green = static_cast(((pixel >> 5) & 0x1f) << 3);\n-218 red = static_cast(((pixel >> 10) & 0x1f) << 3);\n-219 for(i = 0 ; i < num ; ++i)\n-220 {\n-221 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-222 }\n-223 }\n-224 else\n-225 {\n-226 for (i = 0 ; i < num ; ++i)\n-227 {\n-228 unsigned short pixel;\n-229 pixel = *(input++);\n-230 pixel = pixel << 8;\n-231 pixel |= *(input++);\n-232 alpha = pixel & 0xf000 ? 0xff : 0x00;\n-233 blue = static_cast((pixel & 0x1f) << 3);\n-234 green = static_cast(((pixel >> 5) & 0x1f) << 3);\n-235 red = static_cast(((pixel >> 10) & 0x1f) << 3);\n-236 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-237 }\n-238 }\n-239 pixelsRead += num;\n-240 }\n-241\n-242 break;\n-243 case 3:\n-244 alpha = 0xff;\n-245 while(pixelsRead < numPixels)\n-246 {\n-247 header = *(input++);\n-248 num = 1 + (header & 0x7f);\n-249 if (header & 0x80)\n-250 {\n-251 blue = *(input++);\n-252 green = *(input++);\n-253 red = *(input++);\n-254 for(i = 0 ; i < num ; ++i)\n-255 {\n-256 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-257 }\n-258 }\n-259 else\n-260 {\n-261 for (i = 0 ; i < num ; ++i)\n-262 {\n-263 blue = *(input++);\n-264 green = *(input++);\n-265 red = *(input++);\n-266 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-267 }\n-268 }\n-269 pixelsRead += num;\n-270 }\n-271 break;\n-272\n-273 case 4:\n-274 while(pixelsRead < numPixels)\n-275 {\n-276 header = *(input++);\n-277 num = 1 + (header & 0x7f);\n-278 if (header & 0x80)\n-279 {\n-280 blue = *(input++);\n-281 green = *(input++);\n-282 red = *(input++);\n-283 alpha = *(input++);\n-284 for(i = 0 ; i < num ; ++i)\n-285 {\n-286 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-287 }\n-288 }\n-289 else\n-290 {\n-291 for (i = 0 ; i < num ; ++i)\n-292 {\n-293 blue = *(input++);\n-294 green = *(input++);\n-295 red = *(input++);\n-296 alpha = *(input++);\n-297 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-298 }\n-299 }\n-300 pixelsRead += num;\n-301 }\n-302 break;\n-303 }\n-304 }\n-305 // Flip or not flip that is the question\n-306 if ((tga->d_description & 0x10) == 0x10) // Upper Left origin\n-307 {\n-308 if (origin == PO_BOTTOM_LEFT)\n-309 return tga->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n-310 }\n-311 else\n-312 {\n-313 if (origin == PO_TOP_LEFT)\n-314 return tga->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n-315 }\n-316 return true;\n-317}\n-318\n-319} // End section of namespace SILLY\n+186 alpha = 0xff;\n+187 for (size_t j = 0 ; j < height ; ++j)\n+188 {\n+189 for(size_t i = 0 ; i < width ; ++i)\n+190 {\n+191 size_t pixel_offset = 3 * i;\n+192 red = *(row_pointers[j] + pixel_offset);\n+193 green = *(row_pointers[j] + pixel_offset + 1);\n+194 blue = *(row_pointers[j] + pixel_offset + 2);\n+195 png->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+196 }\n+197 }\n+198\n+199 }\n+200 }\n+201 if (origin == PO_BOTTOM_LEFT)\n+202 return png->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n+203\n+204 return true;\n+205}\n+206\n+207} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n PixelFormat\n List all pixel format supported.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n PixelOrigin\n List all pixel origin supported.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Image Context for Targa image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b3\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Image Context for PNG Image Loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b6\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n This is an abstract class used to provide data to the loader.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n-virtual const byte * getDataPtr() const =0\n-Get raw access to the image data.\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n Store the data needed by an ImageLoader object during the parsing of an image.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl\n void setNextPixel(byte red, byte green, byte bleu, byte alpha)\n Set the next pixel of the image.\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00020_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00020_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageLoader.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYTGAImageLoader.cpp Source File\n \n \n \n \n \n \n
\n@@ -44,23 +44,23 @@\n \n \n
\n
\n-
SILLYPNGImageLoader.cpp
\n+
SILLYTGAImageLoader.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYPNGImageLoader.cpp
\n+
2 filename: SILLYTGAImageLoader.cpp
\n
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n+
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Definition of the PNGImageLoader methods
\n+
6 purpose: Load TGA Image
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -78,200 +78,313 @@\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n-
32#include <string.h>
\n-
33#endif
\n-
34
\n-
35#include "loaders/SILLYPNGImageLoader.h"
\n-
36
\n-
37#ifndef SILLY_OPT_INLINE
\n-
38#define inline
\n-
39#include "loaders/SILLYPNGImageLoader.icpp"
\n-
40#undef inline
\n-
41#endif
\n-
42
\n-
43#include "loaders/SILLYPNGImageContext.h"
\n-
44#include <png.h>
\n-
45// Start section of namespace SILLY
\n-
46namespace SILLY
\n-
47{
\n-
48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t length)
\n+
32#endif
\n+
33
\n+
34#include "loaders/SILLYTGAImageLoader.h"
\n+
35
\n+
36#ifndef SILLY_OPT_INLINE
\n+
37#define inline
\n+
38#include "loaders/SILLYTGAImageLoader.icpp"
\n+
39#undef inline
\n+
40#endif
\n+
41#include "SILLYDataSource.h"
\n+
42#include "loaders/SILLYTGAImageContext.h"
\n+
43
\n+
44#include <cstring>
\n+
45#include <cstdio>
\n+
46
\n+
47// Start section of namespace SILLY
\n+
48namespace SILLY
\n
49{
\n-
50 PNGImageContext* png = reinterpret_cast<PNGImageContext*>(png_get_io_ptr(png_ptr));
\n-
51 int readed = png->read(data, length);
\n-
52 if (readed != (int)length)
\n-
53 {
\n-
54 png_error(png_ptr, "PNG_read_function error");
\n-
55 }
\n-
56}
\n-
57
\n-
58void PNG_warning_function(png_structp png_ptr,
\n-
59 png_const_charp error)
\n-
60{
\n-
61// printf("PNG Warning: %s\\n", error);
\n-
62}
\n-
63
\n-
64void PNG_error_function(png_structp png_ptr,
\n-
65 png_const_charp error)
\n-
66{
\n-
67 // printf("PNG Error: %s\\n", error);
\n-
68 // copied from libpng's pngerror.cpp
\n-
69 jmp_buf buf;
\n-
70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
\n-
71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf));
\n-
72#else
\n-
73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
\n-
74#endif
\n-
75 longjmp(buf, 1);
\n-
76}
\n-
77
\n-
78
\n-
79PNGImageLoader::PNGImageLoader()
\n-
80 : ImageLoader("PNG Image Loader based on libpng")
\n-
81{
\n-
82}
\n-
83PNGImageLoader::~PNGImageLoader()
\n-
84{
\n-
85}
\n-
86
\n-
87
\n-
\n-
88ImageContext* PNGImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
\n-
89{
\n-
90 PNGImageContext* png = new PNGImageContext(data);
\n-
91 if (!png)
\n-
92 {
\n-
93 return 0;
\n-
94
\n-
95 }
\n-
96 // Prepare png loading
\n-
97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
\n-
98 if (png->d_png_ptr == 0)
\n-
99 {
\n-
100 delete png;
\n-
101 return 0;
\n-
102 }
\n-
103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr);
\n-
104 if (png->d_info_ptr == 0)
\n-
105 {
\n-
106 delete png;
\n-
107 return 0;
\n-
108 }
\n-
109 if (setjmp(png_jmpbuf(png->d_png_ptr)))
\n-
110 {
\n-
111 delete png;
\n-
112 return 0;
\n-
113 }
\n-
114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function, PNG_warning_function);
\n-
115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function);
\n-
116 //png_set_sig_bytes(png->d_png_ptr, 8);
\n-
117
\n-
118
\n-
119
\n-
120 // Read header Check whether PNG can depaletize transparently or not
\n-
121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND;
\n-
122 //printf("Start reading png\\n");
\n-
123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0);
\n-
124 png->setImageSize();
\n-
125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr);
\n-
126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr);
\n-
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);
\n-
128 if (png->d_bit_depth == 8)
\n-
129 {
\n-
130 if (png->d_num_channels == 4)
\n-
131 {
\n-
132 formatSource = PF_RGBA;
\n-
133 }
\n-
134 else if (png->d_num_channels == 3)
\n-
135 {
\n-
136 formatSource = PF_RGB;
\n-
137 }
\n-
138 else
\n-
139 {
\n-
140 delete png;
\n-
141 return 0;
\n-
142 }
\n-
143 }
\n-
144 // Paletized or grayscale not yet handled
\n-
145 else
\n-
146 {
\n-
147 delete png;
\n-
148 return 0;
\n-
149 }
\n-
150 return png;
\n-
151}
\n+
50
\n+
51TGAImageLoader::TGAImageLoader()
\n+
52 : ImageLoader("TGA Image loader (builtin)")
\n+
53{
\n+
54}
\n+
55
\n+
56TGAImageLoader::~TGAImageLoader()
\n+
57{
\n+
58}
\n+
59
\n+
60#ifdef SILLY_BE
\n+
61#define READ_WORD(res, start) \\
\n+
62 (res) = 0; \\
\n+
63 (res) = data->getDataPtr()[(start) + 1]; \\
\n+
64 (res) = (res) << 8; \\
\n+
65 (res) |= data->getDataPtr()[(start)];
\n+
66#else
\n+
67#define READ_WORD(res, start) \\
\n+
68 (res) = 0; \\
\n+
69 (res) = data->getDataPtr()[(start)]; \\
\n+
70 (res) = (res) << 8; \\
\n+
71 (res) |= data->getDataPtr()[(start) + 1];
\n+
72#endif
\n+
73
\n+
\n+
74ImageContext* TGAImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
\n+
75{
\n+
76 byte idLength = data->getDataPtr()[0];
\n+
77 byte colorMapType = data->getDataPtr()[1];
\n+
78 byte imageType = data->getDataPtr()[2];
\n+
79 size_t width;
\n+
80 size_t height;
\n+
81 byte depth;
\n+
82 byte description;
\n+
83 if ((imageType != 2 && imageType != 10) || colorMapType)
\n+
84 {
\n+
85 // Unsupported image format
\n+
86 return 0;
\n+
87 }
\n+
88 // offset: 3 Skip color map + 5 bytes
\n+
89 // offset: 8 Skip xorg / yorg + 4 bytes
\n+
90#ifdef SILLY_BE
\n+
91 width = data->getDataPtr()[12];
\n+
92 width = width << 8;
\n+
93 width |= data->getDataPtr()[13];
\n+
94 height = data->getDataPtr()[14];
\n+
95 height = height << 8;
\n+
96 height |= data->getDataPtr()[15];
\n+
97#else
\n+
98 width = data->getDataPtr()[13];
\n+
99 width = width << 8;
\n+
100 width |= data->getDataPtr()[12];
\n+
101 height = data->getDataPtr()[15];
\n+
102 height = height << 8;
\n+
103 height |= data->getDataPtr()[14];
\n+
104#endif
\n+
105 depth = data->getDataPtr()[16] >> 3;
\n+
106 switch (depth)
\n+
107 {
\n+
108 case 2:
\n+
109 formatSource = PF_A1B5G5R5;
\n+
110 break;
\n+
111 case 3:
\n+
112 formatSource = PF_RGB;
\n+
113 break;
\n+
114 case 4:
\n+
115 formatSource = PF_RGBA;
\n+
116 break;
\n+
117 default:
\n+
118 return 0;
\n+
119 }
\n+
120 description = (*data)[17];
\n+
121
\n+
122
\n+
123 TGAImageContext* context = new TGAImageContext(width, height);
\n+
124 if (context)
\n+
125 {
\n+
126 context->d_idLength = idLength;
\n+
127 context->d_imageType = imageType;
\n+
128 context->d_depth = depth;
\n+
129 context->d_description = description;
\n+
130 }
\n+
131 return context;
\n+
132}
\n
\n-
152
\n-
153
\n-
\n-
154bool PNGImageLoader::loadImageData(PixelOrigin origin,
\n-
155 DataSource* data,
\n-
156 ImageContext* context)
\n-
157{
\n-
158 PNGImageContext* png = static_cast<PNGImageContext*>(context);
\n-
159 byte red;
\n-
160 byte green;
\n-
161 byte blue;
\n-
162 byte alpha;
\n-
163 size_t width = png->getWidth();
\n-
164 size_t height = png->getHeight();
\n-
165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr);
\n-
166 if (png->d_bit_depth == 8)
\n-
167 {
\n-
168 // Read RGBA
\n-
169 if (png->d_num_channels == 4)
\n-
170 {
\n-
171 for (size_t j = 0 ; j < height ; ++j)
\n-
172 {
\n-
173 for(size_t i = 0 ; i < width ; ++i)
\n-
174 {
\n-
175 size_t pixel_offset = 4 * i;
\n-
176 red = *(row_pointers[j] + pixel_offset);
\n-
177 green = *(row_pointers[j] + pixel_offset + 1);
\n-
178 blue = *(row_pointers[j] + pixel_offset + 2);
\n-
179 alpha = *(row_pointers[j] + pixel_offset + 3);
\n-
180 png->setNextPixel(red, green, blue, alpha);
\n-
181 }
\n-
182 }
\n-
183 }
\n-
184 else if (png->d_num_channels == 3)
\n-
185 {
\n-
186 alpha = 0xff;
\n-
187 for (size_t j = 0 ; j < height ; ++j)
\n-
188 {
\n-
189 for(size_t i = 0 ; i < width ; ++i)
\n-
190 {
\n-
191 size_t pixel_offset = 3 * i;
\n-
192 red = *(row_pointers[j] + pixel_offset);
\n-
193 green = *(row_pointers[j] + pixel_offset + 1);
\n-
194 blue = *(row_pointers[j] + pixel_offset + 2);
\n-
195 png->setNextPixel(red, green, blue, alpha);
\n-
196 }
\n-
197 }
\n-
198
\n-
199 }
\n-
200 }
\n-
201 if (origin == PO_BOTTOM_LEFT)
\n-
202 return png->flipVertically();
\n-
203
\n-
204 return true;
\n-
205}
\n+
133
\n+
\n+
134bool TGAImageLoader::loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context)
\n+
135{
\n+
136 TGAImageContext* tga = static_cast<TGAImageContext*>(context);
\n+
137 size_t bpp = tga->d_depth;
\n+
138 size_t w = tga->getWidth();
\n+
139 size_t h = tga->getHeight();
\n+
140 size_t imgSize = w * h * bpp;
\n+
141 size_t offset = 18 + tga->d_idLength;
\n+
142 size_t numPixels = w * h;
\n+
143 const byte* input = data->getDataPtr() + offset;
\n+
144 // Read image data
\n+
145 byte red;
\n+
146 byte green;
\n+
147 byte blue;
\n+
148 byte alpha;
\n+
149 // Uncompressed
\n+
150 if (tga->d_imageType == 2)
\n+
151 {
\n+
152
\n+
153 switch(bpp)
\n+
154 {
\n+
155 case 2: //A1B5G5R5
\n+
156 for(size_t i = 0 ; i < numPixels ; ++i)
\n+
157 {
\n+
158 unsigned short pixel;
\n+
159 pixel = *(input++);
\n+
160 pixel = pixel << 8;
\n+
161 pixel |= *(input++);
\n+
162
\n+
163 alpha = pixel & 0xf000 ? 0xff : 0x00;
\n+
164 blue = static_cast<byte>((pixel & 0x1f) << 3);
\n+
165 green = static_cast<byte>(((pixel >> 5) & 0x1f) << 3);
\n+
166 red = static_cast<byte>(((pixel >> 10) & 0x1f) << 3);
\n+
167 context->setNextPixel(red, green, blue, alpha);
\n+
168 }
\n+
169 break;
\n+
170
\n+
171 case 3: // BGR_24
\n+
172 alpha = 0xff;
\n+
173 for(size_t i = 0 ; i < numPixels ; ++i)
\n+
174 {
\n+
175 blue = *(input++);
\n+
176 green = *(input++);
\n+
177 red = *(input++);
\n+
178 context->setNextPixel(red, green, blue, alpha);
\n+
179 }
\n+
180 break;
\n+
181
\n+
182 case 4: // BGRA_32
\n+
183 alpha = 0xff;
\n+
184 for(size_t i = 0 ; i < numPixels ; ++i)
\n+
185 {
\n+
186 blue = *(input++);
\n+
187 green = *(input++);
\n+
188 red = *(input++);
\n+
189 alpha = *(input++);
\n+
190 context->setNextPixel(red, green, blue, alpha);
\n+
191 }
\n+
192 break;
\n+
193 }
\n+
194 }
\n+
195 else
\n+
196 {
\n+
197 size_t pixelsRead = 0;
\n+
198 size_t num, i;
\n+
199 byte header;
\n+
200
\n+
201 switch(bpp)
\n+
202 {
\n+
203 case 2: //A1B5G5R5
\n+
204 while(pixelsRead < numPixels)
\n+
205 {
\n+
206 header = *(input++);
\n+
207 num = 1 + (header & 0x7f);
\n+
208 if (header & 0x80)
\n+
209 {
\n+
210 unsigned short pixel;
\n+
211 pixel = *(input++);
\n+
212 pixel = pixel << 8;
\n+
213 pixel |= *(input++);
\n+
214
\n+
215 alpha = pixel & 0xf000 ? 0xff : 0x00;
\n+
216 blue = static_cast<byte>((pixel & 0x1f) << 3);
\n+
217 green = static_cast<byte>(((pixel >> 5) & 0x1f) << 3);
\n+
218 red = static_cast<byte>(((pixel >> 10) & 0x1f) << 3);
\n+
219 for(i = 0 ; i < num ; ++i)
\n+
220 {
\n+
221 context->setNextPixel(red, green, blue, alpha);
\n+
222 }
\n+
223 }
\n+
224 else
\n+
225 {
\n+
226 for (i = 0 ; i < num ; ++i)
\n+
227 {
\n+
228 unsigned short pixel;
\n+
229 pixel = *(input++);
\n+
230 pixel = pixel << 8;
\n+
231 pixel |= *(input++);
\n+
232 alpha = pixel & 0xf000 ? 0xff : 0x00;
\n+
233 blue = static_cast<byte>((pixel & 0x1f) << 3);
\n+
234 green = static_cast<byte>(((pixel >> 5) & 0x1f) << 3);
\n+
235 red = static_cast<byte>(((pixel >> 10) & 0x1f) << 3);
\n+
236 context->setNextPixel(red, green, blue, alpha);
\n+
237 }
\n+
238 }
\n+
239 pixelsRead += num;
\n+
240 }
\n+
241
\n+
242 break;
\n+
243 case 3:
\n+
244 alpha = 0xff;
\n+
245 while(pixelsRead < numPixels)
\n+
246 {
\n+
247 header = *(input++);
\n+
248 num = 1 + (header & 0x7f);
\n+
249 if (header & 0x80)
\n+
250 {
\n+
251 blue = *(input++);
\n+
252 green = *(input++);
\n+
253 red = *(input++);
\n+
254 for(i = 0 ; i < num ; ++i)
\n+
255 {
\n+
256 context->setNextPixel(red, green, blue, alpha);
\n+
257 }
\n+
258 }
\n+
259 else
\n+
260 {
\n+
261 for (i = 0 ; i < num ; ++i)
\n+
262 {
\n+
263 blue = *(input++);
\n+
264 green = *(input++);
\n+
265 red = *(input++);
\n+
266 context->setNextPixel(red, green, blue, alpha);
\n+
267 }
\n+
268 }
\n+
269 pixelsRead += num;
\n+
270 }
\n+
271 break;
\n+
272
\n+
273 case 4:
\n+
274 while(pixelsRead < numPixels)
\n+
275 {
\n+
276 header = *(input++);
\n+
277 num = 1 + (header & 0x7f);
\n+
278 if (header & 0x80)
\n+
279 {
\n+
280 blue = *(input++);
\n+
281 green = *(input++);
\n+
282 red = *(input++);
\n+
283 alpha = *(input++);
\n+
284 for(i = 0 ; i < num ; ++i)
\n+
285 {
\n+
286 context->setNextPixel(red, green, blue, alpha);
\n+
287 }
\n+
288 }
\n+
289 else
\n+
290 {
\n+
291 for (i = 0 ; i < num ; ++i)
\n+
292 {
\n+
293 blue = *(input++);
\n+
294 green = *(input++);
\n+
295 red = *(input++);
\n+
296 alpha = *(input++);
\n+
297 context->setNextPixel(red, green, blue, alpha);
\n+
298 }
\n+
299 }
\n+
300 pixelsRead += num;
\n+
301 }
\n+
302 break;
\n+
303 }
\n+
304 }
\n+
305 // Flip or not flip that is the question
\n+
306 if ((tga->d_description & 0x10) == 0x10) // Upper Left origin
\n+
307 {
\n+
308 if (origin == PO_BOTTOM_LEFT)
\n+
309 return tga->flipVertically();
\n+
310 }
\n+
311 else
\n+
312 {
\n+
313 if (origin == PO_TOP_LEFT)
\n+
314 return tga->flipVertically();
\n+
315 }
\n+
316 return true;
\n+
317}
\n
\n-
206
\n-
207} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
Image Context for PNG Image Loader.
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
318
\n+
319} // End section of namespace SILLY
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
Image Context for Targa image.
\n+
This is an abstract class used to provide data to the loader.
\n+
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
\n
bool flipVertically()
Flip pixel ordering.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYPNGImageLoader.cpp\n+SILLYTGAImageLoader.cpp\n 1/***********************************************************************\n-2 filename: SILLYPNGImageLoader.cpp\n+2 filename: SILLYTGAImageLoader.cpp\n 3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Definition of the PNGImageLoader methods\n+6 purpose: Load TGA Image\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -32,212 +32,324 @@\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n-32#include \n-33#endif\n-34\n-35#include \"loaders/SILLYPNGImageLoader.h\"\n-36\n-37#ifndef SILLY_OPT_INLINE\n-38#define inline\n-39#include \"loaders/SILLYPNGImageLoader.icpp\"\n-40#undef inline\n-41#endif\n-42\n-43#include \"loaders/SILLYPNGImageContext.h\"\n-44#include \n-45// Start section of namespace SILLY\n-46namespace _\bS_\bI_\bL_\bL_\bY\n-47{\n-48void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t\n-length)\n+32#endif\n+33\n+34#include \"loaders/SILLYTGAImageLoader.h\"\n+35\n+36#ifndef SILLY_OPT_INLINE\n+37#define inline\n+38#include \"loaders/SILLYTGAImageLoader.icpp\"\n+39#undef inline\n+40#endif\n+41#include \"SILLYDataSource.h\"\n+42#include \"loaders/SILLYTGAImageContext.h\"\n+43\n+44#include \n+45#include \n+46\n+47// Start section of namespace SILLY\n+48namespace _\bS_\bI_\bL_\bL_\bY\n 49{\n-50 PNGImageContext* png = reinterpret_cast(png_get_io_ptr\n-(png_ptr));\n-51 int readed = png->read(data, length);\n-52 if (readed != (int)length)\n-53 {\n-54 png_error(png_ptr, \"PNG_read_function error\");\n-55 }\n-56}\n-57\n-58void PNG_warning_function(png_structp png_ptr,\n-59 png_const_charp error)\n-60{\n-61// printf(\"PNG Warning: %s\\n\", error);\n-62}\n-63\n-64void PNG_error_function(png_structp png_ptr,\n-65 png_const_charp error)\n-66{\n-67 // printf(\"PNG Error: %s\\n\", error);\n-68 // copied from libpng's pngerror.cpp\n-69 jmp_buf buf;\n-70#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4\n-71 memcpy(buf, png_jmpbuf((png_ptr)), sizeof(jmp_buf));\n-72#else\n-73 memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));\n-74#endif\n-75 longjmp(buf, 1);\n-76}\n-77\n-78\n-79PNGImageLoader::PNGImageLoader()\n-80 : ImageLoader(\"PNG Image Loader based on libpng\")\n-81{\n-82}\n-83PNGImageLoader::~PNGImageLoader()\n-84{\n-85}\n-86\n-87\n-_\b8_\b8_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* PNGImageLoader::loadHeader(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource,\n+50\n+51TGAImageLoader::TGAImageLoader()\n+52 : ImageLoader(\"TGA Image loader (builtin)\")\n+53{\n+54}\n+55\n+56TGAImageLoader::~TGAImageLoader()\n+57{\n+58}\n+59\n+60#ifdef SILLY_BE\n+61#define READ_WORD(res, start) \\\n+62 (res) = 0; \\\n+63 (res) = data->getDataPtr()[(start) + 1]; \\\n+64 (res) = (res) << 8; \\\n+65 (res) |= data->getDataPtr()[(start)];\n+66#else\n+67#define READ_WORD(res, start) \\\n+68 (res) = 0; \\\n+69 (res) = data->getDataPtr()[(start)]; \\\n+70 (res) = (res) << 8; \\\n+71 (res) |= data->getDataPtr()[(start) + 1];\n+72#endif\n+73\n+_\b7_\b4_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* TGAImageLoader::loadHeader(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource,\n _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data)\n-89{\n-90 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* png = new _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(data);\n-91 if (!png)\n-92 {\n-93 return 0;\n-94\n-95 }\n-96 // Prepare png loading\n-97 png->d_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);\n-98 if (png->d_png_ptr == 0)\n-99 {\n-100 delete png;\n-101 return 0;\n-102 }\n-103 png->d_info_ptr = png_create_info_struct(png->d_png_ptr);\n-104 if (png->d_info_ptr == 0)\n-105 {\n-106 delete png;\n-107 return 0;\n-108 }\n-109 if (setjmp(png_jmpbuf(png->d_png_ptr)))\n-110 {\n-111 delete png;\n-112 return 0;\n-113 }\n-114 png_set_error_fn(png->d_png_ptr, 0, PNG_error_function,\n-PNG_warning_function);\n-115 png_set_read_fn(png->d_png_ptr, png, PNG_read_function);\n-116 //png_set_sig_bytes(png->d_png_ptr, 8);\n-117\n-118\n-119\n-120 // Read header Check whether PNG can depaletize transparently or not\n-121 int png_transform = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_EXPAND;\n-122 //printf(\"Start reading png\\n\");\n-123 png_read_png(png->d_png_ptr, png->d_info_ptr, png_transform, 0);\n-124 png->setImageSize();\n-125 png->d_bit_depth = png_get_bit_depth(png->d_png_ptr, png->d_info_ptr);\n-126 png->d_num_channels = png_get_channels(png->d_png_ptr, png->d_info_ptr);\n-127 //printf(\"PNG Info: width: %d height: %d bpp: %d channels: %d\\n\", png-\n->getWidth(), png->getHeight(), png->d_bit_depth, png->d_num_channels);\n-128 if (png->d_bit_depth == 8)\n-129 {\n-130 if (png->d_num_channels == 4)\n-131 {\n-132 formatSource = PF_RGBA;\n-133 }\n-134 else if (png->d_num_channels == 3)\n-135 {\n-136 formatSource = PF_RGB;\n-137 }\n-138 else\n-139 {\n-140 delete png;\n-141 return 0;\n-142 }\n-143 }\n-144 // Paletized or grayscale not yet handled\n-145 else\n-146 {\n-147 delete png;\n-148 return 0;\n-149 }\n-150 return png;\n-151}\n+75{\n+76 byte idLength = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[0];\n+77 byte colorMapType = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[1];\n+78 byte imageType = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[2];\n+79 size_t width;\n+80 size_t height;\n+81 byte depth;\n+82 byte description;\n+83 if ((imageType != 2 && imageType != 10) || colorMapType)\n+84 {\n+85 // Unsupported image format\n+86 return 0;\n+87 }\n+88 // offset: 3 Skip color map + 5 bytes\n+89 // offset: 8 Skip xorg / yorg + 4 bytes\n+90#ifdef SILLY_BE\n+91 width = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[12];\n+92 width = width << 8;\n+93 width |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[13];\n+94 height = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[14];\n+95 height = height << 8;\n+96 height |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[15];\n+97#else\n+98 width = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[13];\n+99 width = width << 8;\n+100 width |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[12];\n+101 height = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[15];\n+102 height = height << 8;\n+103 height |= data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[14];\n+104#endif\n+105 depth = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br()[16] >> 3;\n+106 switch (depth)\n+107 {\n+108 case 2:\n+109 formatSource = PF_A1B5G5R5;\n+110 break;\n+111 case 3:\n+112 formatSource = PF_RGB;\n+113 break;\n+114 case 4:\n+115 formatSource = PF_RGBA;\n+116 break;\n+117 default:\n+118 return 0;\n+119 }\n+120 description = (*data)[17];\n+121\n+122\n+123 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context = new _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(width, height);\n+124 if (context)\n+125 {\n+126 context->d_idLength = idLength;\n+127 context->d_imageType = imageType;\n+128 context->d_depth = depth;\n+129 context->d_description = description;\n+130 }\n+131 return context;\n+132}\n+133\n+_\b1_\b3_\b4bool TGAImageLoader::loadImageData(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n+_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n+135{\n+136 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* tga = static_cast<_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(context);\n+137 size_t bpp = tga->d_depth;\n+138 size_t w = tga->getWidth();\n+139 size_t h = tga->getHeight();\n+140 size_t imgSize = w * h * bpp;\n+141 size_t offset = 18 + tga->d_idLength;\n+142 size_t numPixels = w * h;\n+143 const byte* input = data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() + offset;\n+144 // Read image data\n+145 byte red;\n+146 byte green;\n+147 byte blue;\n+148 byte alpha;\n+149 // Uncompressed\n+150 if (tga->d_imageType == 2)\n+151 {\n 152\n-153\n-_\b1_\b5_\b4bool PNGImageLoader::loadImageData(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n-155 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n-156 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n-157{\n-158 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* png = static_cast<_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(context);\n-159 byte red;\n-160 byte green;\n-161 byte blue;\n-162 byte alpha;\n-163 size_t width = png->getWidth();\n-164 size_t height = png->getHeight();\n-165 png_bytepp row_pointers = png_get_rows(png->d_png_ptr, png->d_info_ptr);\n-166 if (png->d_bit_depth == 8)\n-167 {\n-168 // Read RGBA\n-169 if (png->d_num_channels == 4)\n-170 {\n-171 for (size_t j = 0 ; j < height ; ++j)\n-172 {\n-173 for(size_t i = 0 ; i < width ; ++i)\n+153 switch(bpp)\n+154 {\n+155 case 2: //A1B5G5R5\n+156 for(size_t i = 0 ; i < numPixels ; ++i)\n+157 {\n+158 unsigned short pixel;\n+159 pixel = *(input++);\n+160 pixel = pixel << 8;\n+161 pixel |= *(input++);\n+162\n+163 alpha = pixel & 0xf000 ? 0xff : 0x00;\n+164 blue = static_cast((pixel & 0x1f) << 3);\n+165 green = static_cast(((pixel >> 5) & 0x1f) << 3);\n+166 red = static_cast(((pixel >> 10) & 0x1f) << 3);\n+167 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+168 }\n+169 break;\n+170\n+171 case 3: // BGR_24\n+172 alpha = 0xff;\n+173 for(size_t i = 0 ; i < numPixels ; ++i)\n 174 {\n-175 size_t pixel_offset = 4 * i;\n-176 red = *(row_pointers[j] + pixel_offset);\n-177 green = *(row_pointers[j] + pixel_offset + 1);\n-178 blue = *(row_pointers[j] + pixel_offset + 2);\n-179 alpha = *(row_pointers[j] + pixel_offset + 3);\n-180 png->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-181 }\n-182 }\n-183 }\n-184 else if (png->d_num_channels == 3)\n+175 blue = *(input++);\n+176 green = *(input++);\n+177 red = *(input++);\n+178 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+179 }\n+180 break;\n+181\n+182 case 4: // BGRA_32\n+183 alpha = 0xff;\n+184 for(size_t i = 0 ; i < numPixels ; ++i)\n 185 {\n-186 alpha = 0xff;\n-187 for (size_t j = 0 ; j < height ; ++j)\n-188 {\n-189 for(size_t i = 0 ; i < width ; ++i)\n-190 {\n-191 size_t pixel_offset = 3 * i;\n-192 red = *(row_pointers[j] + pixel_offset);\n-193 green = *(row_pointers[j] + pixel_offset + 1);\n-194 blue = *(row_pointers[j] + pixel_offset + 2);\n-195 png->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-196 }\n-197 }\n-198\n-199 }\n-200 }\n-201 if (origin == PO_BOTTOM_LEFT)\n-202 return png->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n-203\n-204 return true;\n-205}\n-206\n-207} // End section of namespace SILLY\n+186 blue = *(input++);\n+187 green = *(input++);\n+188 red = *(input++);\n+189 alpha = *(input++);\n+190 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+191 }\n+192 break;\n+193 }\n+194 }\n+195 else\n+196 {\n+197 size_t pixelsRead = 0;\n+198 size_t num, i;\n+199 byte header;\n+200\n+201 switch(bpp)\n+202 {\n+203 case 2: //A1B5G5R5\n+204 while(pixelsRead < numPixels)\n+205 {\n+206 header = *(input++);\n+207 num = 1 + (header & 0x7f);\n+208 if (header & 0x80)\n+209 {\n+210 unsigned short pixel;\n+211 pixel = *(input++);\n+212 pixel = pixel << 8;\n+213 pixel |= *(input++);\n+214\n+215 alpha = pixel & 0xf000 ? 0xff : 0x00;\n+216 blue = static_cast((pixel & 0x1f) << 3);\n+217 green = static_cast(((pixel >> 5) & 0x1f) << 3);\n+218 red = static_cast(((pixel >> 10) & 0x1f) << 3);\n+219 for(i = 0 ; i < num ; ++i)\n+220 {\n+221 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+222 }\n+223 }\n+224 else\n+225 {\n+226 for (i = 0 ; i < num ; ++i)\n+227 {\n+228 unsigned short pixel;\n+229 pixel = *(input++);\n+230 pixel = pixel << 8;\n+231 pixel |= *(input++);\n+232 alpha = pixel & 0xf000 ? 0xff : 0x00;\n+233 blue = static_cast((pixel & 0x1f) << 3);\n+234 green = static_cast(((pixel >> 5) & 0x1f) << 3);\n+235 red = static_cast(((pixel >> 10) & 0x1f) << 3);\n+236 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+237 }\n+238 }\n+239 pixelsRead += num;\n+240 }\n+241\n+242 break;\n+243 case 3:\n+244 alpha = 0xff;\n+245 while(pixelsRead < numPixels)\n+246 {\n+247 header = *(input++);\n+248 num = 1 + (header & 0x7f);\n+249 if (header & 0x80)\n+250 {\n+251 blue = *(input++);\n+252 green = *(input++);\n+253 red = *(input++);\n+254 for(i = 0 ; i < num ; ++i)\n+255 {\n+256 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+257 }\n+258 }\n+259 else\n+260 {\n+261 for (i = 0 ; i < num ; ++i)\n+262 {\n+263 blue = *(input++);\n+264 green = *(input++);\n+265 red = *(input++);\n+266 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+267 }\n+268 }\n+269 pixelsRead += num;\n+270 }\n+271 break;\n+272\n+273 case 4:\n+274 while(pixelsRead < numPixels)\n+275 {\n+276 header = *(input++);\n+277 num = 1 + (header & 0x7f);\n+278 if (header & 0x80)\n+279 {\n+280 blue = *(input++);\n+281 green = *(input++);\n+282 red = *(input++);\n+283 alpha = *(input++);\n+284 for(i = 0 ; i < num ; ++i)\n+285 {\n+286 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+287 }\n+288 }\n+289 else\n+290 {\n+291 for (i = 0 ; i < num ; ++i)\n+292 {\n+293 blue = *(input++);\n+294 green = *(input++);\n+295 red = *(input++);\n+296 alpha = *(input++);\n+297 context->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n+298 }\n+299 }\n+300 pixelsRead += num;\n+301 }\n+302 break;\n+303 }\n+304 }\n+305 // Flip or not flip that is the question\n+306 if ((tga->d_description & 0x10) == 0x10) // Upper Left origin\n+307 {\n+308 if (origin == PO_BOTTOM_LEFT)\n+309 return tga->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n+310 }\n+311 else\n+312 {\n+313 if (origin == PO_TOP_LEFT)\n+314 return tga->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n+315 }\n+316 return true;\n+317}\n+318\n+319} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n PixelFormat\n List all pixel format supported.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n PixelOrigin\n List all pixel origin supported.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Image Context for PNG Image Loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Image Context for Targa image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b3\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n This is an abstract class used to provide data to the loader.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n+virtual const byte * getDataPtr() const =0\n+Get raw access to the image data.\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n Store the data needed by an ImageLoader object during the parsing of an image.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl\n void setNextPixel(byte red, byte green, byte bleu, byte alpha)\n Set the next pixel of the image.\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00023_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00023_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYTGAImageContext.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImage.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYTGAImageContext.cpp
\n+
SILLYImage.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYTGAImageContext.cpp
\n-
3 created: 11 Jun 2006
\n+
2 filename: SILLYImage.cpp
\n+
3 created: 10 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Definition of the TGAImageContext methods
\n+
6 purpose: Implementation of the Image class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,31 +80,106 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "loaders/SILLYTGAImageContext.h"
\n+
34#include "SILLYImage.h"
\n
35
\n
36#ifndef SILLY_OPT_INLINE
\n
37#define inline
\n-
38#include "loaders/SILLYTGAImageContext.icpp"
\n+
38#include "SILLYImage.icpp"
\n
39#undef inline
\n
40#endif
\n-
41#include <cstring>
\n-
42#include <cstdio>
\n-
43// Start section of namespace SILLY
\n-
44namespace SILLY
\n-
45{
\n-
46
\n+
41#include "SILLYImageLoaderManager.h"
\n+
42
\n+
43
\n+
44// Start section of namespace SILLY
\n+
45namespace SILLY
\n+
46{
\n
47
\n-
48
\n-
49} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n+
\n+\n+
49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader(0)
\n+
50{
\n+
51}
\n+
\n+
52
\n+
53
\n+
\n+\n+
55{
\n+
56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin();
\n+
57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() ; ++iter)
\n+
58 {
\n+
59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data);
\n+
60 if (d_imageContext)
\n+
61 d_imageLoader = (*iter);
\n+
62 }
\n+
63 assert((! d_imageLoader || d_imageContext) && "ASSERT: Internal state of image invalid");
\n+
64 return d_imageLoader != 0;
\n+
65
\n+
66}
\n+
\n+
67
\n+
\n+\n+
69{
\n+
70 switch (resultFormat)
\n+
71 {
\n+
72 case PF_A1B5G5R5:
\n+
73 d_bpp = 2;
\n+
74 break;
\n+
75 case PF_RGB:
\n+
76 d_bpp = 3;
\n+
77 break;
\n+
78
\n+
79 case PF_RGBA:
\n+
80 d_bpp = 4;
\n+
81 break;
\n+
82 //default:
\n+
83 // Unsupported format
\n+
84 };
\n+
85
\n+
86 if (! allocate())
\n+
87 {
\n+
88 return false;
\n+
89 }
\n+
90 d_imageContext->setDestination(d_pixels, getWidth() * getHeight() * d_bpp, resultFormat);
\n+
91
\n+
92 if (! d_imageLoader->loadImageData(order, d_data, d_imageContext))
\n+
93 {
\n+
94 delete [] d_pixels;
\n+
95 return false;
\n+
96 }
\n+
97 return true;
\n+
98}
\n+
\n+
99
\n+
100bool Image::allocate()
\n+
101{
\n+
102 delete [] d_pixels;
\n+
103 d_pixels = 0;
\n+
104 d_pixels = new byte[d_bpp * getWidth() * getHeight()];
\n+
105 return d_pixels != 0;
\n+
106}
\n+
107
\n+
108} // End section of namespace SILLY
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
This is an abstract class used to provide data to the loader.
\n+
Image(DataSource &data)
Constructor.
\n+
bool loadImageHeader()
Retrieve the information concerning the image object.
\n+
bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin origin=PO_TOP_LEFT)
Load the image pixels in memory and store them in resultFormat.
\n+
size_t getWidth() const
Retrieve the width of the image.
\n+
size_t getHeight() const
Retrieve the height of the image.
\n+
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
\n+
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYTGAImageContext.cpp\n+SILLYImage.cpp\n 1/***********************************************************************\n-2 filename: SILLYTGAImageContext.cpp\n-3 created: 11 Jun 2006\n+2 filename: SILLYImage.cpp\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Definition of the TGAImageContext methods\n+6 purpose: Implementation of the Image class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -34,28 +33,128 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"loaders/SILLYTGAImageContext.h\"\n+34#include \"SILLYImage.h\"\n 35\n 36#ifndef SILLY_OPT_INLINE\n 37#define inline\n-38#include \"loaders/SILLYTGAImageContext.icpp\"\n+38#include \"SILLYImage.icpp\"\n 39#undef inline\n 40#endif\n-41#include \n-42#include \n-43// Start section of namespace SILLY\n-44namespace _\bS_\bI_\bL_\bL_\bY\n-45{\n-46\n+41#include \"SILLYImageLoaderManager.h\"\n+42\n+43\n+44// Start section of namespace SILLY\n+45namespace _\bS_\bI_\bL_\bL_\bY\n+46{\n 47\n-48\n-49} // End section of namespace SILLY\n+_\b4_\b8_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bI_\bm_\ba_\bg_\be(_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be& source)\n+49 : d_bpp(0), d_pixels(0), d_data(&source), d_imageContext(0), d_imageLoader\n+(0)\n+50{\n+51}\n+52\n+53\n+_\b5_\b4bool _\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bH_\be_\ba_\bd_\be_\br()\n+55{\n+56 ImageLoaderList::iterator iter = ImageLoaderManager::getSingleton().begin();\n+57 for (; ! d_imageLoader && iter != ImageLoaderManager::getSingleton().end() ;\n+++iter)\n+58 {\n+59 d_imageContext = (*iter)->loadHeader(d_pfSource, d_data);\n+60 if (d_imageContext)\n+61 d_imageLoader = (*iter);\n+62 }\n+63 assert((! d_imageLoader || d_imageContext) && \"ASSERT: Internal state of\n+image invalid\");\n+64 return d_imageLoader != 0;\n+65\n+66}\n+67\n+_\b6_\b8bool _\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt resultFormat, _\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn order)\n+69{\n+70 switch (resultFormat)\n+71 {\n+72 case PF_A1B5G5R5:\n+73 d_bpp = 2;\n+74 break;\n+75 case PF_RGB:\n+76 d_bpp = 3;\n+77 break;\n+78\n+79 case PF_RGBA:\n+80 d_bpp = 4;\n+81 break;\n+82 //default:\n+83 // Unsupported format\n+84 };\n+85\n+86 if (! allocate())\n+87 {\n+88 return false;\n+89 }\n+90 d_imageContext->_\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn(d_pixels, _\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh() * _\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt() * d_bpp,\n+resultFormat);\n+91\n+92 if (! d_imageLoader->_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(order, d_data, d_imageContext))\n+93 {\n+94 delete [] d_pixels;\n+95 return false;\n+96 }\n+97 return true;\n+98}\n+99\n+100bool Image::allocate()\n+101{\n+102 delete [] d_pixels;\n+103 d_pixels = 0;\n+104 d_pixels = new byte[d_bpp * _\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh() * _\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt()];\n+105 return d_pixels != 0;\n+106}\n+107\n+108} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat\n+List all pixel format supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n+PixelOrigin\n+List all pixel origin supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bI_\bm_\ba_\bg_\be\n+Image(DataSource &data)\n+Constructor.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bc_\bp_\bp_\b:_\b4_\b8\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bH_\be_\ba_\bd_\be_\br\n+bool loadImageHeader()\n+Retrieve the information concerning the image object.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bc_\bp_\bp_\b:_\b5_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n+bool loadImageData(PixelFormat resultFormat=PF_RGBA, PixelOrigin\n+origin=PO_TOP_LEFT)\n+Load the image pixels in memory and store them in resultFormat.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bc_\bp_\bp_\b:_\b6_\b8\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh\n+size_t getWidth() const\n+Retrieve the width of the image.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt\n+size_t getHeight() const\n+Retrieve the height of the image.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn\n+void setDestination(byte *pixels, size_t length, PixelFormat format)\n+Set the destination of the loading.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n+virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext\n+*context)=0\n+Parse the pixels data of the image and fill the header struct.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00026_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00026_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYJPGImageContext.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYImageLoader.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYJPGImageContext.cpp
\n+
SILLYImageLoader.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYJPGImageContext.cpp
\n-
3 created: 11 Jun 2006
\n+
2 filename: ImageLoader.cpp
\n+
3 created: 10 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Definition of the JPGImageContext class methods
\n+
6 purpose: Implementation of the ImageLoader
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,109 +80,43 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "loaders/SILLYJPGImageContext.h"
\n-
35
\n-
36#ifndef SILLY_OPT_INLINE
\n-
37#define inline
\n-
38#include "loaders/SILLYJPGImageContext.icpp"
\n-
39#undef inline
\n-
40#endif
\n+
34#include "SILLYImageLoader.h"
\n+
35#ifndef SILLY_OPT_INLINE
\n+
36#define inline
\n+
37#include "SILLYImageLoader.icpp"
\n+
38#undef inline
\n+
39#endif
\n+
40#include "SILLYImageContext.h"
\n
41
\n-
42#include <jpeglib.h>
\n-
43
\n-
44// Start section of namespace SILLY
\n-
\n-
45namespace SILLY
\n-
46{
\n-
47
\n-
48
\n-
49void JPG_init_source(j_decompress_ptr cinfo)
\n-
50{
\n-
51 // Nothing to do
\n-
52}
\n-
53
\n-
54boolean JPG_fill_input_buffer(j_decompress_ptr cinfo)
\n-
55{
\n-
56 JPGImageContext* jpg = reinterpret_cast<JPGImageContext*>(cinfo->client_data);
\n-
57 cinfo->src->next_input_byte = jpg->d_source->getDataPtr();
\n-
58 cinfo->src->bytes_in_buffer = jpg->d_source->getSize();
\n-
59 return TRUE;
\n-
60}
\n-
61
\n-
62void JPG_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
\n-
63{
\n-
64 if (num_bytes > 0)
\n-
65 {
\n-
66 cinfo->src->next_input_byte += (size_t)num_bytes;
\n-
67 cinfo->src->bytes_in_buffer -= (size_t)num_bytes;
\n-
68 }
\n-
69}
\n-
70
\n-
71void JPG_term_source(j_decompress_ptr cinfo)
\n-
72{
\n-
73 // Nothing to do
\n-
74}
\n-
75
\n-
76void JPG_error_exit(j_common_ptr cinfo)
\n-
77{
\n-
78 JPGImageContext* jpg = reinterpret_cast<JPGImageContext*>(cinfo->client_data);
\n-
79 // TODO
\n-
80 longjmp(jpg->setjmp_buffer, 1);
\n-
81
\n-
82}
\n-
83
\n-
84void JPG_emit_message(j_common_ptr cinfo, int msg_level)
\n-
85{
\n-
86 // Ignore
\n-
87}
\n-
88
\n-
89
\n-
90JPGImageContext::JPGImageContext()
\n-
91 : ImageContext(0, 0)
\n-
92{
\n-
93 src_mgr.bytes_in_buffer = 0;
\n-
94 src_mgr.next_input_byte = 0;
\n-
95 src_mgr.init_source = JPG_init_source;
\n-
96 src_mgr.fill_input_buffer = JPG_fill_input_buffer;
\n-
97 src_mgr.skip_input_data = JPG_skip_input_data;
\n-
98 src_mgr.resync_to_restart = jpeg_resync_to_restart;
\n-
99 src_mgr.term_source = JPG_term_source;
\n-
100 jpeg_create_decompress(&cinfo);
\n-
101 cinfo.src = &src_mgr;
\n-
102 cinfo.client_data = this;
\n-
103 cinfo.err = jpeg_std_error(&d_error_mgr);
\n-
104 d_error_mgr.error_exit = JPG_error_exit;
\n-
105
\n-
106}
\n-
107
\n-
108
\n-
109JPGImageContext::~JPGImageContext()
\n-
110{
\n-
111 jpeg_destroy_decompress(&cinfo);
\n-
112}
\n-
113
\n-
114
\n-
115void JPGImageContext::setImageSize()
\n-
116{
\n-
117 setWidth(cinfo.output_width);
\n-
118 setHeight(cinfo.output_height);
\n-
119}
\n-
120
\n-
121} // End section of namespace SILLY
\n+
42// Start of SILLY namespace section
\n+
43namespace SILLY
\n+
44{
\n+
45
\n+
46
\n+
\n+\n+
48{
\n+
49 delete context;
\n+
50}
\n
\n-
Simple Image Loading LibrarY namespace.
\n-
Image Context for JPG image loader.
\n-
virtual size_t getSize() const =0
Return the size of the data.
\n-
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
51
\n+
52
\n+
53} // end of SILLY namespace section
\n+
54
\n+
55
\n+
56
\n+
57
\n+
Simple Image Loading LibrarY namespace.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
void destroyContext(ImageContext *context)
Destroy the image context.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYJPGImageContext.cpp\n+SILLYImageLoader.cpp\n 1/***********************************************************************\n-2 filename: SILLYJPGImageContext.cpp\n-3 created: 11 Jun 2006\n+2 filename: ImageLoader.cpp\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Definition of the JPGImageContext class methods\n+6 purpose: Implementation of the ImageLoader\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -34,114 +33,43 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"loaders/SILLYJPGImageContext.h\"\n-35\n-36#ifndef SILLY_OPT_INLINE\n-37#define inline\n-38#include \"loaders/SILLYJPGImageContext.icpp\"\n-39#undef inline\n-40#endif\n+34#include \"SILLYImageLoader.h\"\n+35#ifndef SILLY_OPT_INLINE\n+36#define inline\n+37#include \"SILLYImageLoader.icpp\"\n+38#undef inline\n+39#endif\n+40#include \"SILLYImageContext.h\"\n 41\n-42#include \n-43\n-44// Start section of namespace SILLY\n-_\b4_\b5namespace _\bS_\bI_\bL_\bL_\bY\n-46{\n-47\n-48\n-49void JPG_init_source(j_decompress_ptr cinfo)\n-50{\n-51 // Nothing to do\n-52}\n-53\n-54boolean JPG_fill_input_buffer(j_decompress_ptr cinfo)\n-55{\n-56 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = reinterpret_cast<_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(cinfo-\n->client_data);\n-57 cinfo->src->next_input_byte = jpg->d_source->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br();\n-58 cinfo->src->bytes_in_buffer = jpg->d_source->_\bg_\be_\bt_\bS_\bi_\bz_\be();\n-59 return TRUE;\n-60}\n-61\n-62void JPG_skip_input_data(j_decompress_ptr cinfo, long num_bytes)\n-63{\n-64 if (num_bytes > 0)\n-65 {\n-66 cinfo->src->next_input_byte += (size_t)num_bytes;\n-67 cinfo->src->bytes_in_buffer -= (size_t)num_bytes;\n-68 }\n-69}\n-70\n-71void JPG_term_source(j_decompress_ptr cinfo)\n-72{\n-73 // Nothing to do\n-74}\n-75\n-76void JPG_error_exit(j_common_ptr cinfo)\n-77{\n-78 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = reinterpret_cast<_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(cinfo-\n->client_data);\n-79 // TODO\n-80 longjmp(jpg->setjmp_buffer, 1);\n-81\n-82}\n-83\n-84void JPG_emit_message(j_common_ptr cinfo, int msg_level)\n-85{\n-86 // Ignore\n-87}\n-88\n-89\n-90JPGImageContext::JPGImageContext()\n-91 : _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(0, 0)\n-92{\n-93 src_mgr.bytes_in_buffer = 0;\n-94 src_mgr.next_input_byte = 0;\n-95 src_mgr.init_source = JPG_init_source;\n-96 src_mgr.fill_input_buffer = JPG_fill_input_buffer;\n-97 src_mgr.skip_input_data = JPG_skip_input_data;\n-98 src_mgr.resync_to_restart = jpeg_resync_to_restart;\n-99 src_mgr.term_source = JPG_term_source;\n-100 jpeg_create_decompress(&cinfo);\n-101 cinfo.src = &src_mgr;\n-102 cinfo.client_data = this;\n-103 cinfo.err = jpeg_std_error(&d_error_mgr);\n-104 d_error_mgr.error_exit = JPG_error_exit;\n-105\n-106}\n-107\n-108\n-109JPGImageContext::~JPGImageContext()\n-110{\n-111 jpeg_destroy_decompress(&cinfo);\n-112}\n-113\n-114\n-115void JPGImageContext::setImageSize()\n-116{\n-117 setWidth(cinfo.output_width);\n-118 setHeight(cinfo.output_height);\n-119}\n-120\n-121} // End section of namespace SILLY\n+42// Start of SILLY namespace section\n+43namespace _\bS_\bI_\bL_\bL_\bY\n+44{\n+45\n+46\n+_\b4_\b7void _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bd_\be_\bs_\bt_\br_\bo_\by_\bC_\bo_\bn_\bt_\be_\bx_\bt(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n+48{\n+49 delete context;\n+50}\n+51\n+52\n+53} // end of SILLY namespace section\n+54\n+55\n+56\n+57\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Image Context for JPG image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b5_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n-virtual size_t getSize() const =0\n-Return the size of the data.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n-virtual const byte * getDataPtr() const =0\n-Get raw access to the image data.\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n Store the data needed by an ImageLoader object during the parsing of an image.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bd_\be_\bs_\bt_\br_\bo_\by_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+void destroyContext(ImageContext *context)\n+Destroy the image context.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b4_\b7\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00029_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00029_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYPNGImageContext.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYFileDataSource.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYPNGImageContext.cpp
\n+
SILLYFileDataSource.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYPNGImageContext.cpp
\n-
3 created: 11 Jun 2006
\n+
2 filename: SILLYFileDataSource.cpp
\n+
3 created: 20 Jul 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Definition of PNGImageContext methods
\n+
6 purpose: Implementation of the FileDataSource methods
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,66 +80,80 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "loaders/SILLYPNGImageContext.h"
\n+
34#include "SILLYFileDataSource.h"
\n
35
\n
36#ifndef SILLY_OPT_INLINE
\n
37#define inline
\n-
38#include "loaders/SILLYPNGImageContext.icpp"
\n+
38#include "SILLYFileDataSource.icpp"
\n
39#undef inline
\n-
40#endif
\n-
41#include <string.h>
\n-
42
\n-
43// Start section of namespace SILLY
\n-
44namespace SILLY
\n-
45{
\n-
46int PNGImageContext::read(png_bytep data, png_size_t length)
\n-
47{
\n-
48 //printf("PNG Read: %d bytes offset: %d, size %d\\n",
\n-
49 // length, d_offset, d_data->getSize());
\n-
50
\n-
51 if (d_offset + length > d_data->getSize())
\n-
52 return -1;
\n-
53 memcpy(data, d_data->getDataPtr() + d_offset, length);
\n-
54 d_offset += length;
\n-
55 return length;
\n-
56}
\n-
57
\n-
58
\n-
59PNGImageContext::PNGImageContext(DataSource* data)
\n-
60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0)
\n-
61{
\n-
62
\n-
63}
\n-
64
\n-
65PNGImageContext::~PNGImageContext()
\n-
66{
\n-
67 if (d_info_ptr)
\n-
68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0);
\n-
69 if (d_png_ptr)
\n-
70 png_destroy_read_struct(&d_png_ptr, 0, 0);
\n-
71}
\n-
72
\n-
73
\n-
74void PNGImageContext::setImageSize()
\n-
75{
\n-
76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr));
\n-
77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr));
\n-
78
\n-
79}
\n-
80
\n-
81
\n-
82} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n-
virtual size_t getSize() const =0
Return the size of the data.
\n-
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n+
40#endif
\n+
41#include <stdio.h>
\n+
42// Start section of namespace SILLY
\n+
43namespace SILLY
\n+
44{
\n+
45
\n+
\n+
46FileDataSource::FileDataSource(const char* filename)
\n+
47 : d_error(true), d_bytes(0), d_size(0)
\n+
48{
\n+
49 FILE* data = fopen(filename, "rb");
\n+
50 if (data)
\n+
51 {
\n+
52 long status = fseek(data, 0, SEEK_END);
\n+
53 if (status == -1)
\n+
54 {
\n+
55 fclose(data);
\n+
56 return;
\n+
57 }
\n+
58 status = ftell(data);
\n+
59 if (status == -1)
\n+
60 {
\n+
61 fclose(data);
\n+
62 return;
\n+
63 }
\n+
64 d_size = status;
\n+
65 if (d_size)
\n+
66 d_bytes = new byte[d_size];
\n+
67 if (! d_bytes)
\n+
68 {
\n+
69 fclose(data);
\n+
70 return;
\n+
71 }
\n+
72 rewind(data);
\n+
73 status = fread(reinterpret_cast<void*>(d_bytes), 1, d_size, data);
\n+
74 if (status != d_size)
\n+
75 {
\n+
76 delete [] d_bytes;
\n+
77 d_bytes = 0;
\n+
78 fclose(data);
\n+
79 }
\n+
80 fclose(data);
\n+
81 d_error = false;
\n+
82 }
\n+
83}
\n+
\n+
84
\n+
85
\n+
\n+\n+
87{
\n+
88 delete [] d_bytes;
\n+
89}
\n+
\n+
90
\n+
91
\n+
92} // End section of namespace SILLY
\n+
Simple Image Loading LibrarY namespace.
\n+
FileDataSource(const char *filename)
Create a data source from an existing file.
\n+\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYPNGImageContext.cpp\n+SILLYFileDataSource.cpp\n 1/***********************************************************************\n-2 filename: SILLYPNGImageContext.cpp\n-3 created: 11 Jun 2006\n+2 filename: SILLYFileDataSource.cpp\n+3 created: 20 Jul 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Definition of PNGImageContext methods\n+6 purpose: Implementation of the FileDataSource methods\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -34,67 +33,79 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"loaders/SILLYPNGImageContext.h\"\n+34#include \"SILLYFileDataSource.h\"\n 35\n 36#ifndef SILLY_OPT_INLINE\n 37#define inline\n-38#include \"loaders/SILLYPNGImageContext.icpp\"\n+38#include \"SILLYFileDataSource.icpp\"\n 39#undef inline\n 40#endif\n-41#include \n-42\n-43// Start section of namespace SILLY\n-44namespace _\bS_\bI_\bL_\bL_\bY\n-45{\n-46int PNGImageContext::read(png_bytep data, png_size_t length)\n-47{\n-48 //printf(\"PNG Read: %d bytes offset: %d, size %d\\n\",\n-49 // length, d_offset, d_data->getSize());\n-50\n-51 if (d_offset + length > d_data->_\bg_\be_\bt_\bS_\bi_\bz_\be())\n-52 return -1;\n-53 memcpy(data, d_data->_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() + d_offset, length);\n-54 d_offset += length;\n-55 return length;\n-56}\n-57\n-58\n-59PNGImageContext::PNGImageContext(DataSource* data)\n-60 : ImageContext(0,0), d_offset(0), d_data(data), d_png_ptr(0), d_info_ptr(0)\n-61{\n-62\n-63}\n-64\n-65PNGImageContext::~PNGImageContext()\n-66{\n-67 if (d_info_ptr)\n-68 png_destroy_read_struct(&d_png_ptr, &d_info_ptr, 0);\n-69 if (d_png_ptr)\n-70 png_destroy_read_struct(&d_png_ptr, 0, 0);\n-71}\n-72\n-73\n-74void PNGImageContext::setImageSize()\n-75{\n-76 setWidth(png_get_image_width(d_png_ptr, d_info_ptr));\n-77 setHeight(png_get_image_height(d_png_ptr, d_info_ptr));\n-78\n-79}\n-80\n-81\n-82} // End section of namespace SILLY\n+41#include \n+42// Start section of namespace SILLY\n+43namespace _\bS_\bI_\bL_\bL_\bY\n+44{\n+45\n+_\b4_\b6_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const char* filename)\n+47 : d_error(true), d_bytes(0), d_size(0)\n+48{\n+49 FILE* data = fopen(filename, \"rb\");\n+50 if (data)\n+51 {\n+52 long status = fseek(data, 0, SEEK_END);\n+53 if (status == -1)\n+54 {\n+55 fclose(data);\n+56 return;\n+57 }\n+58 status = ftell(data);\n+59 if (status == -1)\n+60 {\n+61 fclose(data);\n+62 return;\n+63 }\n+64 d_size = status;\n+65 if (d_size)\n+66 d_bytes = new byte[d_size];\n+67 if (! d_bytes)\n+68 {\n+69 fclose(data);\n+70 return;\n+71 }\n+72 rewind(data);\n+73 status = fread(reinterpret_cast(d_bytes), 1, d_size, data);\n+74 if (status != d_size)\n+75 {\n+76 delete [] d_bytes;\n+77 d_bytes = 0;\n+78 fclose(data);\n+79 }\n+80 fclose(data);\n+81 d_error = false;\n+82 }\n+83}\n+84\n+85\n+_\b8_\b6_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\b~_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be()\n+87{\n+88 delete [] d_bytes;\n+89}\n+90\n+91\n+92} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n-virtual size_t getSize() const =0\n-Return the size of the data.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n-virtual const byte * getDataPtr() const =0\n-Get raw access to the image data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+FileDataSource(const char *filename)\n+Create a data source from an existing file.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\b~_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+~FileDataSource()\n+destructor\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bc_\bp_\bp_\b:_\b8_\b6\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00032_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00032_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/loaders/SILLYJPGImageLoader.cpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/src/SILLYMemoryDataSource.cpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYJPGImageLoader.cpp
\n+
SILLYMemoryDataSource.cpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYJPGImageLoader.cpp
\n-
3 created: 11 Jun 2006
\n+
2 filename: SILLYMemoryDataSource.cpp
\n+
3 created: 10 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Definition of JPGImageLoader methods
\n+
6 purpose: SILLYMemoryDataSource definition for the SILLY library
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,150 +80,40 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30#ifdef HAVE_CONFIG_H
\n
31#include <config.h>
\n
32#endif
\n
33
\n-
34#include "loaders/SILLYJPGImageLoader.h"
\n+
34#include "SILLYMemoryDataSource.h"
\n
35
\n
36#ifndef SILLY_OPT_INLINE
\n
37#define inline
\n-
38#include "loaders/SILLYJPGImageLoader.icpp"
\n+
38#include "SILLYMemoryDataSource.icpp"
\n
39#undef inline
\n-
40#endif
\n-
41#include "loaders/SILLYJPGImageContext.h"
\n-
42
\n-
43// Start section of namespace SILLY
\n-
44namespace SILLY
\n-
45{
\n-
46JPGImageLoader::JPGImageLoader()
\n-
47 : ImageLoader("JPG Image Loader based on jpeg-6b")
\n+
40#endif
\n+
41
\n+
42// Start of SILLY namespace section
\n+
43namespace SILLY
\n+
44{
\n+
45
\n+
\n+
46MemoryDataSource::MemoryDataSource(const byte* data, size_t size)
\n+
47 : d_bytes(data), d_size(size)
\n
48{
\n-
49}
\n-
50
\n-
51JPGImageLoader::~JPGImageLoader()
\n-
52{
\n-
53}
\n+
49 assert(data && "ASSERT: data point to an invalid memory");
\n+
50 assert(size && "ASSERT: size is equal to 0");
\n+
51}
\n+
\n+
52
\n+
53} // End of SILLY namespace section
\n
54
\n
55
\n-
\n-
56ImageContext* JPGImageLoader::loadHeader(PixelFormat& formatSource, DataSource* data)
\n-
57{
\n-\n-
59 jpg->d_source = data;
\n-
60
\n-
61 if (! jpg)
\n-
62 return 0;
\n-
63 if (setjmp(jpg->setjmp_buffer))
\n-
64 {
\n-
65 delete jpg;
\n-
66 return 0;
\n-
67 }
\n-
68 jpeg_read_header(&(jpg->cinfo), TRUE);
\n-
69 if (! jpeg_start_decompress(&(jpg->cinfo)))
\n-
70 {
\n-
71 delete jpg;
\n-
72 return 0;
\n-
73 }
\n-
74
\n-
75
\n-
76 if (jpg->cinfo.output_components != 1 && jpg->cinfo.output_components != 3)
\n-
77 {
\n-
78 printf("JPG unsupported bpp: %d\\n", jpg->cinfo.output_components );
\n-
79 jpeg_finish_decompress(& jpg->cinfo);
\n-
80 delete jpg;
\n-
81 return 0;
\n-
82 }
\n-
83 formatSource = PF_RGB; // It's not true but we handle both the same way
\n-
84 //printf("Image info: size: %dx%d - bpp: %d\\n", jpg->cinfo.output_width, jpg->cinfo.output_height, jpg->cinfo.output_components);
\n-
85
\n-
86 jpg->setImageSize();
\n-
87 return jpg;
\n-
88}
\n-
\n-
89
\n-
\n-
90bool JPGImageLoader::loadImageData(PixelOrigin origin,
\n-
91 DataSource* data,
\n-
92 ImageContext* context)
\n-
93{
\n-
94 JPGImageContext* jpg = static_cast<JPGImageContext*>(context);
\n-
95
\n-
96 // Allocate a buffer
\n-
97 int row_stride = jpg->getWidth() * jpg->cinfo.output_components;
\n-
98 JSAMPARRAY buffer = (* jpg->cinfo.mem->alloc_sarray)(
\n-
99 (j_common_ptr)(& jpg->cinfo),
\n-
100 JPOOL_IMAGE,
\n-
101 row_stride,
\n-
102 1);
\n-
103 bool finished = true;
\n-
104 size_t height = jpg->getHeight();
\n-
105 size_t width = jpg->getWidth();
\n-
106
\n-
107
\n-
108 while(jpg->cinfo.output_scanline < height)
\n-
109 {
\n-
110 int num_rows = jpeg_read_scanlines(& jpg->cinfo, buffer, 1);
\n-
111 if (num_rows != 1)
\n-
112 {
\n-
113 jpeg_finish_decompress(& jpg->cinfo);
\n-
114 return false;
\n-
115 }
\n-
116 byte red;
\n-
117 byte green;
\n-
118 byte blue;
\n-
119 const byte alpha = 0xff;
\n-
120 byte* in = (byte*)(*buffer);
\n-
121 // Grayscale image
\n-
122 if (jpg->cinfo.output_components == 1)
\n-
123 {
\n-
124 for(size_t i = 0 ; i < width * num_rows ; ++i)
\n-
125 {
\n-
126 red = *in;
\n-
127 green = *in;
\n-
128 blue = *in;
\n-
129 jpg->setNextPixel(red, green, blue, alpha);
\n-
130 in += 1;
\n-
131 }
\n-
132 }
\n-
133 // RGB image
\n-
134 else
\n-
135 {
\n-
136 for(size_t i = 0 ; i < width * num_rows ; ++i)
\n-
137 {
\n-
138 red = *(in++);
\n-
139 green = *(in++);
\n-
140 blue = *(in++);
\n-
141 jpg->setNextPixel(red, green, blue, alpha);
\n-
142 }
\n-
143 }
\n-
144 }
\n-
145 jpeg_finish_decompress(& jpg->cinfo);
\n-
146
\n-
147 if (origin == PO_BOTTOM_LEFT)
\n-
148 return jpg->flipVertically();
\n-
149 return true;
\n-
150}
\n-
\n-
151
\n-
152
\n-
153
\n-
154
\n-
155
\n-
156
\n-
157} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
Image Context for JPG image loader.
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
\n-
bool flipVertically()
Flip pixel ordering.
\n+
Simple Image Loading LibrarY namespace.
\n+
MemoryDataSource(const byte *data, size_t size)
Create a data source from an existing memory area.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bs_\br_\bc\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYJPGImageLoader.cpp\n+SILLYMemoryDataSource.cpp\n 1/***********************************************************************\n-2 filename: SILLYJPGImageLoader.cpp\n-3 created: 11 Jun 2006\n+2 filename: SILLYMemoryDataSource.cpp\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Definition of JPGImageLoader methods\n+6 purpose: SILLYMemoryDataSource definition for the SILLY library\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -34,162 +33,38 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30#ifdef HAVE_CONFIG_H\n 31#include \n 32#endif\n 33\n-34#include \"loaders/SILLYJPGImageLoader.h\"\n+34#include \"SILLYMemoryDataSource.h\"\n 35\n 36#ifndef SILLY_OPT_INLINE\n 37#define inline\n-38#include \"loaders/SILLYJPGImageLoader.icpp\"\n+38#include \"SILLYMemoryDataSource.icpp\"\n 39#undef inline\n 40#endif\n-41#include \"loaders/SILLYJPGImageContext.h\"\n-42\n-43// Start section of namespace SILLY\n-44namespace _\bS_\bI_\bL_\bL_\bY\n-45{\n-46JPGImageLoader::JPGImageLoader()\n-47 : ImageLoader(\"JPG Image Loader based on jpeg-6b\")\n+41\n+42// Start of SILLY namespace section\n+43namespace _\bS_\bI_\bL_\bL_\bY\n+44{\n+45\n+_\b4_\b6_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const byte* data, size_t size)\n+47 : d_bytes(data), d_size(size)\n 48{\n-49}\n-50\n-51JPGImageLoader::~JPGImageLoader()\n-52{\n-53}\n+49 assert(data && \"ASSERT: data point to an invalid memory\");\n+50 assert(size && \"ASSERT: size is equal to 0\");\n+51}\n+52\n+53} // End of SILLY namespace section\n 54\n 55\n-_\b5_\b6_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* JPGImageLoader::loadHeader(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource,\n-_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data)\n-57{\n-58 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = new _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt;\n-59 jpg->d_source = data;\n-60\n-61 if (! jpg)\n-62 return 0;\n-63 if (setjmp(jpg->setjmp_buffer))\n-64 {\n-65 delete jpg;\n-66 return 0;\n-67 }\n-68 jpeg_read_header(&(jpg->cinfo), TRUE);\n-69 if (! jpeg_start_decompress(&(jpg->cinfo)))\n-70 {\n-71 delete jpg;\n-72 return 0;\n-73 }\n-74\n-75\n-76 if (jpg->cinfo.output_components != 1 && jpg->cinfo.output_components != 3)\n-77 {\n-78 printf(\"JPG unsupported bpp: %d\\n\", jpg->cinfo.output_components );\n-79 jpeg_finish_decompress(& jpg->cinfo);\n-80 delete jpg;\n-81 return 0;\n-82 }\n-83 formatSource = PF_RGB; // It's not true but we handle both the same way\n-84 //printf(\"Image info: size: %dx%d - bpp: %d\\n\", jpg->cinfo.output_width,\n-jpg->cinfo.output_height, jpg->cinfo.output_components);\n-85\n-86 jpg->setImageSize();\n-87 return jpg;\n-88}\n-89\n-_\b9_\b0bool JPGImageLoader::loadImageData(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n-91 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n-92 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context)\n-93{\n-94 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* jpg = static_cast<_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*>(context);\n-95\n-96 // Allocate a buffer\n-97 int row_stride = jpg->getWidth() * jpg->cinfo.output_components;\n-98 JSAMPARRAY buffer = (* jpg->cinfo.mem->alloc_sarray)(\n-99 (j_common_ptr)(& jpg->cinfo),\n-100 JPOOL_IMAGE,\n-101 row_stride,\n-102 1);\n-103 bool finished = true;\n-104 size_t height = jpg->getHeight();\n-105 size_t width = jpg->getWidth();\n-106\n-107\n-108 while(jpg->cinfo.output_scanline < height)\n-109 {\n-110 int num_rows = jpeg_read_scanlines(& jpg->cinfo, buffer, 1);\n-111 if (num_rows != 1)\n-112 {\n-113 jpeg_finish_decompress(& jpg->cinfo);\n-114 return false;\n-115 }\n-116 byte red;\n-117 byte green;\n-118 byte blue;\n-119 const byte alpha = 0xff;\n-120 byte* in = (byte*)(*buffer);\n-121 // Grayscale image\n-122 if (jpg->cinfo.output_components == 1)\n-123 {\n-124 for(size_t i = 0 ; i < width * num_rows ; ++i)\n-125 {\n-126 red = *in;\n-127 green = *in;\n-128 blue = *in;\n-129 jpg->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-130 in += 1;\n-131 }\n-132 }\n-133 // RGB image\n-134 else\n-135 {\n-136 for(size_t i = 0 ; i < width * num_rows ; ++i)\n-137 {\n-138 red = *(in++);\n-139 green = *(in++);\n-140 blue = *(in++);\n-141 jpg->_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(red, green, blue, alpha);\n-142 }\n-143 }\n-144 }\n-145 jpeg_finish_decompress(& jpg->cinfo);\n-146\n-147 if (origin == PO_BOTTOM_LEFT)\n-148 return jpg->_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by();\n-149 return true;\n-150}\n-151\n-152\n-153\n-154\n-155\n-156\n-157} // End section of namespace SILLY\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat\n-List all pixel format supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n-PixelOrigin\n-List all pixel origin supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Image Context for JPG image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b5_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Store the data needed by an ImageLoader object during the parsing of an image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl\n-void setNextPixel(byte red, byte green, byte bleu, byte alpha)\n-Set the next pixel of the image.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bf_\bl_\bi_\bp_\bV_\be_\br_\bt_\bi_\bc_\ba_\bl_\bl_\by\n-bool flipVertically()\n-Flip pixel ordering.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b5\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+MemoryDataSource(const byte *data, size_t size)\n+Create a data source from an existing memory area.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bc_\bp_\bp_\b:_\b4_\b6\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00035_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00035_source.html", "unified_diff": "@@ -97,15 +97,15 @@\n
44{
\n
45
\n
46} // End of SILLY namespace section
\n
47
\n
48
\n
49
\n
50
\n-
Simple Image Loading LibrarY namespace.
\n+
Simple Image Loading LibrarY namespace.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00038_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00038_source.html", "unified_diff": "@@ -133,15 +133,15 @@\n
79 delete [] tmp;
\n
80 return true;
\n
81}
\n
\n
82
\n
83
\n
84} // End section of namespace SILLY
\n-
Simple Image Loading LibrarY namespace.
\n+
Simple Image Loading LibrarY namespace.
\n
bool flipVertically()
Flip pixel ordering.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00041_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00041_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.icpp Source File\n \n \n \n \n \n \n
\n@@ -44,84 +44,64 @@\n \n \n
\n
\n-
SILLYMemoryDataSource.h
\n+
SILLYImageLoader.icpp
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYMemoryDataSource.h
\n-
3 created: 10 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: SILLYMemoryDataSource declaration for the SILLY library
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYMemoryDataSource_h_
\n-
31#define _SILLYMemoryDataSource_h_
\n-
32#include "SILLYBase.h"
\n-
33#include "SILLYDataSource.h"
\n-
34// Start of section namespace SILLY
\n-
35namespace SILLY
\n+
1/***********************************************************************
\n+
2 filename: ImageLoader.icpp
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Inline function definition for ImageLoader class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30
\n+
31// Start of section namespace SILLY
\n+
32namespace SILLY
\n+
33{
\n+
34inline ImageLoader::ImageLoader(const char* name)
\n+
35 : d_name(name)
\n
36{
\n-
37
\n-
\n-
48class SILLY_EXPORT MemoryDataSource : public DataSource
\n-
49{
\n-
50public:
\n-
63 MemoryDataSource(const byte* data, size_t size);
\n-
64
\n-
65
\n-
66 const byte* getDataPtr() const;
\n-
67
\n-
68 size_t getSize() const;
\n-
69private:
\n-
70 const byte* d_bytes;
\n-
71 size_t d_size;
\n-
72};
\n-
\n-
73
\n-
74
\n-
75} // End of section namespace SILLY
\n-
76
\n-
77// Inclue inline function when needed
\n-
78#ifdef SILLY_OPT_INLINE
\n-
79#include "SILLYMemoryDataSource.icpp"
\n-
80#endif
\n-
81
\n-
82#endif // end of guard _SILLYMemoryDataSource_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
This is an abstract class used to provide data to the loader.
\n-
Load an image from a memory area.
\n-
const byte * getDataPtr() const
Get raw access to the image data.
\n-
size_t getSize() const
Return the size of the data.
\n+
37}
\n+
38inline ImageLoader::~ImageLoader()
\n+
39{
\n+
40}
\n+
41inline const char* ImageLoader::getIdentifierString() const
\n+
42{
\n+
43 return d_name;
\n+
44}
\n+
45
\n+
46} // End of section namespace SILLY
\n+
47
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYMemoryDataSource.h\n+SILLYImageLoader.icpp\n 1/***********************************************************************\n-2 filename: SILLYMemoryDataSource.h\n+2 filename: ImageLoader.icpp\n 3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: SILLYMemoryDataSource declaration for the SILLY library\n+6 purpose: Inline function definition for ImageLoader class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,55 +29,27 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYMemoryDataSource_h_\n-31#define _SILLYMemoryDataSource_h_\n-32#include \"SILLYBase.h\"\n-33#include \"SILLYDataSource.h\"\n-34// Start of section namespace SILLY\n-35namespace _\bS_\bI_\bL_\bL_\bY\n+30\n+31// Start of section namespace SILLY\n+32namespace SILLY\n+33{\n+34inline ImageLoader::ImageLoader(const char* name)\n+35 : d_name(name)\n 36{\n-37\n-_\b4_\b8class SILLY_EXPORT _\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be : public _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-49{\n-50public:\n-63 _\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const byte* data, size_t size);\n-64\n-65\n-_\b6_\b6 const byte* _\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() const;\n-67\n-_\b6_\b8 size_t _\bg_\be_\bt_\bS_\bi_\bz_\be() const;\n-69private:\n-70 const byte* d_bytes;\n-71 size_t d_size;\n-72};\n-73\n-74\n-75} // End of section namespace SILLY\n-76\n-77// Inclue inline function when needed\n-78#ifdef SILLY_OPT_INLINE\n-79#include \"SILLYMemoryDataSource.icpp\"\n-80#endif\n-81\n-82#endif // end of guard _SILLYMemoryDataSource_h_\n-_\bS_\bI_\bL_\bL_\bY\n-Simple Image Loading LibrarY namespace.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-Load an image from a memory area.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b9\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n-const byte * getDataPtr() const\n-Get raw access to the image data.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n-size_t getSize() const\n-Return the size of the data.\n+37}\n+38inline ImageLoader::~ImageLoader()\n+39{\n+40}\n+41inline const char* ImageLoader::getIdentifierString() const\n+42{\n+43 return d_name;\n+44}\n+45\n+46} // End of section namespace SILLY\n+47\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00044_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00044_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.h Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYImageLoaderManager.h
\n+
SILLYPNGImageLoader.h
\n
\n
\n
1/***********************************************************************
\n-
2 filename: ImageLoaderManager.h
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYPNGImageLoader.h
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Manage all available loader
\n+
6 purpose: Declaration of the PNGImageLoader class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -76,80 +76,58 @@\n
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n-
30#ifndef _SILLYImageLoaderManager_h_
\n-
31#define _SILLYImageLoaderManager_h_
\n+
30#ifndef _SILLYPNGImageLoader_h_
\n+
31#define _SILLYPNGImageLoader_h_
\n
32#include "SILLYBase.h"
\n-
33#include <vector>
\n-
34// Start of section namespace SILLY
\n-
35namespace SILLY
\n-
36{
\n-
37class ImageLoader; // Forward declaration
\n-
42typedef std::vector<ImageLoader*> ImageLoaderList;
\n-
43
\n-
44#if defined(_MSC_VER)
\n-
45
\n-
46# pragma warning(push)
\n-
47
\n-
48# pragma warning(disable : 4251)
\n-
49
\n-
50#endif
\n-
51
\n-
\n-
56class SILLY_EXPORT ImageLoaderManager
\n-
57{
\n-
58
\n-
59public:
\n-\n-\n-
74 ImageLoaderList::iterator begin();
\n-
79 ImageLoaderList::iterator end();
\n-
86 void add(ImageLoader* loader);
\n-
87
\n-
88private:
\n-
89 ImageLoaderList d_loaders;
\n-
90
\n-
91public:
\n-
92 static ImageLoaderManager* getSingletonPtr();
\n-
93 static ImageLoaderManager& getSingleton();
\n-
94
\n-
95private:
\n-
96 static ImageLoaderManager* d_instance;
\n-
97
\n-
98 // Disabled operations
\n-\n-\n-
101};
\n+
33#include "SILLYImageLoader.h"
\n+
34#include "SILLYDataSource.h"
\n+
35// Start of section namespace SILLY
\n+
36namespace SILLY
\n+
37{
\n+
\n+\n+
43{
\n+
44public:
\n+\n+
46
\n+\n+
48
\n+
49 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
\n+
50
\n+
51 bool loadImageData(PixelOrigin origin,
\n+
52 DataSource* data,
\n+
53 ImageContext* context);
\n+
54private:
\n+
55
\n+
56};
\n
\n-
102
\n-
103#if defined(_MSC_VER)
\n-
104
\n-
105# pragma warning(pop)
\n-
106
\n-
107#endif
\n-
108
\n-
109} // End of section namespace SILLY
\n-
110
\n-
111// Inclue inline function when needed
\n-
112#ifdef SILLY_OPT_INLINE
\n-
113#include "SILLYImageLoaderManager.icpp"
\n-
114#endif
\n-
115
\n-
116#endif // end of guard _SILLYImageLoaderManager_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
std::vector< ImageLoader * > ImageLoaderList
Typename for a collection of image loader.
\n-
This is an abstract class that define the interface of all image loader.
\n-
Manage the list of all supported ImageLoader.
\n-
void add(ImageLoader *loader)
Register an ImageLoader object.
\n-
ImageLoaderList::iterator begin()
Get an iterator to the first ImageLoader registered.
\n-
ImageLoaderList::iterator end()
Get an iterator to the first not registered ImageLoader.
\n+
57
\n+
58
\n+
59} // End of section namespace SILLY
\n+
60
\n+
61// Inclue inline function when needed
\n+
62#ifdef SILLY_OPT_INLINE
\n+
63#include "SILLYPNGImageLoader.icpp"
\n+
64#endif
\n+
65
\n+
66#endif // end of guard _SILLYPNGImageLoader_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
Loader for PNG Image.
\n+
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
\n+
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
This is an abstract class that define the interface of all image loader.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImageLoaderManager.h\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYPNGImageLoader.h\n 1/***********************************************************************\n-2 filename: ImageLoaderManager.h\n-3 created: 10 Jun 2006\n+2 filename: SILLYPNGImageLoader.h\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Manage all available loader\n+6 purpose: Declaration of the PNGImageLoader class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,88 +30,73 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYImageLoaderManager_h_\n-31#define _SILLYImageLoaderManager_h_\n+30#ifndef _SILLYPNGImageLoader_h_\n+31#define _SILLYPNGImageLoader_h_\n 32#include \"SILLYBase.h\"\n-33#include \n-34// Start of section namespace SILLY\n-35namespace _\bS_\bI_\bL_\bL_\bY\n-36{\n-37class ImageLoader; // Forward declaration\n-_\b4_\b2typedef std::vector _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bL_\bi_\bs_\bt;\n-43\n-44#if defined(_MSC_VER)\n-45\n-46# pragma warning(push)\n-47\n-48# pragma warning(disable : 4251)\n-49\n-50#endif\n-51\n-_\b5_\b6class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br\n-57{\n+33#include \"SILLYImageLoader.h\"\n+34#include \"SILLYDataSource.h\"\n+35// Start of section namespace SILLY\n+36namespace _\bS_\bI_\bL_\bL_\bY\n+37{\n+_\b4_\b2class _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br : public _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+43{\n+44public:\n+45 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+46\n+47 _\b~_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+48\n+49 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n+50\n+51 bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n+52 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n+53 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context);\n+54private:\n+55\n+56};\n+57\n 58\n-59public:\n-64 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br();\n-69 _\b~_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br();\n-_\b7_\b4 ImageLoaderList::iterator _\bb_\be_\bg_\bi_\bn();\n-_\b7_\b9 ImageLoaderList::iterator _\be_\bn_\bd();\n-_\b8_\b6 void _\ba_\bd_\bd(_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br* loader);\n-87\n-88private:\n-89 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bL_\bi_\bs_\bt d_loaders;\n-90\n-91public:\n-92 static _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br* getSingletonPtr();\n-93 static _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br& getSingleton();\n-94\n-95private:\n-96 static _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br* d_instance;\n-97\n-98 // Disabled operations\n-99 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br(_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br&);\n-100 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br& operator=(_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br&);\n-101};\n-102\n-103#if defined(_MSC_VER)\n-104\n-105# pragma warning(pop)\n-106\n-107#endif\n-108\n-109} // End of section namespace SILLY\n-110\n-111// Inclue inline function when needed\n-112#ifdef SILLY_OPT_INLINE\n-113#include \"SILLYImageLoaderManager.icpp\"\n-114#endif\n-115\n-116#endif // end of guard _SILLYImageLoaderManager_h_\n+59} // End of section namespace SILLY\n+60\n+61// Inclue inline function when needed\n+62#ifdef SILLY_OPT_INLINE\n+63#include \"SILLYPNGImageLoader.icpp\"\n+64#endif\n+65\n+66#endif // end of guard _SILLYPNGImageLoader_h_\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bL_\bi_\bs_\bt\n-std::vector< ImageLoader * > ImageLoaderList\n-Typename for a collection of image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b._\bh_\b:_\b4_\b2\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat\n+List all pixel format supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n+PixelOrigin\n+List all pixel origin supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+Loader for PNG Image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b3\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n+ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)\n+Parse the header of the image and fill the header struct.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b8_\b8\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n+bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)\n+Parse the pixels data of the image and fill the header struct.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b1_\b5_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Store the data needed by an ImageLoader object during the parsing of an image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n This is an abstract class that define the interface of all image loader.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br\n-Manage the list of all supported ImageLoader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b._\bh_\b:_\b5_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b:_\b:_\ba_\bd_\bd\n-void add(ImageLoader *loader)\n-Register an ImageLoader object.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b:_\b:_\bb_\be_\bg_\bi_\bn\n-ImageLoaderList::iterator begin()\n-Get an iterator to the first ImageLoader registered.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b:_\b:_\be_\bn_\bd\n-ImageLoaderList::iterator end()\n-Get an iterator to the first not registered ImageLoader.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00047_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00047_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYImageLoaderManager.icpp
\n+
SILLYJPGImageContext.icpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYImageLoaderManager.icpp
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYJPGImageContext.icpp
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Inline definition for ImageLoaderManager class
\n+
6 purpose: Inline definition for JPG context
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,43 +80,17 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30
\n
31// Start of section namespace SILLY
\n
32namespace SILLY
\n
33{
\n-
34inline ImageLoaderList::iterator ImageLoaderManager::begin()
\n-
35{
\n-
36 return d_loaders.begin();
\n-
37}
\n-
38
\n-
39inline ImageLoaderList::iterator ImageLoaderManager::end()
\n-
40{
\n-
41 return d_loaders.end();
\n-
42}
\n-
43
\n-
44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr()
\n-
45{
\n-
46 return d_instance;
\n-
47}
\n-
48
\n-
49inline ImageLoaderManager& ImageLoaderManager::getSingleton()
\n-
50{
\n-
51 assert(d_instance && "ASSERT: Singleton object not yet created");
\n-
52 return *d_instance;
\n-
53}
\n-
54
\n-
55inline void ImageLoaderManager::add(ImageLoader* loader)
\n-
56{
\n-
57 assert(loader && "ASSERT: adding a none existing loader object");
\n-
58 d_loaders.push_back(loader);
\n-
59}
\n-
60
\n-
61} // End of section namespace SILLY
\n-
62
\n+
34
\n+
35} // End of section namespace SILLY
\n+
36
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImageLoaderManager.icpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYJPGImageContext.icpp\n 1/***********************************************************************\n-2 filename: SILLYImageLoaderManager.icpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYJPGImageContext.icpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline definition for ImageLoaderManager class\n+6 purpose: Inline definition for JPG context\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -33,38 +34,12 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30\n 31// Start of section namespace SILLY\n 32namespace SILLY\n 33{\n-34inline ImageLoaderList::iterator ImageLoaderManager::begin()\n-35{\n-36 return d_loaders.begin();\n-37}\n-38\n-39inline ImageLoaderList::iterator ImageLoaderManager::end()\n-40{\n-41 return d_loaders.end();\n-42}\n-43\n-44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr()\n-45{\n-46 return d_instance;\n-47}\n-48\n-49inline ImageLoaderManager& ImageLoaderManager::getSingleton()\n-50{\n-51 assert(d_instance && \"ASSERT: Singleton object not yet created\");\n-52 return *d_instance;\n-53}\n-54\n-55inline void ImageLoaderManager::add(ImageLoader* loader)\n-56{\n-57 assert(loader && \"ASSERT: adding a none existing loader object\");\n-58 d_loaders.push_back(loader);\n-59}\n-60\n-61} // End of section namespace SILLY\n-62\n+34\n+35} // End of section namespace SILLY\n+36\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00050_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00050_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYDataSource.icpp
\n+
SILLYTGAImageLoader.icpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYDataSource.icpp
\n-
3 created: 10 Jun 2006
\n-
4 author: ode@dalfy.dalfy.dyndns.org
\n+
2 filename: SILLYTGAImageLoader.icpp
\n+
3 created: 11 Jun 2006
\n+
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class
\n+
6 purpose: Inline defintion of TGAImageLoader class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,26 +80,17 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30
\n
31// Start of section namespace SILLY
\n
32namespace SILLY
\n
33{
\n-
34inline DataSource::~DataSource()
\n-
35{
\n-
36}
\n-
37
\n-
38inline byte DataSource::operator[](size_t offset) const
\n-
39{
\n-
40 assert(offset < getSize() && "ASSERT: Trying to access pixel outside of the data");
\n-
41 return getDataPtr()[offset];
\n-
42}
\n-
43
\n-
44} // End of section namespace SILLY
\n-
45
\n+
34
\n+
35} // End of section namespace SILLY
\n+
36
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYDataSource.icpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYTGAImageLoader.icpp\n 1/***********************************************************************\n-2 filename: SILLYDataSource.icpp\n-3 created: 10 Jun 2006\n-4 author: ode@dalfy.dalfy.dyndns.org\n+2 filename: SILLYTGAImageLoader.icpp\n+3 created: 11 Jun 2006\n+4 author: Olivier Delannoy\n 5\n-6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class\n+6 purpose: Inline defintion of TGAImageLoader class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -33,22 +34,12 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30\n 31// Start of section namespace SILLY\n 32namespace SILLY\n 33{\n-34inline DataSource::~DataSource()\n-35{\n-36}\n-37\n-38inline byte DataSource::operator[](size_t offset) const\n-39{\n-40 assert(offset < getSize() && \"ASSERT: Trying to access pixel outside of the\n-data\");\n-41 return getDataPtr()[offset];\n-42}\n-43\n-44} // End of section namespace SILLY\n-45\n+34\n+35} // End of section namespace SILLY\n+36\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00053_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00053_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.h Source File\n \n \n \n \n \n \n
\n@@ -40,71 +40,104 @@\n \n \n
\n
\n-
SILLYFileDataSource.icpp
\n+
SILLYPNGImageContext.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYFileDataSource.icpp
\n-
3 created: 20 Jul 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Inline function definition for the FileDataSource class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30
\n-
31// Start of section namespace SILLY
\n-
32namespace SILLY
\n-
33{
\n-
34inline bool FileDataSource::isValid() const
\n-
35{
\n-
36 return d_error;
\n-
37}
\n-
38
\n-
39inline const byte* FileDataSource::getDataPtr() const
\n-
40{
\n-
41 return d_bytes;
\n-
42}
\n-
43
\n-
44inline size_t FileDataSource::getSize() const
\n-
45{
\n-
46 return d_size;
\n-
47}
\n-
48
\n-
49} // End of section namespace SILLY
\n-
50
\n+
1/***********************************************************************
\n+
2 filename: SILLYPNGImageContext.h
\n+
3 created: 11 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Declaration of the PNGImageContext class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLYPNGImageContext_h_
\n+
31#define _SILLYPNGImageContext_h_
\n+
32#include "SILLYBase.h"
\n+
33#include "SILLYImageContext.h"
\n+
34#include "SILLYDataSource.h"
\n+
35#include <png.h>
\n+
36// Start of section namespace SILLY
\n+
37namespace SILLY
\n+
38{
\n+
39
\n+
\n+
45class SILLY_EXPORT PNGImageContext : public ImageContext
\n+
46{
\n+
47public:
\n+\n+\n+
50
\n+
51 int read(png_bytep data, png_size_t length);
\n+
52
\n+
53
\n+
54
\n+
55private:
\n+
56 void setImageSize();
\n+
57
\n+
58 size_t d_offset;
\n+
59
\n+
60 DataSource* d_data;
\n+
61
\n+
62 png_structp d_png_ptr;
\n+
63
\n+
64 png_infop d_info_ptr;
\n+
65
\n+
66 size_t d_bit_depth;
\n+
67 size_t d_num_channels;
\n+
68
\n+
69
\n+
70 friend class PNGImageLoader;
\n+
71};
\n+
\n+
72
\n+
73
\n+
74} // End of section namespace SILLY
\n+
75
\n+
76// Inclue inline function when needed
\n+
77#ifdef SILLY_OPT_INLINE
\n+
78#include "SILLYPNGImageContext.icpp"
\n+
79#endif
\n+
80
\n+
81#endif // end of guard _SILLYPNGImageContext_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
Image Context for PNG Image Loader.
\n+
Loader for PNG Image.
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYFileDataSource.icpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYPNGImageContext.h\n 1/***********************************************************************\n-2 filename: SILLYFileDataSource.icpp\n-3 created: 20 Jul 2006\n+2 filename: SILLYPNGImageContext.h\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline function definition for the FileDataSource class\n+6 purpose: Declaration of the PNGImageContext class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,30 +30,71 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30\n-31// Start of section namespace SILLY\n-32namespace SILLY\n-33{\n-34inline bool FileDataSource::isValid() const\n-35{\n-36 return d_error;\n-37}\n-38\n-39inline const byte* FileDataSource::getDataPtr() const\n-40{\n-41 return d_bytes;\n-42}\n-43\n-44inline size_t FileDataSource::getSize() const\n-45{\n-46 return d_size;\n-47}\n-48\n-49} // End of section namespace SILLY\n+30#ifndef _SILLYPNGImageContext_h_\n+31#define _SILLYPNGImageContext_h_\n+32#include \"SILLYBase.h\"\n+33#include \"SILLYImageContext.h\"\n+34#include \"SILLYDataSource.h\"\n+35#include \n+36// Start of section namespace SILLY\n+37namespace _\bS_\bI_\bL_\bL_\bY\n+38{\n+39\n+_\b4_\b5class SILLY_EXPORT _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt : public _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+46{\n+47public:\n+48 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n+49 _\b~_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n 50\n+51 int read(png_bytep data, png_size_t length);\n+52\n+53\n+54\n+55private:\n+56 void setImageSize();\n+57\n+58 size_t d_offset;\n+59\n+60 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* d_data;\n+61\n+62 png_structp d_png_ptr;\n+63\n+64 png_infop d_info_ptr;\n+65\n+66 size_t d_bit_depth;\n+67 size_t d_num_channels;\n+68\n+69\n+70 friend class _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br;\n+71};\n+72\n+73\n+74} // End of section namespace SILLY\n+75\n+76// Inclue inline function when needed\n+77#ifdef SILLY_OPT_INLINE\n+78#include \"SILLYPNGImageContext.icpp\"\n+79#endif\n+80\n+81#endif // end of guard _SILLYPNGImageContext_h_\n+_\bS_\bI_\bL_\bL_\bY\n+Simple Image Loading LibrarY namespace.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Image Context for PNG Image Loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+Loader for PNG Image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b3\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Store the data needed by an ImageLoader object during the parsing of an image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00056_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00056_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.h Source File\n \n \n \n \n \n \n
\n@@ -40,125 +40,98 @@\n \n \n
\n
\n-
SILLYImageContext.icpp
\n+
SILLYJPGImageContext.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYImageContext.icpp
\n-
3 created: 10 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Inline definition for ImageContext
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30
\n-
31// Start of section namespace SILLY
\n-
32namespace SILLY
\n-
33{
\n-
34
\n-
35inline ImageContext::ImageContext(size_t width, size_t height)
\n-
36 : d_pixels(0), d_length(0), d_width(width), d_height(height), d_currentOffset(0), d_format(PF_RGBA)
\n-
37{
\n-
38}
\n-
39
\n-
40
\n-
41inline ImageContext::~ImageContext()
\n-
42{
\n-
43}
\n-
44
\n+
1/***********************************************************************
\n+
2 filename: SILLYJPGImageContext.h
\n+
3 created: 11 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Declaration of the JPGImageContext class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLYJPGImageContext_h_
\n+
31#define _SILLYJPGImageContext_h_
\n+
32#include "SILLYBase.h"
\n+
33#include "SILLYImageContext.h"
\n+
34#include "SILLYDataSource.h"
\n+
35// Start of section namespace SILLY
\n+
36#include <setjmp.h>
\n+
37#include <stdio.h>
\n+
38#include <string.h>
\n+
39extern "C"
\n+
40{
\n+
41#include <jpeglib.h>
\n+
42}
\n+
43namespace SILLY
\n+
44{
\n
45
\n-
46inline void ImageContext::setDestination(byte* pixels, size_t length, PixelFormat format)
\n-
47{
\n-
48 d_pixels = pixels;
\n-
49 d_length = length;
\n-
50 d_currentOffset = 0;
\n-
51 d_format = format;
\n-
52}
\n-
53
\n-
54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte alpha)
\n-
55{
\n-
56 //assert(d_currentOffset < d_length && "ASSERT: try to set a pixel outside of the image");
\n-
57 switch(d_format)
\n-
58 {
\n-
59 case PF_A1B5G5R5:
\n-
60 // The hard part
\n-
61 assert(0 && "ASSERT: Not yet implemented");
\n-
62 break;
\n-
63 case PF_RGB:
\n-
64 // Ignore alpha channel
\n-
65 d_pixels[d_currentOffset++] = red;
\n-
66 d_pixels[d_currentOffset++] = green;
\n-
67 d_pixels[d_currentOffset++] = bleu;
\n-
68 break;
\n-
69
\n-
70 case PF_RGBA:
\n-
71 d_pixels[d_currentOffset++] = red;
\n-
72 d_pixels[d_currentOffset++] = green;
\n-
73 d_pixels[d_currentOffset++] = bleu;
\n-
74 d_pixels[d_currentOffset++] = alpha;
\n-
75 break;
\n-
76
\n-
77 }
\n-
78}
\n-
79inline size_t ImageContext::getWidth() const
\n-
80{
\n-
81 return d_width;
\n-
82}
\n-
83
\n-
84inline void ImageContext::setWidth(size_t width)
\n-
85{
\n-
86 d_width = width;
\n-
87}
\n-
88
\n-
89inline size_t ImageContext::getHeight() const
\n-
90{
\n-
91 return d_height;
\n-
92}
\n-
93
\n-
94inline void ImageContext::setHeight(size_t height)
\n-
95{
\n-
96 d_height = height;
\n-
97}
\n-
98inline PixelFormat ImageContext::getPixelFormat() const
\n-
99{
\n-
100 return d_format;
\n-
101}
\n-
102
\n-
103} // End of section namespace SILLY
\n-
104
\n+
\n+\n+
57{
\n+
58public:
\n+\n+\n+
61
\n+
62 void setImageSize();
\n+
63
\n+
64
\n+
65 jpeg_source_mgr src_mgr;
\n+
66 jpeg_decompress_struct cinfo;
\n+
67
\n+
68 jpeg_error_mgr d_error_mgr;
\n+
69 jmp_buf setjmp_buffer;
\n+
70 DataSource* d_source;
\n+
71};
\n+
\n+
72
\n+
73
\n+
74} // End of section namespace SILLY
\n+
75
\n+
76// Inclue inline function when needed
\n+
77#ifdef SILLY_OPT_INLINE
\n+
78#include "SILLYJPGImageContext.icpp"
\n+
79#endif
\n+
80
\n+
81#endif // end of guard _SILLYJPGImageContext_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
Image Context for JPG image loader.
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImageContext.icpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYJPGImageContext.h\n 1/***********************************************************************\n-2 filename: SILLYImageContext.icpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYJPGImageContext.h\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline definition for ImageContext\n+6 purpose: Declaration of the JPGImageContext class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,88 +30,63 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30\n-31// Start of section namespace SILLY\n-32namespace SILLY\n-33{\n-34\n-35inline ImageContext::ImageContext(size_t width, size_t height)\n-36 : d_pixels(0), d_length(0), d_width(width), d_height(height),\n-d_currentOffset(0), d_format(PF_RGBA)\n-37{\n-38}\n-39\n-40\n-41inline ImageContext::~ImageContext()\n-42{\n-43}\n-44\n+30#ifndef _SILLYJPGImageContext_h_\n+31#define _SILLYJPGImageContext_h_\n+32#include \"SILLYBase.h\"\n+33#include \"SILLYImageContext.h\"\n+34#include \"SILLYDataSource.h\"\n+35// Start of section namespace SILLY\n+36#include \n+37#include \n+38#include \n+39extern \"C\"\n+40{\n+41#include \n+42}\n+43namespace _\bS_\bI_\bL_\bL_\bY\n+44{\n 45\n-46inline void ImageContext::setDestination(byte* pixels, size_t length,\n-PixelFormat format)\n-47{\n-48 d_pixels = pixels;\n-49 d_length = length;\n-50 d_currentOffset = 0;\n-51 d_format = format;\n-52}\n-53\n-54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte\n-alpha)\n-55{\n-56 //assert(d_currentOffset < d_length && \"ASSERT: try to set a pixel outside\n-of the image\");\n-57 switch(d_format)\n-58 {\n-59 case PF_A1B5G5R5:\n-60 // The hard part\n-61 assert(0 && \"ASSERT: Not yet implemented\");\n-62 break;\n-63 case PF_RGB:\n-64 // Ignore alpha channel\n-65 d_pixels[d_currentOffset++] = red;\n-66 d_pixels[d_currentOffset++] = green;\n-67 d_pixels[d_currentOffset++] = bleu;\n-68 break;\n-69\n-70 case PF_RGBA:\n-71 d_pixels[d_currentOffset++] = red;\n-72 d_pixels[d_currentOffset++] = green;\n-73 d_pixels[d_currentOffset++] = bleu;\n-74 d_pixels[d_currentOffset++] = alpha;\n-75 break;\n-76\n-77 }\n-78}\n-79inline size_t ImageContext::getWidth() const\n-80{\n-81 return d_width;\n-82}\n-83\n-84inline void ImageContext::setWidth(size_t width)\n-85{\n-86 d_width = width;\n-87}\n-88\n-89inline size_t ImageContext::getHeight() const\n-90{\n-91 return d_height;\n-92}\n-93\n-94inline void ImageContext::setHeight(size_t height)\n-95{\n-96 d_height = height;\n-97}\n-98inline PixelFormat ImageContext::getPixelFormat() const\n-99{\n-100 return d_format;\n-101}\n-102\n-103} // End of section namespace SILLY\n-104\n+_\b5_\b6class _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt : public _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+57{\n+58public:\n+59 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n+60 _\b~_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n+61\n+62 void setImageSize();\n+63\n+64\n+65 jpeg_source_mgr src_mgr;\n+66 jpeg_decompress_struct cinfo;\n+67\n+68 jpeg_error_mgr d_error_mgr;\n+69 jmp_buf setjmp_buffer;\n+70 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* d_source;\n+71};\n+72\n+73\n+74} // End of section namespace SILLY\n+75\n+76// Inclue inline function when needed\n+77#ifdef SILLY_OPT_INLINE\n+78#include \"SILLYJPGImageContext.icpp\"\n+79#endif\n+80\n+81#endif // end of guard _SILLYJPGImageContext_h_\n+_\bS_\bI_\bL_\bL_\bY\n+Simple Image Loading LibrarY namespace.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Image Context for JPG image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b5_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Store the data needed by an ImageLoader object during the parsing of an image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00059_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00059_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYBase.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,107 +40,57 @@\n \n \n
\n
\n-
SILLYBase.h
\n+
SILLYPNGImageContext.icpp
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYBase.h
\n-
3 created: 2006/06/10
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Common header for the SILLY library
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYBase_h_
\n-
31#define _SILLYBase_h_
\n-
32#include <cassert>
\n-
33#include <cstddef>
\n-
34
\n-
35#if defined(USE_SILLYOPTIONS_H)
\n-
36#include "SILLYOptions.h"
\n-
37#endif
\n-
38
\n-
39#if defined(_WIN32) || defined(__WIN32__)
\n-
40# undef SILLY_OPT_INLINE // No inlining
\n-
41# undef SILLY_BE // Little Endian
\n-
42# ifdef SILLY_EXPORTS
\n-
43# define SILLY_EXPORT __declspec(dllexport)
\n-
44# else
\n-
45# define SILLY_EXPORT __declspec(dllimport)
\n-
46# endif
\n-
47#else
\n-
48# define SILLY_EXPORT
\n-
49#endif
\n-
50
\n-
51// Start of section namespace SILLY
\n-
52namespace SILLY
\n-
53{
\n-
54
\n-
\n-\n-
60{
\n-
61 PF_A1B5G5R5, //<! 16 bits, pixel format is A1R5G5B5 (GGGBBBBB,ARRRRRGG on disk)
\n-
62 PF_RGB, //<! 24 bits, pixel format is 8 bits for R, G, B
\n-
63 PF_RGBA, //<! 32 bits, pixel format is 8 bits for R, G, B and A channel
\n-
64 PF_ORIGIN, //<! This format is used when the input storage use a specific pixel format
\n-
65};
\n-
\n-
\n-\n-
71{
\n-
72 PO_TOP_LEFT, //<! The resulting image origine is Top Left
\n-
73 PO_BOTTOM_LEFT, //<! The resulting image origine is Bottom Left
\n-
74};
\n-
\n-
75
\n-
80typedef unsigned char byte;
\n-
88bool SILLY_EXPORT SILLYInit();
\n-
89
\n-
94void SILLY_EXPORT SILLYCleanup();
\n-
95
\n-
96} // End of section namespace SILLY
\n-
97
\n-
98#endif // end of guard _SILLYBase_h_
\n-
99
\n-
Simple Image Loading LibrarY namespace.
\n-
unsigned char byte
Typename for a byte.
Definition SILLYBase.h:80
\n-
void SILLYCleanup()
Cleanup SILLY library internal.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
bool SILLYInit()
Initialize the SILLY Library.
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
1/***********************************************************************
\n+
2 filename: SILLYPNGImageContext.icpp
\n+
3 created: 11 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Inline definition for PNGImageContext class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30
\n+
31// Start of section namespace SILLY
\n+
32namespace SILLY
\n+
33{
\n+
34
\n+
35} // End of section namespace SILLY
\n+
36
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYBase.h\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYPNGImageContext.icpp\n 1/***********************************************************************\n-2 filename: SILLYBase.h\n-3 created: 2006/06/10\n+2 filename: SILLYPNGImageContext.icpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Common header for the SILLY library\n+6 purpose: Inline definition for PNGImageContext class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,81 +30,16 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYBase_h_\n-31#define _SILLYBase_h_\n-32#include \n-33#include \n+30\n+31// Start of section namespace SILLY\n+32namespace SILLY\n+33{\n 34\n-35#if defined(USE_SILLYOPTIONS_H)\n-36#include \"SILLYOptions.h\"\n-37#endif\n-38\n-39#if defined(_WIN32) || defined(__WIN32__)\n-40# undef SILLY_OPT_INLINE // No inlining\n-41# undef SILLY_BE // Little Endian\n-42# ifdef SILLY_EXPORTS\n-43# define SILLY_EXPORT __declspec(dllexport)\n-44# else\n-45# define SILLY_EXPORT __declspec(dllimport)\n-46# endif\n-47#else\n-48# define SILLY_EXPORT\n-49#endif\n-50\n-51// Start of section namespace SILLY\n-52namespace _\bS_\bI_\bL_\bL_\bY\n-53{\n-54\n-_\b5_\b9enum _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-60{\n-61 PF_A1B5G5R5, //\n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYMemoryDataSource.icpp
\n+
SILLYJPGImageLoader.icpp
\n
\n
\n
1/***********************************************************************
\n-
2 Filename: SILLYMemoryDataSource.icpp
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYJPGImageLoader.icpp
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Inline function definition for MemoryDataSource class
\n+
6 purpose: Inline definition of JPGImageLoader class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,27 +80,17 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30
\n
31// Start of section namespace SILLY
\n
32namespace SILLY
\n
33{
\n-
34
\n-
35inline const byte* MemoryDataSource::getDataPtr() const
\n-
36{
\n-
37 return d_bytes;
\n-
38}
\n-
39
\n-
40inline size_t MemoryDataSource::getSize() const
\n-
41{
\n-
42 return d_size;
\n-
43}
\n-
44
\n-
45} // End of section namespace SILLY
\n-
46
\n+
34
\n+
35} // End of section namespace SILLY
\n+
36
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYMemoryDataSource.icpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYJPGImageLoader.icpp\n 1/***********************************************************************\n-2 Filename: SILLYMemoryDataSource.icpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYJPGImageLoader.icpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline function definition for MemoryDataSource class\n+6 purpose: Inline definition of JPGImageLoader class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -34,21 +35,11 @@\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30\n 31// Start of section namespace SILLY\n 32namespace SILLY\n 33{\n 34\n-35inline const byte* MemoryDataSource::getDataPtr() const\n-36{\n-37 return d_bytes;\n-38}\n-39\n-40inline size_t MemoryDataSource::getSize() const\n-41{\n-42 return d_size;\n-43}\n-44\n-45} // End of section namespace SILLY\n-46\n+35} // End of section namespace SILLY\n+36\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00065_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00065_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.h Source File\n \n \n \n \n \n \n
\n@@ -40,130 +40,88 @@\n \n \n
\n
\n-
SILLYImage.h
\n+
SILLYJPGImageLoader.h
\n
\n
\n-
1
\n-
2/***********************************************************************
\n-
3 filename: SILLYImage.h
\n-
4 created: 10 Jun 2006
\n-
5 author: Olivier Delannoy
\n-
6
\n-
7 purpose: Image class definition
\n-
8*************************************************************************/
\n-
9/***************************************************************************
\n-
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
11 *
\n-
12 * Permission is hereby granted, free of charge, to any person obtaining
\n-
13 * a copy of this software and associated documentation files (the
\n-
14 * "Software"), to deal in the Software without restriction, including
\n-
15 * without limitation the rights to use, copy, modify, merge, publish,
\n-
16 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
17 * permit persons to whom the Software is furnished to do so, subject to
\n-
18 * the following conditions:
\n-
19 *
\n-
20 * The above copyright notice and this permission notice shall be
\n-
21 * included in all copies or substantial portions of the Software.
\n-
22 *
\n-
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
29 * OTHER DEALINGS IN THE SOFTWARE.
\n-
30 ***************************************************************************/
\n-
31#ifndef _SILLYImage_h_
\n-
32#define _SILLYImage_h_
\n-
33#include "SILLYBase.h"
\n-
34#include "SILLYImageContext.h"
\n-
35#include "SILLYDataSource.h"
\n-
36#include "SILLYImageLoader.h"
\n-
37
\n-
38// Start of section namespace SILLY
\n-
39namespace SILLY
\n-
40{
\n-
41
\n-
\n-
46class SILLY_EXPORT Image
\n-
47{
\n-
48public:
\n-
55 Image(DataSource& data);
\n-
56
\n-\n-
62
\n-
67 bool isValid() const;
\n-
68
\n-
69
\n-
76 bool loadImageHeader();
\n-
77
\n-
91 bool loadImageData(PixelFormat resultFormat = PF_RGBA, PixelOrigin origin = PO_TOP_LEFT);
\n-
92
\n-
97 size_t getWidth() const;
\n-
98
\n-
103 size_t getHeight() const;
\n-
104
\n-\n-
110
\n-\n-
116
\n-
120 const byte* getPixelsDataPtr() const;
\n-
125 size_t getPixelsDataSize() const;
\n-
130 const char* getLoaderIdentifierString() const;
\n-
131private:
\n-
132 bool allocate();
\n-
133
\n-
134private:
\n-
135
\n-
136 size_t d_bpp;
\n-
137 PixelFormat d_pfSource;
\n-
138 byte* d_pixels;
\n-
139 DataSource* d_data;
\n-
140 ImageContext* d_imageContext;
\n-
141 ImageLoader* d_imageLoader;
\n-
142
\n-
143 // Disabled operation
\n-
144 Image(Image&);
\n-
145 Image& operator=(Image&);
\n-
146};
\n+
1/***********************************************************************
\n+
2 filename: SILLYJPGImageLoader.h
\n+
3 created: 11 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Declaration of the JPGImageLoader class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLYJPGImageLoader_h_
\n+
31#define _SILLYJPGImageLoader_h_
\n+
32#include "SILLYBase.h"
\n+
33#include "SILLYImageLoader.h"
\n+
34// Start of section namespace SILLY
\n+
35namespace SILLY
\n+
36{
\n+
37
\n+
\n+\n+
43{
\n+
44public:
\n+\n+\n+\n+
48 bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context);
\n+
49private:
\n+
50};
\n
\n-
147
\n-
148} // End of section namespace SILLY
\n-
149
\n-
150// Inclue inline function when needed
\n-
151#ifdef SILLY_OPT_INLINE
\n-
152#include "SILLYImage.icpp"
\n-
153#endif
\n-
154
\n-
155#endif // end of guard _SILLYImage_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
This is an abstract class used to provide data to the loader.
\n-
Image is the main user class of the library.
Definition SILLYImage.h:47
\n-
PixelFormat getSourcePixelFormat() const
Retrieve the pixel format used for the image storage.
\n-
const char * getLoaderIdentifierString() const
Get Image loader identifier string.
\n-
const byte * getPixelsDataPtr() const
Get a pointer to the pixels data.
\n-
bool isValid() const
Return true if the image is valid after its loading.
\n-
size_t getPixelsDataSize() const
Get the size of the pixel buffer.
\n-
~Image()
Destructor.
\n-
size_t getWidth() const
Retrieve the width of the image.
\n-
PixelFormat getPixelFormat() const
Retrieve the pixel format of the resulting image.
\n-
size_t getHeight() const
Retrieve the height of the image.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
This is an abstract class that define the interface of all image loader.
\n+
51
\n+
52
\n+
53} // End of section namespace SILLY
\n+
54
\n+
55// Inclue inline function when needed
\n+
56#ifdef SILLY_OPT_INLINE
\n+
57#include "SILLYJPGImageLoader.icpp"
\n+
58#endif
\n+
59
\n+
60#endif // end of guard _SILLYJPGImageLoader_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
Loader class for JPG Image.
\n+
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
\n+
ImageContext * loadHeader(PixelFormat &header, DataSource *data)
Parse the header of the image and fill the header struct.
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
This is an abstract class that define the interface of all image loader.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,149 +1,96 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImage.h\n-1\n-2/***********************************************************************\n-3 filename: SILLYImage.h\n-4 created: 10 Jun 2006\n-5 author: Olivier Delannoy\n-6\n-7 purpose: Image class definition\n-8*************************************************************************/\n-9/***************************************************************************\n-10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n-11 *\n-12 * Permission is hereby granted, free of charge, to any person obtaining\n-13 * a copy of this software and associated documentation files (the\n-14 * \"Software\"), to deal in the Software without restriction, including\n-15 * without limitation the rights to use, copy, modify, merge, publish,\n-16 * distribute, sublicense, and/or sell copies of the Software, and to\n-17 * permit persons to whom the Software is furnished to do so, subject to\n-18 * the following conditions:\n-19 *\n-20 * The above copyright notice and this permission notice shall be\n-21 * included in all copies or substantial portions of the Software.\n-22 *\n-23 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n-24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n-25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n-26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n-27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n-28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n-29 * OTHER DEALINGS IN THE SOFTWARE.\n-30 ***************************************************************************/\n-31#ifndef _SILLYImage_h_\n-32#define _SILLYImage_h_\n-33#include \"SILLYBase.h\"\n-34#include \"SILLYImageContext.h\"\n-35#include \"SILLYDataSource.h\"\n-36#include \"SILLYImageLoader.h\"\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYJPGImageLoader.h\n+1/***********************************************************************\n+2 filename: SILLYJPGImageLoader.h\n+3 created: 11 Jun 2006\n+4 author: Olivier Delannoy\n+5\n+6 purpose: Declaration of the JPGImageLoader class\n+7*************************************************************************/\n+8/***************************************************************************\n+9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n+10 *\n+11 * Permission is hereby granted, free of charge, to any person obtaining\n+12 * a copy of this software and associated documentation files (the\n+13 * \"Software\"), to deal in the Software without restriction, including\n+14 * without limitation the rights to use, copy, modify, merge, publish,\n+15 * distribute, sublicense, and/or sell copies of the Software, and to\n+16 * permit persons to whom the Software is furnished to do so, subject to\n+17 * the following conditions:\n+18 *\n+19 * The above copyright notice and this permission notice shall be\n+20 * included in all copies or substantial portions of the Software.\n+21 *\n+22 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n+25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n+26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n+27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n+28 * OTHER DEALINGS IN THE SOFTWARE.\n+29 ***************************************************************************/\n+30#ifndef _SILLYJPGImageLoader_h_\n+31#define _SILLYJPGImageLoader_h_\n+32#include \"SILLYBase.h\"\n+33#include \"SILLYImageLoader.h\"\n+34// Start of section namespace SILLY\n+35namespace _\bS_\bI_\bL_\bL_\bY\n+36{\n 37\n-38// Start of section namespace SILLY\n-39namespace _\bS_\bI_\bL_\bL_\bY\n-40{\n-41\n-_\b4_\b6class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be\n-47{\n-48public:\n-55 _\bI_\bm_\ba_\bg_\be(_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be& data);\n-56\n-_\b6_\b1 _\b~_\bI_\bm_\ba_\bg_\be();\n-62\n-_\b6_\b7 bool _\bi_\bs_\bV_\ba_\bl_\bi_\bd() const;\n-68\n-69\n-76 bool loadImageHeader();\n-77\n-91 bool loadImageData(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt resultFormat = PF_RGBA, _\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin =\n-PO_TOP_LEFT);\n-92\n-_\b9_\b7 size_t _\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh() const;\n-98\n-_\b1_\b0_\b3 size_t _\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt() const;\n-104\n-_\b1_\b0_\b9 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt _\bg_\be_\bt_\bS_\bo_\bu_\br_\bc_\be_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt() const;\n-110\n-_\b1_\b1_\b5 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt _\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt() const;\n-116\n-_\b1_\b2_\b0 const byte* _\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bP_\bt_\br() const;\n-_\b1_\b2_\b5 size_t _\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bS_\bi_\bz_\be() const;\n-_\b1_\b3_\b0 const char* _\bg_\be_\bt_\bL_\bo_\ba_\bd_\be_\br_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg() const;\n-131private:\n-132 bool allocate();\n-133\n-134private:\n-135\n-136 size_t d_bpp;\n-137 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt d_pfSource;\n-138 byte* d_pixels;\n-139 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* d_data;\n-140 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* d_imageContext;\n-141 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br* d_imageLoader;\n-142\n-143 // Disabled operation\n-144 _\bI_\bm_\ba_\bg_\be(_\bI_\bm_\ba_\bg_\be&);\n-145 _\bI_\bm_\ba_\bg_\be& operator=(_\bI_\bm_\ba_\bg_\be&);\n-146};\n-147\n-148} // End of section namespace SILLY\n-149\n-150// Inclue inline function when needed\n-151#ifdef SILLY_OPT_INLINE\n-152#include \"SILLYImage.icpp\"\n-153#endif\n-154\n-155#endif // end of guard _SILLYImage_h_\n+_\b4_\b2class _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br : public _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+43{\n+44public:\n+45 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+46 _\b~_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+47 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& header, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n+48 bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data, _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*\n+context);\n+49private:\n+50};\n+51\n+52\n+53} // End of section namespace SILLY\n+54\n+55// Inclue inline function when needed\n+56#ifdef SILLY_OPT_INLINE\n+57#include \"SILLYJPGImageLoader.icpp\"\n+58#endif\n+59\n+60#endif // end of guard _SILLYJPGImageLoader_h_\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n PixelFormat\n List all pixel format supported.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n PixelOrigin\n List all pixel origin supported.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+Loader class for JPG Image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b3\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n+bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)\n+Parse the pixels data of the image and fill the header struct.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b9_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n+ImageContext * loadHeader(PixelFormat &header, DataSource *data)\n+Parse the header of the image and fill the header struct.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b5_\b6\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n This is an abstract class used to provide data to the loader.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be\n-Image is the main user class of the library.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bS_\bo_\bu_\br_\bc_\be_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat getSourcePixelFormat() const\n-Retrieve the pixel format used for the image storage.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bL_\bo_\ba_\bd_\be_\br_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg\n-const char * getLoaderIdentifierString() const\n-Get Image loader identifier string.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bP_\bt_\br\n-const byte * getPixelsDataPtr() const\n-Get a pointer to the pixels data.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bi_\bs_\bV_\ba_\bl_\bi_\bd\n-bool isValid() const\n-Return true if the image is valid after its loading.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bS_\bi_\bz_\be\n-size_t getPixelsDataSize() const\n-Get the size of the pixel buffer.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\b~_\bI_\bm_\ba_\bg_\be\n-~Image()\n-Destructor.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh\n-size_t getWidth() const\n-Retrieve the width of the image.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat getPixelFormat() const\n-Retrieve the pixel format of the resulting image.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt\n-size_t getHeight() const\n-Retrieve the height of the image.\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n Store the data needed by an ImageLoader object during the parsing of an image.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n This is an abstract class that define the interface of all image loader.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00068_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00068_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,90 +40,57 @@\n \n \n
\n
\n-
SILLYFileDataSource.h
\n+
SILLYPNGImageLoader.icpp
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYFileDataSource.h
\n-
3 created: 20 Jul 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Provide file based image loading
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYFileDataSource_h_
\n-
31#define _SILLYFileDataSource_h_
\n-
32#include "SILLYBase.h"
\n-
33#include "SILLYDataSource.h"
\n-
34// Start of section namespace SILLY
\n-
35namespace SILLY
\n-
36{
\n-
37
\n-
\n-
48class SILLY_EXPORT FileDataSource : public DataSource
\n-
49{
\n-
50public:
\n-
60 FileDataSource(const char* filename);
\n-\n-
73 bool isValid() const;
\n-
74
\n-
75 const byte* getDataPtr() const;
\n-
76 size_t getSize() const;
\n-
77private:
\n-
78 bool d_error;
\n-
79 byte* d_bytes;
\n-
80 size_t d_size;
\n-
81};
\n-
\n-
82
\n-
83
\n-
84} // End of section namespace SILLY
\n-
85
\n-
86// Inclue inline function when needed
\n-
87#ifdef SILLY_OPT_INLINE
\n-
88#include "SILLYFileDataSource.icpp"
\n-
89#endif
\n-
90
\n-
91#endif // end of guard _SILLYFileDataSource_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
This is an abstract class used to provide data to the loader.
\n-
This class allow the loading of an image directly from a file.
\n-
const byte * getDataPtr() const
Get raw access to the image data.
\n-
bool isValid() const
Check wether the loading is successfull or not.
\n-
size_t getSize() const
Return the size of the data.
\n+
1/***********************************************************************
\n+
2 filename: SILLYPNGImageLoader.icpp
\n+
3 created: 11 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Inline definition for PNGImageLoader
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30
\n+
31// Start of section namespace SILLY
\n+
32namespace SILLY
\n+
33{
\n+
34
\n+
35} // End of section namespace SILLY
\n+
36
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYFileDataSource.h\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYPNGImageLoader.icpp\n 1/***********************************************************************\n-2 filename: SILLYFileDataSource.h\n-3 created: 20 Jul 2006\n+2 filename: SILLYPNGImageLoader.icpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Provide file based image loading\n+6 purpose: Inline definition for PNGImageLoader\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,59 +30,16 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYFileDataSource_h_\n-31#define _SILLYFileDataSource_h_\n-32#include \"SILLYBase.h\"\n-33#include \"SILLYDataSource.h\"\n-34// Start of section namespace SILLY\n-35namespace _\bS_\bI_\bL_\bL_\bY\n-36{\n-37\n-_\b4_\b8class SILLY_EXPORT _\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be : public _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-49{\n-50public:\n-60 _\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const char* filename);\n-64 _\b~_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be();\n-_\b7_\b3 bool _\bi_\bs_\bV_\ba_\bl_\bi_\bd() const;\n-74\n-_\b7_\b5 const byte* _\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() const;\n-_\b7_\b6 size_t _\bg_\be_\bt_\bS_\bi_\bz_\be() const;\n-77private:\n-78 bool d_error;\n-79 byte* d_bytes;\n-80 size_t d_size;\n-81};\n-82\n-83\n-84} // End of section namespace SILLY\n-85\n-86// Inclue inline function when needed\n-87#ifdef SILLY_OPT_INLINE\n-88#include \"SILLYFileDataSource.icpp\"\n-89#endif\n-90\n-91#endif // end of guard _SILLYFileDataSource_h_\n-_\bS_\bI_\bL_\bL_\bY\n-Simple Image Loading LibrarY namespace.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This class allow the loading of an image directly from a file.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b9\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n-const byte * getDataPtr() const\n-Get raw access to the image data.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bi_\bs_\bV_\ba_\bl_\bi_\bd\n-bool isValid() const\n-Check wether the loading is successfull or not.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n-size_t getSize() const\n-Return the size of the data.\n+30\n+31// Start of section namespace SILLY\n+32namespace SILLY\n+33{\n+34\n+35} // End of section namespace SILLY\n+36\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00071_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00071_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.h Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYImageLoader.h
\n+
SILLYTGAImageContext.h
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYImageLoader.h
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYTGAImageContext.h
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Abstract class for all image loader
\n+
6 purpose: Declaration of the TGAImageContext class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -76,65 +76,52 @@\n
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n-
30#ifndef _SILLYImageLoader_h_
\n-
31#define _SILLYImageLoader_h_
\n-
32#include "SILLYBase.h"
\n-
33// Start of section namespace SILLY
\n-
34namespace SILLY
\n-
35{
\n-
36class DataSource; // Forward declaration
\n-
37class ImageContext; // Forward declaration
\n-
38
\n-
\n-
46class SILLY_EXPORT ImageLoader
\n-
47{
\n-
48protected:
\n-
52 ImageLoader(const char* name);
\n-
53public:
\n-
54
\n-
59 virtual ~ImageLoader();
\n-
60
\n-
71 virtual ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data) = 0;
\n-
72
\n-
73
\n-
86 virtual bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context) = 0;
\n-
87
\n-
94 void destroyContext(ImageContext* context);
\n-
95
\n-
100 const char* getIdentifierString() const;
\n-
101private:
\n-
102 const char* d_name;
\n-
103
\n-
104};
\n+
30#ifndef _SILLYTGAImageContext_h_
\n+
31#define _SILLYTGAImageContext_h_
\n+
32#include "SILLYBase.h"
\n+
33#include "SILLYImageContext.h"
\n+
34// Start of section namespace SILLY
\n+
35namespace SILLY
\n+
36{
\n+
\n+\n+
43{
\n+
44public:
\n+
45 TGAImageContext(size_t width, size_t height);
\n+\n+
47
\n+
48private:
\n+
49 byte d_idLength;
\n+
50 byte d_imageType;
\n+
51 byte d_depth;
\n+
52 byte d_description;
\n+
53
\n+
54 friend class TGAImageLoader;
\n+
55
\n+
56};
\n
\n-
105
\n-
106} // End of section namespace SILLY
\n-
107
\n-
108// Inclue inline function when needed
\n-
109#ifdef SILLY_OPT_INLINE
\n-
110#include "SILLYImageLoader.icpp"
\n-
111#endif
\n-
112
\n-
113#endif // end of guard _SILLYImageLoader_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
This is an abstract class that define the interface of all image loader.
\n-
ImageLoader(const char *name)
Constructor.
\n-
virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)=0
Parse the header of the image and fill the header struct.
\n-
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
\n-
virtual ~ImageLoader()
Destructor.
\n-
const char * getIdentifierString() const
Return the name of the loader.
\n+
57
\n+
58
\n+
59} // End of section namespace SILLY
\n+
60
\n+
61// Inclue inline function when needed
\n+
62#ifdef SILLY_OPT_INLINE
\n+
63#include "SILLYTGAImageContext.icpp"
\n+
64#endif
\n+
65
\n+
66#endif // end of guard _SILLYTGAImageContext_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
Image Context for Targa image.
\n+
Loader for Targa image.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImageLoader.h\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYTGAImageContext.h\n 1/***********************************************************************\n-2 filename: SILLYImageLoader.h\n-3 created: 10 Jun 2006\n+2 filename: SILLYTGAImageContext.h\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Abstract class for all image loader\n+6 purpose: Declaration of the TGAImageContext class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,86 +30,53 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYImageLoader_h_\n-31#define _SILLYImageLoader_h_\n+30#ifndef _SILLYTGAImageContext_h_\n+31#define _SILLYTGAImageContext_h_\n 32#include \"SILLYBase.h\"\n-33// Start of section namespace SILLY\n-34namespace _\bS_\bI_\bL_\bL_\bY\n-35{\n-36class DataSource; // Forward declaration\n-37class ImageContext; // Forward declaration\n-38\n-_\b4_\b6class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-47{\n-48protected:\n-_\b5_\b2 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br(const char* name);\n-53public:\n-54\n-_\b5_\b9 virtual _\b~_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+33#include \"SILLYImageContext.h\"\n+34// Start of section namespace SILLY\n+35namespace _\bS_\bI_\bL_\bL_\bY\n+36{\n+_\b4_\b2class _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt : public _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+43{\n+44public:\n+45 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(size_t width, size_t height);\n+46 _\b~_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n+47\n+48private:\n+49 byte d_idLength;\n+50 byte d_imageType;\n+51 byte d_depth;\n+52 byte d_description;\n+53\n+54 friend class _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br;\n+55\n+56};\n+57\n+58\n+59} // End of section namespace SILLY\n 60\n-_\b7_\b1 virtual _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be*\n-data) = 0;\n-72\n-73\n-_\b8_\b6 virtual bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n-_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context) = 0;\n-87\n-94 void destroyContext(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context);\n-95\n-_\b1_\b0_\b0 const char* _\bg_\be_\bt_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg() const;\n-101private:\n-102 const char* d_name;\n-103\n-104};\n-105\n-106} // End of section namespace SILLY\n-107\n-108// Inclue inline function when needed\n-109#ifdef SILLY_OPT_INLINE\n-110#include \"SILLYImageLoader.icpp\"\n-111#endif\n-112\n-113#endif // end of guard _SILLYImageLoader_h_\n+61// Inclue inline function when needed\n+62#ifdef SILLY_OPT_INLINE\n+63#include \"SILLYTGAImageContext.icpp\"\n+64#endif\n+65\n+66#endif // end of guard _SILLYTGAImageContext_h_\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat\n-List all pixel format supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n-PixelOrigin\n-List all pixel origin supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Image Context for Targa image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b3\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+Loader for Targa image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b4\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n Store the data needed by an ImageLoader object during the parsing of an image.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-This is an abstract class that define the interface of all image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-ImageLoader(const char *name)\n-Constructor.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n-virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource\n-*data)=0\n-Parse the header of the image and fill the header struct.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n-virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext\n-*context)=0\n-Parse the pixels data of the image and fill the header struct.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\b~_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-virtual ~ImageLoader()\n-Destructor.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bg_\be_\bt_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg\n-const char * getIdentifierString() const\n-Return the name of the loader.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00074_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00074_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.h Source File\n \n \n \n \n \n \n
\n@@ -40,105 +40,90 @@\n \n \n
\n
\n-
SILLYImage.icpp
\n+
SILLYTGAImageLoader.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYImage.icpp
\n-
3 created: 10 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Inline definition of the image class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30
\n-
31// Start of section namespace SILLY
\n-
32namespace SILLY
\n-
33{
\n-
34
\n-
35inline bool Image::isValid() const
\n+
1/***********************************************************************
\n+
2 filename: SILLYTGAImageLoader.h
\n+
3 created: 11 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Declaration of the TGAImageLoader class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLYTGAImageLoader_h_
\n+
31#define _SILLYTGAImageLoader_h_
\n+
32#include "SILLYBase.h"
\n+
33#include "SILLYImageLoader.h"
\n+
34// Start of section namespace SILLY
\n+
35namespace SILLY
\n
36{
\n-
37 return d_imageContext && d_pixels;
\n-
38}
\n-
39
\n-
40inline size_t Image::getWidth() const
\n-
41{
\n-
42 return d_imageContext->getWidth();
\n-
43}
\n-
44
\n-
45inline size_t Image::getHeight() const
\n-
46{
\n-
47 return d_imageContext->getHeight();
\n-
48}
\n-
49
\n-
50inline PixelFormat Image::getSourcePixelFormat() const
\n-
51{
\n-
52 return d_pfSource;
\n-
53}
\n-
54
\n-
55inline PixelFormat Image::getPixelFormat() const
\n-
56{
\n-
57 return d_imageContext->getPixelFormat();
\n-
58}
\n-
59
\n-
60inline const byte* Image::getPixelsDataPtr() const
\n-
61{
\n-
62 return d_pixels;
\n-
63}
\n-
64
\n-
65inline size_t Image::getPixelsDataSize() const
\n-
66{
\n-
67 return getWidth() * getHeight() * d_bpp;
\n-
68}
\n-
69
\n-
70inline Image::~Image()
\n-
71{
\n-
72 delete [] d_pixels;
\n-
73 if (d_imageLoader)
\n-
74 d_imageLoader->destroyContext(d_imageContext);
\n-
75}
\n-
76inline const char* Image::getLoaderIdentifierString() const
\n-
77{
\n-
78 if (d_imageLoader)
\n-
79 return d_imageLoader->getIdentifierString();
\n-
80 return 0;
\n-
81}
\n-
82
\n-
83} // End of section namespace SILLY
\n-
84
\n+
37class TGAImageContext;
\n+
\n+\n+
44{
\n+
45public:
\n+\n+\n+
48 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
\n+
49 bool loadImageData(PixelOrigin origin,
\n+
50 DataSource* data,
\n+
51 ImageContext* context);
\n+
52private:
\n+
53
\n+
54};
\n+
\n+
55
\n+
56} // End of section namespace SILLY
\n+
57
\n+
58// Inclue inline function when needed
\n+
59#ifdef SILLY_OPT_INLINE
\n+
60#include "SILLYTGAImageLoader.icpp"
\n+
61#endif
\n+
62
\n+
63#endif // end of guard _SILLYTGAImageLoader_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
Loader for Targa image.
\n+
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
\n+
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
This is an abstract class that define the interface of all image loader.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImage.icpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYTGAImageLoader.h\n 1/***********************************************************************\n-2 filename: SILLYImage.icpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYTGAImageLoader.h\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline definition of the image class\n+6 purpose: Declaration of the TGAImageLoader class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,64 +30,69 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30\n-31// Start of section namespace SILLY\n-32namespace SILLY\n-33{\n-34\n-35inline bool Image::isValid() const\n+30#ifndef _SILLYTGAImageLoader_h_\n+31#define _SILLYTGAImageLoader_h_\n+32#include \"SILLYBase.h\"\n+33#include \"SILLYImageLoader.h\"\n+34// Start of section namespace SILLY\n+35namespace _\bS_\bI_\bL_\bL_\bY\n 36{\n-37 return d_imageContext && d_pixels;\n-38}\n-39\n-40inline size_t Image::getWidth() const\n-41{\n-42 return d_imageContext->getWidth();\n-43}\n-44\n-45inline size_t Image::getHeight() const\n-46{\n-47 return d_imageContext->getHeight();\n-48}\n-49\n-50inline PixelFormat Image::getSourcePixelFormat() const\n-51{\n-52 return d_pfSource;\n-53}\n-54\n-55inline PixelFormat Image::getPixelFormat() const\n-56{\n-57 return d_imageContext->getPixelFormat();\n-58}\n-59\n-60inline const byte* Image::getPixelsDataPtr() const\n-61{\n-62 return d_pixels;\n-63}\n-64\n-65inline size_t Image::getPixelsDataSize() const\n-66{\n-67 return getWidth() * getHeight() * d_bpp;\n-68}\n-69\n-70inline Image::~Image()\n-71{\n-72 delete [] d_pixels;\n-73 if (d_imageLoader)\n-74 d_imageLoader->destroyContext(d_imageContext);\n-75}\n-76inline const char* Image::getLoaderIdentifierString() const\n-77{\n-78 if (d_imageLoader)\n-79 return d_imageLoader->getIdentifierString();\n-80 return 0;\n-81}\n-82\n-83} // End of section namespace SILLY\n-84\n+37class TGAImageContext;\n+_\b4_\b3class _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br : public _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+44{\n+45public:\n+46 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+47 _\b~_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+48 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n+49 bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n+50 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n+51 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context);\n+52private:\n+53\n+54};\n+55\n+56} // End of section namespace SILLY\n+57\n+58// Inclue inline function when needed\n+59#ifdef SILLY_OPT_INLINE\n+60#include \"SILLYTGAImageLoader.icpp\"\n+61#endif\n+62\n+63#endif // end of guard _SILLYTGAImageLoader_h_\n+_\bS_\bI_\bL_\bL_\bY\n+Simple Image Loading LibrarY namespace.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat\n+List all pixel format supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n+PixelOrigin\n+List all pixel origin supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+Loader for Targa image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n+ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)\n+Parse the header of the image and fill the header struct.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b7_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n+bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)\n+Parse the pixels data of the image and fill the header struct.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b1_\b3_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Store the data needed by an ImageLoader object during the parsing of an image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+This is an abstract class that define the interface of all image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00077_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00077_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYImageLoader.icpp
\n+
SILLYTGAImageContext.icpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: ImageLoader.icpp
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYTGAImageContext.icpp
\n+
3 created: 11 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Inline function definition for ImageLoader class
\n+
6 purpose: Inline definition for TGAImageContext class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,28 +80,25 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30
\n
31// Start of section namespace SILLY
\n
32namespace SILLY
\n
33{
\n-
34inline ImageLoader::ImageLoader(const char* name)
\n-
35 : d_name(name)
\n+
34inline TGAImageContext::TGAImageContext(size_t width, size_t height)
\n+
35 : ImageContext(width, height)
\n
36{
\n
37}
\n-
38inline ImageLoader::~ImageLoader()
\n-
39{
\n-
40}
\n-
41inline const char* ImageLoader::getIdentifierString() const
\n-
42{
\n-
43 return d_name;
\n-
44}
\n-
45
\n-
46} // End of section namespace SILLY
\n-
47
\n+
38
\n+
39inline TGAImageContext::~TGAImageContext()
\n+
40{
\n+
41}
\n+
42
\n+
43} // End of section namespace SILLY
\n+
44
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImageLoader.icpp\n+ * _\bl_\bo_\ba_\bd_\be_\br_\bs\n+SILLYTGAImageContext.icpp\n 1/***********************************************************************\n-2 filename: ImageLoader.icpp\n-3 created: 10 Jun 2006\n+2 filename: SILLYTGAImageContext.icpp\n+3 created: 11 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline function definition for ImageLoader class\n+6 purpose: Inline definition for TGAImageContext class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -33,23 +34,20 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30\n 31// Start of section namespace SILLY\n 32namespace SILLY\n 33{\n-34inline ImageLoader::ImageLoader(const char* name)\n-35 : d_name(name)\n+34inline TGAImageContext::TGAImageContext(size_t width, size_t height)\n+35 : ImageContext(width, height)\n 36{\n 37}\n-38inline ImageLoader::~ImageLoader()\n-39{\n-40}\n-41inline const char* ImageLoader::getIdentifierString() const\n-42{\n-43 return d_name;\n-44}\n-45\n-46} // End of section namespace SILLY\n-47\n+38\n+39inline TGAImageContext::~TGAImageContext()\n+40{\n+41}\n+42\n+43} // End of section namespace SILLY\n+44\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00080_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00080_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.h Source File\n \n \n \n \n \n \n
\n@@ -44,23 +44,23 @@\n \n \n
\n
\n-
SILLYImageContext.h
\n+
SILLYDataSource.h
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYImageContext.h
\n+
2 filename: SILLYDataSource.h
\n
3 created: 10 Jun 2006
\n-
4 author: Olivier Delannoy
\n+
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: ImageContext is an abstract class used to hide the loader specific data needed during the parsing of an image
\n+
6 purpose: SILLY::DataSource declaration for the SILLY library
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -76,74 +76,47 @@\n
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n-
30#ifndef _SILLYImageContext_h_
\n-
31#define _SILLYImageContext_h_
\n+
30#ifndef _SILLYDataSource_h_
\n+
31#define _SILLYDataSource_h_
\n
32#include "SILLYBase.h"
\n
33
\n
34// Start of section namespace SILLY
\n
35namespace SILLY
\n
36{
\n
37
\n-
\n-
43class SILLY_EXPORT ImageContext
\n-
44{
\n-
45public:
\n-
50 virtual ~ImageContext();
\n-
51
\n-
56 void setDestination(byte* pixels, size_t length, PixelFormat format);
\n-
57
\n-
62 void setNextPixel(byte red, byte green, byte bleu, byte alpha);
\n-
63
\n-
64 size_t getWidth() const;
\n-
65 size_t getHeight() const;
\n-
66 PixelFormat getPixelFormat() const;
\n-
67
\n-
74 bool flipVertically();
\n-
75 protected:
\n-
76 void setWidth(size_t width);
\n-
77
\n-
78 void setHeight(size_t height);
\n-
79
\n-
88 ImageContext(size_t width, size_t height);
\n-
89
\n-
90private:
\n-
91 byte* d_pixels;
\n-
92 size_t d_length;
\n-
93 size_t d_width;
\n-
94 size_t d_height;
\n-
95 size_t d_currentOffset;
\n-
96 PixelFormat d_format;
\n-
97
\n-
98 // Disabled operation
\n-\n-
100 ImageContext& operator=(ImageContext&);
\n-
101};
\n+
\n+
46class SILLY_EXPORT DataSource
\n+
47{
\n+
48public:
\n+
53 virtual ~DataSource();
\n+
58 virtual const byte * getDataPtr() const = 0;
\n+
64 byte operator[] (size_t offset) const;
\n+
69 virtual size_t getSize() const = 0;
\n+
70};
\n
\n-
102
\n-
103
\n-
104} // End of section namespace SILLY
\n-
105
\n-
106// Inclue inline function when needed
\n-
107#ifdef SILLY_OPT_INLINE
\n-
108#include "SILLYImageContext.icpp"
\n-
109#endif
\n-
110
\n-
111#endif // end of guard _SILLYImageContext_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
\n-
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
\n-
ImageContext(size_t width, size_t height)
Constructor.
\n-
virtual ~ImageContext()
Destructor.
\n+
71
\n+
72
\n+
73} // End of section namespace SILLY
\n+
74
\n+
75// Inclue inline function when needed
\n+
76#ifdef SILLY_OPT_INLINE
\n+
77#include "SILLYDataSource.icpp"
\n+
78#endif
\n+
79
\n+
80#endif // end of guard _SILLYDataSource_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
This is an abstract class used to provide data to the loader.
\n+
virtual size_t getSize() const =0
Return the size of the data.
\n+
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n+
virtual ~DataSource()
Destructor.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYImageContext.h\n+SILLYDataSource.h\n 1/***********************************************************************\n-2 filename: SILLYImageContext.h\n+2 filename: SILLYDataSource.h\n 3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: ImageContext is an abstract class used to hide the loader specific\n-data needed during the parsing of an image\n+6 purpose: SILLY::DataSource declaration for the SILLY library\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,82 +29,50 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYImageContext_h_\n-31#define _SILLYImageContext_h_\n+30#ifndef _SILLYDataSource_h_\n+31#define _SILLYDataSource_h_\n 32#include \"SILLYBase.h\"\n 33\n 34// Start of section namespace SILLY\n 35namespace _\bS_\bI_\bL_\bL_\bY\n 36{\n 37\n-_\b4_\b3class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-44{\n-45public:\n-_\b5_\b0 virtual _\b~_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n-51\n-_\b5_\b6 void _\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn(byte* pixels, size_t length, _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt format);\n-57\n-_\b6_\b2 void _\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(byte red, byte green, byte bleu, byte alpha);\n-63\n-64 size_t getWidth() const;\n-65 size_t getHeight() const;\n-66 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt getPixelFormat() const;\n-67\n-74 bool flipVertically();\n-75 protected:\n-76 void setWidth(size_t width);\n-77\n-78 void setHeight(size_t height);\n+_\b4_\b6class SILLY_EXPORT _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+47{\n+48public:\n+_\b5_\b3 virtual _\b~_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be();\n+_\b5_\b8 virtual const byte * _\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() const = 0;\n+_\b6_\b4 byte operator[] (size_t offset) const;\n+_\b6_\b9 virtual size_t _\bg_\be_\bt_\bS_\bi_\bz_\be() const = 0;\n+70};\n+71\n+72\n+73} // End of section namespace SILLY\n+74\n+75// Inclue inline function when needed\n+76#ifdef SILLY_OPT_INLINE\n+77#include \"SILLYDataSource.icpp\"\n+78#endif\n 79\n-_\b8_\b8 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(size_t width, size_t height);\n-89\n-90private:\n-91 byte* d_pixels;\n-92 size_t d_length;\n-93 size_t d_width;\n-94 size_t d_height;\n-95 size_t d_currentOffset;\n-96 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt d_format;\n-97\n-98 // Disabled operation\n-99 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt&);\n-100 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt& operator=(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt&);\n-101};\n-102\n-103\n-104} // End of section namespace SILLY\n-105\n-106// Inclue inline function when needed\n-107#ifdef SILLY_OPT_INLINE\n-108#include \"SILLYImageContext.icpp\"\n-109#endif\n-110\n-111#endif // end of guard _SILLYImageContext_h_\n+80#endif // end of guard _SILLYDataSource_h_\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat\n-List all pixel format supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Store the data needed by an ImageLoader object during the parsing of an image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl\n-void setNextPixel(byte red, byte green, byte bleu, byte alpha)\n-Set the next pixel of the image.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn\n-void setDestination(byte *pixels, size_t length, PixelFormat format)\n-Set the destination of the loading.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-ImageContext(size_t width, size_t height)\n-Constructor.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\b~_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-virtual ~ImageContext()\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n+virtual size_t getSize() const =0\n+Return the size of the data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n+virtual const byte * getDataPtr() const =0\n+Get raw access to the image data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\b~_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+virtual ~DataSource()\n Destructor.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00083_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00083_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLY.h Source File\n \n \n \n \n \n \n
\n@@ -40,57 +40,71 @@\n \n \n
\n
\n-
SILLYJPGImageLoader.icpp
\n+
SILLY.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYJPGImageLoader.icpp
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Inline definition of JPGImageLoader class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30
\n-
31// Start of section namespace SILLY
\n-
32namespace SILLY
\n-
33{
\n-
34
\n-
35} // End of section namespace SILLY
\n-
36
\n+
1/***********************************************************************
\n+
2 filename: SILLY.h
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Master include for the SILLY library
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLY_h_
\n+
31#define _SILLY_h_
\n+
109namespace SILLY
\n+
110{
\n+
111
\n+
112}
\n+
113
\n+
114
\n+
115
\n+
116
\n+
117#include "SILLYBase.h"
\n+
118#include "SILLYDataSource.h"
\n+
119#include "SILLYFileDataSource.h"
\n+
120#include "SILLYMemoryDataSource.h"
\n+
121#include "SILLYImageLoader.h"
\n+
122#include "SILLYImageContext.h"
\n+
123#include "SILLYImageLoaderManager.h"
\n+
124#include "SILLYImage.h"
\n+
125
\n+
126#endif // end of guard _SILLY_h_
\n+
Simple Image Loading LibrarY namespace.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYJPGImageLoader.icpp\n+SILLY.h\n 1/***********************************************************************\n-2 filename: SILLYJPGImageLoader.icpp\n-3 created: 11 Jun 2006\n+2 filename: SILLY.h\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline definition of JPGImageLoader class\n+6 purpose: Master include for the SILLY library\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,16 +29,32 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30\n-31// Start of section namespace SILLY\n-32namespace SILLY\n-33{\n-34\n-35} // End of section namespace SILLY\n-36\n+30#ifndef _SILLY_h_\n+31#define _SILLY_h_\n+109namespace _\bS_\bI_\bL_\bL_\bY\n+110{\n+111\n+112}\n+113\n+114\n+115\n+116\n+117#include \"SILLYBase.h\"\n+118#include \"SILLYDataSource.h\"\n+119#include \"SILLYFileDataSource.h\"\n+120#include \"SILLYMemoryDataSource.h\"\n+121#include \"SILLYImageLoader.h\"\n+122#include \"SILLYImageContext.h\"\n+123#include \"SILLYImageLoaderManager.h\"\n+124#include \"SILLYImage.h\"\n+125\n+126#endif // end of guard _SILLY_h_\n+_\bS_\bI_\bL_\bL_\bY\n+Simple Image Loading LibrarY namespace.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00086_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00086_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoader.h Source File\n \n \n \n \n \n \n
\n@@ -40,57 +40,101 @@\n \n \n
\n
\n-
SILLYJPGImageContext.icpp
\n+
SILLYImageLoader.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYJPGImageContext.icpp
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Inline definition for JPG context
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30
\n-
31// Start of section namespace SILLY
\n-
32namespace SILLY
\n-
33{
\n-
34
\n-
35} // End of section namespace SILLY
\n-
36
\n+
1/***********************************************************************
\n+
2 filename: SILLYImageLoader.h
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Abstract class for all image loader
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLYImageLoader_h_
\n+
31#define _SILLYImageLoader_h_
\n+
32#include "SILLYBase.h"
\n+
33// Start of section namespace SILLY
\n+
34namespace SILLY
\n+
35{
\n+
36class DataSource; // Forward declaration
\n+
37class ImageContext; // Forward declaration
\n+
38
\n+
\n+
46class SILLY_EXPORT ImageLoader
\n+
47{
\n+
48protected:
\n+
52 ImageLoader(const char* name);
\n+
53public:
\n+
54
\n+
59 virtual ~ImageLoader();
\n+
60
\n+
71 virtual ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data) = 0;
\n+
72
\n+
73
\n+
86 virtual bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context) = 0;
\n+
87
\n+
94 void destroyContext(ImageContext* context);
\n+
95
\n+
100 const char* getIdentifierString() const;
\n+
101private:
\n+
102 const char* d_name;
\n+
103
\n+
104};
\n+
\n+
105
\n+
106} // End of section namespace SILLY
\n+
107
\n+
108// Inclue inline function when needed
\n+
109#ifdef SILLY_OPT_INLINE
\n+
110#include "SILLYImageLoader.icpp"
\n+
111#endif
\n+
112
\n+
113#endif // end of guard _SILLYImageLoader_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
This is an abstract class used to provide data to the loader.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
This is an abstract class that define the interface of all image loader.
\n+
ImageLoader(const char *name)
Constructor.
\n+
virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)=0
Parse the header of the image and fill the header struct.
\n+
virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)=0
Parse the pixels data of the image and fill the header struct.
\n+
virtual ~ImageLoader()
Destructor.
\n+
const char * getIdentifierString() const
Return the name of the loader.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYJPGImageContext.icpp\n+SILLYImageLoader.h\n 1/***********************************************************************\n-2 filename: SILLYJPGImageContext.icpp\n-3 created: 11 Jun 2006\n+2 filename: SILLYImageLoader.h\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline definition for JPG context\n+6 purpose: Abstract class for all image loader\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,16 +29,86 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30\n-31// Start of section namespace SILLY\n-32namespace SILLY\n-33{\n-34\n-35} // End of section namespace SILLY\n-36\n+30#ifndef _SILLYImageLoader_h_\n+31#define _SILLYImageLoader_h_\n+32#include \"SILLYBase.h\"\n+33// Start of section namespace SILLY\n+34namespace _\bS_\bI_\bL_\bL_\bY\n+35{\n+36class DataSource; // Forward declaration\n+37class ImageContext; // Forward declaration\n+38\n+_\b4_\b6class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+47{\n+48protected:\n+_\b5_\b2 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br(const char* name);\n+53public:\n+54\n+_\b5_\b9 virtual _\b~_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n+60\n+_\b7_\b1 virtual _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be*\n+data) = 0;\n+72\n+73\n+_\b8_\b6 virtual bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n+_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context) = 0;\n+87\n+94 void destroyContext(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context);\n+95\n+_\b1_\b0_\b0 const char* _\bg_\be_\bt_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg() const;\n+101private:\n+102 const char* d_name;\n+103\n+104};\n+105\n+106} // End of section namespace SILLY\n+107\n+108// Inclue inline function when needed\n+109#ifdef SILLY_OPT_INLINE\n+110#include \"SILLYImageLoader.icpp\"\n+111#endif\n+112\n+113#endif // end of guard _SILLYImageLoader_h_\n+_\bS_\bI_\bL_\bL_\bY\n+Simple Image Loading LibrarY namespace.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat\n+List all pixel format supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n+PixelOrigin\n+List all pixel origin supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Store the data needed by an ImageLoader object during the parsing of an image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+This is an abstract class that define the interface of all image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+ImageLoader(const char *name)\n+Constructor.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n+virtual ImageContext * loadHeader(PixelFormat &formatSource, DataSource\n+*data)=0\n+Parse the header of the image and fill the header struct.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n+virtual bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext\n+*context)=0\n+Parse the pixels data of the image and fill the header struct.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\b~_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+virtual ~ImageLoader()\n+Destructor.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bg_\be_\bt_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg\n+const char * getIdentifierString() const\n+Return the name of the loader.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00089_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00089_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYPNGImageLoader.icpp
\n+
SILLYMemoryDataSource.icpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYPNGImageLoader.icpp
\n-
3 created: 11 Jun 2006
\n+
2 Filename: SILLYMemoryDataSource.icpp
\n+
3 created: 10 Jun 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Inline definition for PNGImageLoader
\n+
6 purpose: Inline function definition for MemoryDataSource class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,17 +80,27 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30
\n
31// Start of section namespace SILLY
\n
32namespace SILLY
\n
33{
\n-
34
\n-
35} // End of section namespace SILLY
\n-
36
\n+
34
\n+
35inline const byte* MemoryDataSource::getDataPtr() const
\n+
36{
\n+
37 return d_bytes;
\n+
38}
\n+
39
\n+
40inline size_t MemoryDataSource::getSize() const
\n+
41{
\n+
42 return d_size;
\n+
43}
\n+
44
\n+
45} // End of section namespace SILLY
\n+
46
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYPNGImageLoader.icpp\n+SILLYMemoryDataSource.icpp\n 1/***********************************************************************\n-2 filename: SILLYPNGImageLoader.icpp\n-3 created: 11 Jun 2006\n+2 Filename: SILLYMemoryDataSource.icpp\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline definition for PNGImageLoader\n+6 purpose: Inline function definition for MemoryDataSource class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -35,11 +34,21 @@\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30\n 31// Start of section namespace SILLY\n 32namespace SILLY\n 33{\n 34\n-35} // End of section namespace SILLY\n-36\n+35inline const byte* MemoryDataSource::getDataPtr() const\n+36{\n+37 return d_bytes;\n+38}\n+39\n+40inline size_t MemoryDataSource::getSize() const\n+41{\n+42 return d_size;\n+43}\n+44\n+45} // End of section namespace SILLY\n+46\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00092_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00092_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.h Source File\n \n \n \n \n \n \n
\n@@ -40,65 +40,116 @@\n \n \n
\n
\n-
SILLYTGAImageContext.icpp
\n+
SILLYImageLoaderManager.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYTGAImageContext.icpp
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Inline definition for TGAImageContext class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30
\n-
31// Start of section namespace SILLY
\n-
32namespace SILLY
\n-
33{
\n-
34inline TGAImageContext::TGAImageContext(size_t width, size_t height)
\n-
35 : ImageContext(width, height)
\n+
1/***********************************************************************
\n+
2 filename: ImageLoaderManager.h
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Manage all available loader
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLYImageLoaderManager_h_
\n+
31#define _SILLYImageLoaderManager_h_
\n+
32#include "SILLYBase.h"
\n+
33#include <vector>
\n+
34// Start of section namespace SILLY
\n+
35namespace SILLY
\n
36{
\n-
37}
\n-
38
\n-
39inline TGAImageContext::~TGAImageContext()
\n-
40{
\n-
41}
\n-
42
\n-
43} // End of section namespace SILLY
\n-
44
\n+
37class ImageLoader; // Forward declaration
\n+
42typedef std::vector<ImageLoader*> ImageLoaderList;
\n+
43
\n+
44#if defined(_MSC_VER)
\n+
45
\n+
46# pragma warning(push)
\n+
47
\n+
48# pragma warning(disable : 4251)
\n+
49
\n+
50#endif
\n+
51
\n+
\n+
56class SILLY_EXPORT ImageLoaderManager
\n+
57{
\n+
58
\n+
59public:
\n+\n+\n+
74 ImageLoaderList::iterator begin();
\n+
79 ImageLoaderList::iterator end();
\n+
86 void add(ImageLoader* loader);
\n+
87
\n+
88private:
\n+
89 ImageLoaderList d_loaders;
\n+
90
\n+
91public:
\n+
92 static ImageLoaderManager* getSingletonPtr();
\n+
93 static ImageLoaderManager& getSingleton();
\n+
94
\n+
95private:
\n+
96 static ImageLoaderManager* d_instance;
\n+
97
\n+
98 // Disabled operations
\n+\n+\n+
101};
\n+
\n+
102
\n+
103#if defined(_MSC_VER)
\n+
104
\n+
105# pragma warning(pop)
\n+
106
\n+
107#endif
\n+
108
\n+
109} // End of section namespace SILLY
\n+
110
\n+
111// Inclue inline function when needed
\n+
112#ifdef SILLY_OPT_INLINE
\n+
113#include "SILLYImageLoaderManager.icpp"
\n+
114#endif
\n+
115
\n+
116#endif // end of guard _SILLYImageLoaderManager_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
std::vector< ImageLoader * > ImageLoaderList
Typename for a collection of image loader.
\n+
This is an abstract class that define the interface of all image loader.
\n+
Manage the list of all supported ImageLoader.
\n+
void add(ImageLoader *loader)
Register an ImageLoader object.
\n+
ImageLoaderList::iterator begin()
Get an iterator to the first ImageLoader registered.
\n+
ImageLoaderList::iterator end()
Get an iterator to the first not registered ImageLoader.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYTGAImageContext.icpp\n+SILLYImageLoaderManager.h\n 1/***********************************************************************\n-2 filename: SILLYTGAImageContext.icpp\n-3 created: 11 Jun 2006\n+2 filename: ImageLoaderManager.h\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline definition for TGAImageContext class\n+6 purpose: Manage all available loader\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,24 +29,88 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30\n-31// Start of section namespace SILLY\n-32namespace SILLY\n-33{\n-34inline TGAImageContext::TGAImageContext(size_t width, size_t height)\n-35 : ImageContext(width, height)\n+30#ifndef _SILLYImageLoaderManager_h_\n+31#define _SILLYImageLoaderManager_h_\n+32#include \"SILLYBase.h\"\n+33#include \n+34// Start of section namespace SILLY\n+35namespace _\bS_\bI_\bL_\bL_\bY\n 36{\n-37}\n-38\n-39inline TGAImageContext::~TGAImageContext()\n-40{\n-41}\n-42\n-43} // End of section namespace SILLY\n-44\n+37class ImageLoader; // Forward declaration\n+_\b4_\b2typedef std::vector _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bL_\bi_\bs_\bt;\n+43\n+44#if defined(_MSC_VER)\n+45\n+46# pragma warning(push)\n+47\n+48# pragma warning(disable : 4251)\n+49\n+50#endif\n+51\n+_\b5_\b6class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br\n+57{\n+58\n+59public:\n+64 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br();\n+69 _\b~_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br();\n+_\b7_\b4 ImageLoaderList::iterator _\bb_\be_\bg_\bi_\bn();\n+_\b7_\b9 ImageLoaderList::iterator _\be_\bn_\bd();\n+_\b8_\b6 void _\ba_\bd_\bd(_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br* loader);\n+87\n+88private:\n+89 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bL_\bi_\bs_\bt d_loaders;\n+90\n+91public:\n+92 static _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br* getSingletonPtr();\n+93 static _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br& getSingleton();\n+94\n+95private:\n+96 static _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br* d_instance;\n+97\n+98 // Disabled operations\n+99 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br(_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br&);\n+100 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br& operator=(_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br&);\n+101};\n+102\n+103#if defined(_MSC_VER)\n+104\n+105# pragma warning(pop)\n+106\n+107#endif\n+108\n+109} // End of section namespace SILLY\n+110\n+111// Inclue inline function when needed\n+112#ifdef SILLY_OPT_INLINE\n+113#include \"SILLYImageLoaderManager.icpp\"\n+114#endif\n+115\n+116#endif // end of guard _SILLYImageLoaderManager_h_\n+_\bS_\bI_\bL_\bL_\bY\n+Simple Image Loading LibrarY namespace.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bL_\bi_\bs_\bt\n+std::vector< ImageLoader * > ImageLoaderList\n+Typename for a collection of image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b._\bh_\b:_\b4_\b2\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+This is an abstract class that define the interface of all image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br\n+Manage the list of all supported ImageLoader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b._\bh_\b:_\b5_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b:_\b:_\ba_\bd_\bd\n+void add(ImageLoader *loader)\n+Register an ImageLoader object.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b:_\b:_\bb_\be_\bg_\bi_\bn\n+ImageLoaderList::iterator begin()\n+Get an iterator to the first ImageLoader registered.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\bM_\ba_\bn_\ba_\bg_\be_\br_\b:_\b:_\be_\bn_\bd\n+ImageLoaderList::iterator end()\n+Get an iterator to the first not registered ImageLoader.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00095_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00095_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageLoader.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYMemoryDataSource.h Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYPNGImageLoader.h
\n+
SILLYMemoryDataSource.h
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYPNGImageLoader.h
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n+
2 filename: SILLYMemoryDataSource.h
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Declaration of the PNGImageLoader class
\n+
6 purpose: SILLYMemoryDataSource declaration for the SILLY library
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -76,58 +76,52 @@\n
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n-
30#ifndef _SILLYPNGImageLoader_h_
\n-
31#define _SILLYPNGImageLoader_h_
\n+
30#ifndef _SILLYMemoryDataSource_h_
\n+
31#define _SILLYMemoryDataSource_h_
\n
32#include "SILLYBase.h"
\n-
33#include "SILLYImageLoader.h"
\n-
34#include "SILLYDataSource.h"
\n-
35// Start of section namespace SILLY
\n-
36namespace SILLY
\n-
37{
\n-
\n-\n-
43{
\n-
44public:
\n-\n-
46
\n-\n-
48
\n-
49 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
\n-
50
\n-
51 bool loadImageData(PixelOrigin origin,
\n-
52 DataSource* data,
\n-
53 ImageContext* context);
\n-
54private:
\n-
55
\n-
56};
\n-
\n-
57
\n-
58
\n-
59} // End of section namespace SILLY
\n-
60
\n-
61// Inclue inline function when needed
\n-
62#ifdef SILLY_OPT_INLINE
\n-
63#include "SILLYPNGImageLoader.icpp"
\n-
64#endif
\n+
33#include "SILLYDataSource.h"
\n+
34// Start of section namespace SILLY
\n+
35namespace SILLY
\n+
36{
\n+
37
\n+
\n+
48class SILLY_EXPORT MemoryDataSource : public DataSource
\n+
49{
\n+
50public:
\n+
63 MemoryDataSource(const byte* data, size_t size);
\n+
64
\n
65
\n-
66#endif // end of guard _SILLYPNGImageLoader_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
Loader for PNG Image.
\n-
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
\n-
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
This is an abstract class that define the interface of all image loader.
\n+
66 const byte* getDataPtr() const;
\n+
67
\n+
68 size_t getSize() const;
\n+
69private:
\n+
70 const byte* d_bytes;
\n+
71 size_t d_size;
\n+
72};
\n+
\n+
73
\n+
74
\n+
75} // End of section namespace SILLY
\n+
76
\n+
77// Inclue inline function when needed
\n+
78#ifdef SILLY_OPT_INLINE
\n+
79#include "SILLYMemoryDataSource.icpp"
\n+
80#endif
\n+
81
\n+
82#endif // end of guard _SILLYMemoryDataSource_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
This is an abstract class used to provide data to the loader.
\n+
Load an image from a memory area.
\n+
const byte * getDataPtr() const
Get raw access to the image data.
\n+
size_t getSize() const
Return the size of the data.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYPNGImageLoader.h\n+SILLYMemoryDataSource.h\n 1/***********************************************************************\n-2 filename: SILLYPNGImageLoader.h\n-3 created: 11 Jun 2006\n+2 filename: SILLYMemoryDataSource.h\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Declaration of the PNGImageLoader class\n+6 purpose: SILLYMemoryDataSource declaration for the SILLY library\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,73 +29,55 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYPNGImageLoader_h_\n-31#define _SILLYPNGImageLoader_h_\n+30#ifndef _SILLYMemoryDataSource_h_\n+31#define _SILLYMemoryDataSource_h_\n 32#include \"SILLYBase.h\"\n-33#include \"SILLYImageLoader.h\"\n-34#include \"SILLYDataSource.h\"\n-35// Start of section namespace SILLY\n-36namespace _\bS_\bI_\bL_\bL_\bY\n-37{\n-_\b4_\b2class _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br : public _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-43{\n-44public:\n-45 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n-46\n-47 _\b~_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n-48\n-49 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n-50\n-51 bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n-52 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n-53 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context);\n-54private:\n-55\n-56};\n-57\n-58\n-59} // End of section namespace SILLY\n-60\n-61// Inclue inline function when needed\n-62#ifdef SILLY_OPT_INLINE\n-63#include \"SILLYPNGImageLoader.icpp\"\n-64#endif\n+33#include \"SILLYDataSource.h\"\n+34// Start of section namespace SILLY\n+35namespace _\bS_\bI_\bL_\bL_\bY\n+36{\n+37\n+_\b4_\b8class SILLY_EXPORT _\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be : public _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+49{\n+50public:\n+63 _\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const byte* data, size_t size);\n+64\n 65\n-66#endif // end of guard _SILLYPNGImageLoader_h_\n+_\b6_\b6 const byte* _\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() const;\n+67\n+_\b6_\b8 size_t _\bg_\be_\bt_\bS_\bi_\bz_\be() const;\n+69private:\n+70 const byte* d_bytes;\n+71 size_t d_size;\n+72};\n+73\n+74\n+75} // End of section namespace SILLY\n+76\n+77// Inclue inline function when needed\n+78#ifdef SILLY_OPT_INLINE\n+79#include \"SILLYMemoryDataSource.icpp\"\n+80#endif\n+81\n+82#endif // end of guard _SILLYMemoryDataSource_h_\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat\n-List all pixel format supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n-PixelOrigin\n-List all pixel origin supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-Loader for PNG Image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b3\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n-ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)\n-Parse the header of the image and fill the header struct.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b8_\b8\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n-bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)\n-Parse the pixels data of the image and fill the header struct.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b1_\b5_\b4\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n This is an abstract class used to provide data to the loader.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Store the data needed by an ImageLoader object during the parsing of an image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-This is an abstract class that define the interface of all image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+Load an image from a memory area.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b9\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n+const byte * getDataPtr() const\n+Get raw access to the image data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bM_\be_\bm_\bo_\br_\by_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n+size_t getSize() const\n+Return the size of the data.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00098_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00098_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYTGAImageLoader.icpp
\n+
SILLYFileDataSource.icpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYTGAImageLoader.icpp
\n-
3 created: 11 Jun 2006
\n+
2 filename: SILLYFileDataSource.icpp
\n+
3 created: 20 Jul 2006
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Inline defintion of TGAImageLoader class
\n+
6 purpose: Inline function definition for the FileDataSource class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,17 +80,31 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30
\n
31// Start of section namespace SILLY
\n
32namespace SILLY
\n
33{
\n-
34
\n-
35} // End of section namespace SILLY
\n-
36
\n+
34inline bool FileDataSource::isValid() const
\n+
35{
\n+
36 return d_error;
\n+
37}
\n+
38
\n+
39inline const byte* FileDataSource::getDataPtr() const
\n+
40{
\n+
41 return d_bytes;
\n+
42}
\n+
43
\n+
44inline size_t FileDataSource::getSize() const
\n+
45{
\n+
46 return d_size;
\n+
47}
\n+
48
\n+
49} // End of section namespace SILLY
\n+
50
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYTGAImageLoader.icpp\n+SILLYFileDataSource.icpp\n 1/***********************************************************************\n-2 filename: SILLYTGAImageLoader.icpp\n-3 created: 11 Jun 2006\n+2 filename: SILLYFileDataSource.icpp\n+3 created: 20 Jul 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Inline defintion of TGAImageLoader class\n+6 purpose: Inline function definition for the FileDataSource class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -34,12 +33,26 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30\n 31// Start of section namespace SILLY\n 32namespace SILLY\n 33{\n-34\n-35} // End of section namespace SILLY\n-36\n+34inline bool FileDataSource::isValid() const\n+35{\n+36 return d_error;\n+37}\n+38\n+39inline const byte* FileDataSource::getDataPtr() const\n+40{\n+41 return d_bytes;\n+42}\n+43\n+44inline size_t FileDataSource::getSize() const\n+45{\n+46 return d_size;\n+47}\n+48\n+49} // End of section namespace SILLY\n+50\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00101_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00101_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageLoader.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYOptions.h Source File\n \n \n \n \n \n \n
\n@@ -40,88 +40,60 @@\n \n \n
\n
\n-
SILLYJPGImageLoader.h
\n+
SILLYOptions.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYJPGImageLoader.h
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Declaration of the JPGImageLoader class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYJPGImageLoader_h_
\n-
31#define _SILLYJPGImageLoader_h_
\n-
32#include "SILLYBase.h"
\n-
33#include "SILLYImageLoader.h"
\n-
34// Start of section namespace SILLY
\n-
35namespace SILLY
\n-
36{
\n-
37
\n-
\n-\n-
43{
\n-
44public:
\n-\n-\n-\n-
48 bool loadImageData(PixelOrigin origin, DataSource* data, ImageContext* context);
\n-
49private:
\n-
50};
\n-
\n-
51
\n-
52
\n-
53} // End of section namespace SILLY
\n-
54
\n-
55// Inclue inline function when needed
\n-
56#ifdef SILLY_OPT_INLINE
\n-
57#include "SILLYJPGImageLoader.icpp"
\n-
58#endif
\n-
59
\n-
60#endif // end of guard _SILLYJPGImageLoader_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
Loader class for JPG Image.
\n-
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
\n-
ImageContext * loadHeader(PixelFormat &header, DataSource *data)
Parse the header of the image and fill the header struct.
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
This is an abstract class that define the interface of all image loader.
\n+
1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */
\n+
2/***********************************************************************
\n+
3 filename: SILLYOptions.h.in
\n+
4 created: 2006/06/10
\n+
5 author: Olivier Delannoy
\n+
6
\n+
7 purpose: Store options of the SILLY library
\n+
8*************************************************************************/
\n+
9/***************************************************************************
\n+
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
11 *
\n+
12 * Permission is hereby granted, free of charge, to any person obtaining
\n+
13 * a copy of this software and associated documentation files (the
\n+
14 * "Software"), to deal in the Software without restriction, including
\n+
15 * without limitation the rights to use, copy, modify, merge, publish,
\n+
16 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
17 * permit persons to whom the Software is furnished to do so, subject to
\n+
18 * the following conditions:
\n+
19 *
\n+
20 * The above copyright notice and this permission notice shall be
\n+
21 * included in all copies or substantial portions of the Software.
\n+
22 *
\n+
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
29 * OTHER DEALINGS IN THE SOFTWARE.
\n+
30 ***************************************************************************/
\n+
31/* Defined to 1 if inline is enabled */
\n+
32#define SILLY_OPT_INLINE 1
\n+
33
\n+
34/* Defined to 1 if debug is enabled */
\n+
35/* #undef SILLY_OPT_DEBUG */
\n+
36
\n+
37/* Defined to 1 if profile is enabled */
\n+
38/* #undef SILLY_OPT_PROFILE */
\n+
39
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,97 +1,47 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYJPGImageLoader.h\n-1/***********************************************************************\n-2 filename: SILLYJPGImageLoader.h\n-3 created: 11 Jun 2006\n-4 author: Olivier Delannoy\n-5\n-6 purpose: Declaration of the JPGImageLoader class\n-7*************************************************************************/\n-8/***************************************************************************\n-9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n-10 *\n-11 * Permission is hereby granted, free of charge, to any person obtaining\n-12 * a copy of this software and associated documentation files (the\n-13 * \"Software\"), to deal in the Software without restriction, including\n-14 * without limitation the rights to use, copy, modify, merge, publish,\n-15 * distribute, sublicense, and/or sell copies of the Software, and to\n-16 * permit persons to whom the Software is furnished to do so, subject to\n-17 * the following conditions:\n-18 *\n-19 * The above copyright notice and this permission notice shall be\n-20 * included in all copies or substantial portions of the Software.\n-21 *\n-22 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n-23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n-24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n-25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n-26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n-27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n-28 * OTHER DEALINGS IN THE SOFTWARE.\n-29 ***************************************************************************/\n-30#ifndef _SILLYJPGImageLoader_h_\n-31#define _SILLYJPGImageLoader_h_\n-32#include \"SILLYBase.h\"\n-33#include \"SILLYImageLoader.h\"\n-34// Start of section namespace SILLY\n-35namespace _\bS_\bI_\bL_\bL_\bY\n-36{\n-37\n-_\b4_\b2class _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br : public _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-43{\n-44public:\n-45 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n-46 _\b~_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n-47 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& header, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n-48 bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data, _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt*\n-context);\n-49private:\n-50};\n-51\n-52\n-53} // End of section namespace SILLY\n-54\n-55// Inclue inline function when needed\n-56#ifdef SILLY_OPT_INLINE\n-57#include \"SILLYJPGImageLoader.icpp\"\n-58#endif\n-59\n-60#endif // end of guard _SILLYJPGImageLoader_h_\n-_\bS_\bI_\bL_\bL_\bY\n-Simple Image Loading LibrarY namespace.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat\n-List all pixel format supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n-PixelOrigin\n-List all pixel origin supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-Loader class for JPG Image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b3\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n-bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)\n-Parse the pixels data of the image and fill the header struct.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b9_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n-ImageContext * loadHeader(PixelFormat &header, DataSource *data)\n-Parse the header of the image and fill the header struct.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b5_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Store the data needed by an ImageLoader object during the parsing of an image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-This is an abstract class that define the interface of all image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n+SILLYOptions.h\n+1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */\n+2/***********************************************************************\n+3 filename: SILLYOptions.h.in\n+4 created: 2006/06/10\n+5 author: Olivier Delannoy\n+6\n+7 purpose: Store options of the SILLY library\n+8*************************************************************************/\n+9/***************************************************************************\n+10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n+11 *\n+12 * Permission is hereby granted, free of charge, to any person obtaining\n+13 * a copy of this software and associated documentation files (the\n+14 * \"Software\"), to deal in the Software without restriction, including\n+15 * without limitation the rights to use, copy, modify, merge, publish,\n+16 * distribute, sublicense, and/or sell copies of the Software, and to\n+17 * permit persons to whom the Software is furnished to do so, subject to\n+18 * the following conditions:\n+19 *\n+20 * The above copyright notice and this permission notice shall be\n+21 * included in all copies or substantial portions of the Software.\n+22 *\n+23 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n+26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n+27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n+28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n+29 * OTHER DEALINGS IN THE SOFTWARE.\n+30 ***************************************************************************/\n+31/* Defined to 1 if inline is enabled */\n+32#define SILLY_OPT_INLINE 1\n+33\n+34/* Defined to 1 if debug is enabled */\n+35/* #undef SILLY_OPT_DEBUG */\n+36\n+37/* Defined to 1 if profile is enabled */\n+38/* #undef SILLY_OPT_PROFILE */\n+39\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00104_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00104_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYJPGImageContext.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.h Source File\n \n \n \n \n \n \n
\n@@ -40,98 +40,130 @@\n \n \n
\n
\n-
SILLYJPGImageContext.h
\n+
SILLYImage.h
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYJPGImageContext.h
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Declaration of the JPGImageContext class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYJPGImageContext_h_
\n-
31#define _SILLYJPGImageContext_h_
\n-
32#include "SILLYBase.h"
\n-
33#include "SILLYImageContext.h"
\n-
34#include "SILLYDataSource.h"
\n-
35// Start of section namespace SILLY
\n-
36#include <setjmp.h>
\n-
37#include <stdio.h>
\n-
38#include <string.h>
\n-
39extern "C"
\n+
1
\n+
2/***********************************************************************
\n+
3 filename: SILLYImage.h
\n+
4 created: 10 Jun 2006
\n+
5 author: Olivier Delannoy
\n+
6
\n+
7 purpose: Image class definition
\n+
8*************************************************************************/
\n+
9/***************************************************************************
\n+
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
11 *
\n+
12 * Permission is hereby granted, free of charge, to any person obtaining
\n+
13 * a copy of this software and associated documentation files (the
\n+
14 * "Software"), to deal in the Software without restriction, including
\n+
15 * without limitation the rights to use, copy, modify, merge, publish,
\n+
16 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
17 * permit persons to whom the Software is furnished to do so, subject to
\n+
18 * the following conditions:
\n+
19 *
\n+
20 * The above copyright notice and this permission notice shall be
\n+
21 * included in all copies or substantial portions of the Software.
\n+
22 *
\n+
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
29 * OTHER DEALINGS IN THE SOFTWARE.
\n+
30 ***************************************************************************/
\n+
31#ifndef _SILLYImage_h_
\n+
32#define _SILLYImage_h_
\n+
33#include "SILLYBase.h"
\n+
34#include "SILLYImageContext.h"
\n+
35#include "SILLYDataSource.h"
\n+
36#include "SILLYImageLoader.h"
\n+
37
\n+
38// Start of section namespace SILLY
\n+
39namespace SILLY
\n
40{
\n-
41#include <jpeglib.h>
\n-
42}
\n-
43namespace SILLY
\n-
44{
\n-
45
\n-
\n-\n-
57{
\n-
58public:
\n-\n-\n-
61
\n-
62 void setImageSize();
\n-
63
\n-
64
\n-
65 jpeg_source_mgr src_mgr;
\n-
66 jpeg_decompress_struct cinfo;
\n-
67
\n-
68 jpeg_error_mgr d_error_mgr;
\n-
69 jmp_buf setjmp_buffer;
\n-
70 DataSource* d_source;
\n-
71};
\n+
41
\n+
\n+
46class SILLY_EXPORT Image
\n+
47{
\n+
48public:
\n+
55 Image(DataSource& data);
\n+
56
\n+\n+
62
\n+
67 bool isValid() const;
\n+
68
\n+
69
\n+
76 bool loadImageHeader();
\n+
77
\n+
91 bool loadImageData(PixelFormat resultFormat = PF_RGBA, PixelOrigin origin = PO_TOP_LEFT);
\n+
92
\n+
97 size_t getWidth() const;
\n+
98
\n+
103 size_t getHeight() const;
\n+
104
\n+\n+
110
\n+\n+
116
\n+
120 const byte* getPixelsDataPtr() const;
\n+
125 size_t getPixelsDataSize() const;
\n+
130 const char* getLoaderIdentifierString() const;
\n+
131private:
\n+
132 bool allocate();
\n+
133
\n+
134private:
\n+
135
\n+
136 size_t d_bpp;
\n+
137 PixelFormat d_pfSource;
\n+
138 byte* d_pixels;
\n+
139 DataSource* d_data;
\n+
140 ImageContext* d_imageContext;
\n+
141 ImageLoader* d_imageLoader;
\n+
142
\n+
143 // Disabled operation
\n+
144 Image(Image&);
\n+
145 Image& operator=(Image&);
\n+
146};
\n
\n-
72
\n-
73
\n-
74} // End of section namespace SILLY
\n-
75
\n-
76// Inclue inline function when needed
\n-
77#ifdef SILLY_OPT_INLINE
\n-
78#include "SILLYJPGImageContext.icpp"
\n-
79#endif
\n-
80
\n-
81#endif // end of guard _SILLYJPGImageContext_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
Image Context for JPG image loader.
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
147
\n+
148} // End of section namespace SILLY
\n+
149
\n+
150// Inclue inline function when needed
\n+
151#ifdef SILLY_OPT_INLINE
\n+
152#include "SILLYImage.icpp"
\n+
153#endif
\n+
154
\n+
155#endif // end of guard _SILLYImage_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n+
This is an abstract class used to provide data to the loader.
\n+
Image is the main user class of the library.
Definition SILLYImage.h:47
\n+
PixelFormat getSourcePixelFormat() const
Retrieve the pixel format used for the image storage.
\n+
const char * getLoaderIdentifierString() const
Get Image loader identifier string.
\n+
const byte * getPixelsDataPtr() const
Get a pointer to the pixels data.
\n+
bool isValid() const
Return true if the image is valid after its loading.
\n+
size_t getPixelsDataSize() const
Get the size of the pixel buffer.
\n+
~Image()
Destructor.
\n+
size_t getWidth() const
Retrieve the width of the image.
\n+
PixelFormat getPixelFormat() const
Retrieve the pixel format of the resulting image.
\n+
size_t getHeight() const
Retrieve the height of the image.
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
This is an abstract class that define the interface of all image loader.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,92 +1,150 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYJPGImageContext.h\n-1/***********************************************************************\n-2 filename: SILLYJPGImageContext.h\n-3 created: 11 Jun 2006\n-4 author: Olivier Delannoy\n-5\n-6 purpose: Declaration of the JPGImageContext class\n-7*************************************************************************/\n-8/***************************************************************************\n-9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n-10 *\n-11 * Permission is hereby granted, free of charge, to any person obtaining\n-12 * a copy of this software and associated documentation files (the\n-13 * \"Software\"), to deal in the Software without restriction, including\n-14 * without limitation the rights to use, copy, modify, merge, publish,\n-15 * distribute, sublicense, and/or sell copies of the Software, and to\n-16 * permit persons to whom the Software is furnished to do so, subject to\n-17 * the following conditions:\n-18 *\n-19 * The above copyright notice and this permission notice shall be\n-20 * included in all copies or substantial portions of the Software.\n-21 *\n-22 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n-23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n-24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n-25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n-26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n-27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n-28 * OTHER DEALINGS IN THE SOFTWARE.\n-29 ***************************************************************************/\n-30#ifndef _SILLYJPGImageContext_h_\n-31#define _SILLYJPGImageContext_h_\n-32#include \"SILLYBase.h\"\n-33#include \"SILLYImageContext.h\"\n-34#include \"SILLYDataSource.h\"\n-35// Start of section namespace SILLY\n-36#include \n-37#include \n-38#include \n-39extern \"C\"\n+SILLYImage.h\n+1\n+2/***********************************************************************\n+3 filename: SILLYImage.h\n+4 created: 10 Jun 2006\n+5 author: Olivier Delannoy\n+6\n+7 purpose: Image class definition\n+8*************************************************************************/\n+9/***************************************************************************\n+10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n+11 *\n+12 * Permission is hereby granted, free of charge, to any person obtaining\n+13 * a copy of this software and associated documentation files (the\n+14 * \"Software\"), to deal in the Software without restriction, including\n+15 * without limitation the rights to use, copy, modify, merge, publish,\n+16 * distribute, sublicense, and/or sell copies of the Software, and to\n+17 * permit persons to whom the Software is furnished to do so, subject to\n+18 * the following conditions:\n+19 *\n+20 * The above copyright notice and this permission notice shall be\n+21 * included in all copies or substantial portions of the Software.\n+22 *\n+23 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n+26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n+27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n+28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n+29 * OTHER DEALINGS IN THE SOFTWARE.\n+30 ***************************************************************************/\n+31#ifndef _SILLYImage_h_\n+32#define _SILLYImage_h_\n+33#include \"SILLYBase.h\"\n+34#include \"SILLYImageContext.h\"\n+35#include \"SILLYDataSource.h\"\n+36#include \"SILLYImageLoader.h\"\n+37\n+38// Start of section namespace SILLY\n+39namespace _\bS_\bI_\bL_\bL_\bY\n 40{\n-41#include \n-42}\n-43namespace _\bS_\bI_\bL_\bL_\bY\n-44{\n-45\n-_\b5_\b6class _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt : public _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-57{\n-58public:\n-59 _\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n-60 _\b~_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n-61\n-62 void setImageSize();\n-63\n-64\n-65 jpeg_source_mgr src_mgr;\n-66 jpeg_decompress_struct cinfo;\n-67\n-68 jpeg_error_mgr d_error_mgr;\n-69 jmp_buf setjmp_buffer;\n-70 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* d_source;\n-71};\n-72\n-73\n-74} // End of section namespace SILLY\n-75\n-76// Inclue inline function when needed\n-77#ifdef SILLY_OPT_INLINE\n-78#include \"SILLYJPGImageContext.icpp\"\n-79#endif\n-80\n-81#endif // end of guard _SILLYJPGImageContext_h_\n+41\n+_\b4_\b6class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be\n+47{\n+48public:\n+55 _\bI_\bm_\ba_\bg_\be(_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be& data);\n+56\n+_\b6_\b1 _\b~_\bI_\bm_\ba_\bg_\be();\n+62\n+_\b6_\b7 bool _\bi_\bs_\bV_\ba_\bl_\bi_\bd() const;\n+68\n+69\n+76 bool loadImageHeader();\n+77\n+91 bool loadImageData(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt resultFormat = PF_RGBA, _\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin =\n+PO_TOP_LEFT);\n+92\n+_\b9_\b7 size_t _\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh() const;\n+98\n+_\b1_\b0_\b3 size_t _\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt() const;\n+104\n+_\b1_\b0_\b9 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt _\bg_\be_\bt_\bS_\bo_\bu_\br_\bc_\be_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt() const;\n+110\n+_\b1_\b1_\b5 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt _\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt() const;\n+116\n+_\b1_\b2_\b0 const byte* _\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bP_\bt_\br() const;\n+_\b1_\b2_\b5 size_t _\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bS_\bi_\bz_\be() const;\n+_\b1_\b3_\b0 const char* _\bg_\be_\bt_\bL_\bo_\ba_\bd_\be_\br_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg() const;\n+131private:\n+132 bool allocate();\n+133\n+134private:\n+135\n+136 size_t d_bpp;\n+137 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt d_pfSource;\n+138 byte* d_pixels;\n+139 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* d_data;\n+140 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* d_imageContext;\n+141 _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br* d_imageLoader;\n+142\n+143 // Disabled operation\n+144 _\bI_\bm_\ba_\bg_\be(_\bI_\bm_\ba_\bg_\be&);\n+145 _\bI_\bm_\ba_\bg_\be& operator=(_\bI_\bm_\ba_\bg_\be&);\n+146};\n+147\n+148} // End of section namespace SILLY\n+149\n+150// Inclue inline function when needed\n+151#ifdef SILLY_OPT_INLINE\n+152#include \"SILLYImage.icpp\"\n+153#endif\n+154\n+155#endif // end of guard _SILLYImage_h_\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Image Context for JPG image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b5_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat\n+List all pixel format supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n+PixelOrigin\n+List all pixel origin supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n This is an abstract class used to provide data to the loader.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be\n+Image is the main user class of the library.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bS_\bo_\bu_\br_\bc_\be_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat getSourcePixelFormat() const\n+Retrieve the pixel format used for the image storage.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bL_\bo_\ba_\bd_\be_\br_\bI_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br_\bS_\bt_\br_\bi_\bn_\bg\n+const char * getLoaderIdentifierString() const\n+Get Image loader identifier string.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bP_\bt_\br\n+const byte * getPixelsDataPtr() const\n+Get a pointer to the pixels data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bi_\bs_\bV_\ba_\bl_\bi_\bd\n+bool isValid() const\n+Return true if the image is valid after its loading.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bs_\bD_\ba_\bt_\ba_\bS_\bi_\bz_\be\n+size_t getPixelsDataSize() const\n+Get the size of the pixel buffer.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\b~_\bI_\bm_\ba_\bg_\be\n+~Image()\n+Destructor.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bW_\bi_\bd_\bt_\bh\n+size_t getWidth() const\n+Retrieve the width of the image.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat getPixelFormat() const\n+Retrieve the pixel format of the resulting image.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\b:_\b:_\bg_\be_\bt_\bH_\be_\bi_\bg_\bh_\bt\n+size_t getHeight() const\n+Retrieve the height of the image.\n _\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n Store the data needed by an ImageLoader object during the parsing of an image.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n+This is an abstract class that define the interface of all image loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00107_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00107_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.icpp Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,27 +40,27 @@\n \n \n
\n
\n-
SILLYPNGImageContext.icpp
\n+
SILLYDataSource.icpp
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYPNGImageContext.icpp
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n+
2 filename: SILLYDataSource.icpp
\n+
3 created: 10 Jun 2006
\n+
4 author: ode@dalfy.dalfy.dyndns.org
\n
5
\n-
6 purpose: Inline definition for PNGImageContext class
\n+
6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -80,17 +80,26 @@\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n
30
\n
31// Start of section namespace SILLY
\n
32namespace SILLY
\n
33{
\n-
34
\n-
35} // End of section namespace SILLY
\n-
36
\n+
34inline DataSource::~DataSource()
\n+
35{
\n+
36}
\n+
37
\n+
38inline byte DataSource::operator[](size_t offset) const
\n+
39{
\n+
40 assert(offset < getSize() && "ASSERT: Trying to access pixel outside of the data");
\n+
41 return getDataPtr()[offset];
\n+
42}
\n+
43
\n+
44} // End of section namespace SILLY
\n+
45
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYPNGImageContext.icpp\n+SILLYDataSource.icpp\n 1/***********************************************************************\n-2 filename: SILLYPNGImageContext.icpp\n-3 created: 11 Jun 2006\n-4 author: Olivier Delannoy\n+2 filename: SILLYDataSource.icpp\n+3 created: 10 Jun 2006\n+4 author: ode@dalfy.dalfy.dyndns.org\n 5\n-6 purpose: Inline definition for PNGImageContext class\n+6 purpose: Inline function definition for (F>>>ILE_SANS<<<) class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -34,12 +33,22 @@\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n 30\n 31// Start of section namespace SILLY\n 32namespace SILLY\n 33{\n-34\n-35} // End of section namespace SILLY\n-36\n+34inline DataSource::~DataSource()\n+35{\n+36}\n+37\n+38inline byte DataSource::operator[](size_t offset) const\n+39{\n+40 assert(offset < getSize() && \"ASSERT: Trying to access pixel outside of the\n+data\");\n+41 return getDataPtr()[offset];\n+42}\n+43\n+44} // End of section namespace SILLY\n+45\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00110_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00110_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageLoader.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImage.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,90 +40,105 @@\n \n \n
\n
\n-
SILLYTGAImageLoader.h
\n+
SILLYImage.icpp
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYTGAImageLoader.h
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Declaration of the TGAImageLoader class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYTGAImageLoader_h_
\n-
31#define _SILLYTGAImageLoader_h_
\n-
32#include "SILLYBase.h"
\n-
33#include "SILLYImageLoader.h"
\n-
34// Start of section namespace SILLY
\n-
35namespace SILLY
\n+
1/***********************************************************************
\n+
2 filename: SILLYImage.icpp
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Inline definition of the image class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30
\n+
31// Start of section namespace SILLY
\n+
32namespace SILLY
\n+
33{
\n+
34
\n+
35inline bool Image::isValid() const
\n
36{
\n-
37class TGAImageContext;
\n-
\n-\n-
44{
\n-
45public:
\n-\n-\n-
48 ImageContext* loadHeader(PixelFormat& formatSource, DataSource* data);
\n-
49 bool loadImageData(PixelOrigin origin,
\n-
50 DataSource* data,
\n-
51 ImageContext* context);
\n-
52private:
\n-
53
\n-
54};
\n-
\n-
55
\n-
56} // End of section namespace SILLY
\n-
57
\n-
58// Inclue inline function when needed
\n-
59#ifdef SILLY_OPT_INLINE
\n-
60#include "SILLYTGAImageLoader.icpp"
\n-
61#endif
\n-
62
\n-
63#endif // end of guard _SILLYTGAImageLoader_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n-
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n-
Loader for Targa image.
\n-
ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)
Parse the header of the image and fill the header struct.
\n-
bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)
Parse the pixels data of the image and fill the header struct.
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n-
This is an abstract class that define the interface of all image loader.
\n+
37 return d_imageContext && d_pixels;
\n+
38}
\n+
39
\n+
40inline size_t Image::getWidth() const
\n+
41{
\n+
42 return d_imageContext->getWidth();
\n+
43}
\n+
44
\n+
45inline size_t Image::getHeight() const
\n+
46{
\n+
47 return d_imageContext->getHeight();
\n+
48}
\n+
49
\n+
50inline PixelFormat Image::getSourcePixelFormat() const
\n+
51{
\n+
52 return d_pfSource;
\n+
53}
\n+
54
\n+
55inline PixelFormat Image::getPixelFormat() const
\n+
56{
\n+
57 return d_imageContext->getPixelFormat();
\n+
58}
\n+
59
\n+
60inline const byte* Image::getPixelsDataPtr() const
\n+
61{
\n+
62 return d_pixels;
\n+
63}
\n+
64
\n+
65inline size_t Image::getPixelsDataSize() const
\n+
66{
\n+
67 return getWidth() * getHeight() * d_bpp;
\n+
68}
\n+
69
\n+
70inline Image::~Image()
\n+
71{
\n+
72 delete [] d_pixels;
\n+
73 if (d_imageLoader)
\n+
74 d_imageLoader->destroyContext(d_imageContext);
\n+
75}
\n+
76inline const char* Image::getLoaderIdentifierString() const
\n+
77{
\n+
78 if (d_imageLoader)
\n+
79 return d_imageLoader->getIdentifierString();
\n+
80 return 0;
\n+
81}
\n+
82
\n+
83} // End of section namespace SILLY
\n+
84
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYTGAImageLoader.h\n+SILLYImage.icpp\n 1/***********************************************************************\n-2 filename: SILLYTGAImageLoader.h\n-3 created: 11 Jun 2006\n+2 filename: SILLYImage.icpp\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Declaration of the TGAImageLoader class\n+6 purpose: Inline definition of the image class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,69 +29,64 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYTGAImageLoader_h_\n-31#define _SILLYTGAImageLoader_h_\n-32#include \"SILLYBase.h\"\n-33#include \"SILLYImageLoader.h\"\n-34// Start of section namespace SILLY\n-35namespace _\bS_\bI_\bL_\bL_\bY\n+30\n+31// Start of section namespace SILLY\n+32namespace SILLY\n+33{\n+34\n+35inline bool Image::isValid() const\n 36{\n-37class TGAImageContext;\n-_\b4_\b3class _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br : public _\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-44{\n-45public:\n-46 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n-47 _\b~_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br();\n-48 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* _\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br(_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt& formatSource, _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n-49 bool _\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba(_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn origin,\n-50 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data,\n-51 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt* context);\n-52private:\n-53\n-54};\n-55\n-56} // End of section namespace SILLY\n-57\n-58// Inclue inline function when needed\n-59#ifdef SILLY_OPT_INLINE\n-60#include \"SILLYTGAImageLoader.icpp\"\n-61#endif\n-62\n-63#endif // end of guard _SILLYTGAImageLoader_h_\n-_\bS_\bI_\bL_\bL_\bY\n-Simple Image Loading LibrarY namespace.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n-PixelFormat\n-List all pixel format supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bO_\br_\bi_\bg_\bi_\bn\n-PixelOrigin\n-List all pixel origin supported.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b7_\b1\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-Loader for Targa image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bH_\be_\ba_\bd_\be_\br\n-ImageContext * loadHeader(PixelFormat &formatSource, DataSource *data)\n-Parse the header of the image and fill the header struct.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b7_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b:_\b:_\bl_\bo_\ba_\bd_\bI_\bm_\ba_\bg_\be_\bD_\ba_\bt_\ba\n-bool loadImageData(PixelOrigin origin, DataSource *data, ImageContext *context)\n-Parse the pixels data of the image and fill the header struct.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bc_\bp_\bp_\b:_\b1_\b3_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Store the data needed by an ImageLoader object during the parsing of an image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-This is an abstract class that define the interface of all image loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b7\n+37 return d_imageContext && d_pixels;\n+38}\n+39\n+40inline size_t Image::getWidth() const\n+41{\n+42 return d_imageContext->getWidth();\n+43}\n+44\n+45inline size_t Image::getHeight() const\n+46{\n+47 return d_imageContext->getHeight();\n+48}\n+49\n+50inline PixelFormat Image::getSourcePixelFormat() const\n+51{\n+52 return d_pfSource;\n+53}\n+54\n+55inline PixelFormat Image::getPixelFormat() const\n+56{\n+57 return d_imageContext->getPixelFormat();\n+58}\n+59\n+60inline const byte* Image::getPixelsDataPtr() const\n+61{\n+62 return d_pixels;\n+63}\n+64\n+65inline size_t Image::getPixelsDataSize() const\n+66{\n+67 return getWidth() * getHeight() * d_bpp;\n+68}\n+69\n+70inline Image::~Image()\n+71{\n+72 delete [] d_pixels;\n+73 if (d_imageLoader)\n+74 d_imageLoader->destroyContext(d_imageContext);\n+75}\n+76inline const char* Image::getLoaderIdentifierString() const\n+77{\n+78 if (d_imageLoader)\n+79 return d_imageLoader->getIdentifierString();\n+80 return 0;\n+81}\n+82\n+83} // End of section namespace SILLY\n+84\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00113_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00113_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYPNGImageContext.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,104 +40,125 @@\n \n \n
\n
\n-
SILLYPNGImageContext.h
\n+
SILLYImageContext.icpp
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYPNGImageContext.h
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Declaration of the PNGImageContext class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYPNGImageContext_h_
\n-
31#define _SILLYPNGImageContext_h_
\n-
32#include "SILLYBase.h"
\n-
33#include "SILLYImageContext.h"
\n-
34#include "SILLYDataSource.h"
\n-
35#include <png.h>
\n-
36// Start of section namespace SILLY
\n-
37namespace SILLY
\n-
38{
\n+
1/***********************************************************************
\n+
2 filename: SILLYImageContext.icpp
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Inline definition for ImageContext
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30
\n+
31// Start of section namespace SILLY
\n+
32namespace SILLY
\n+
33{
\n+
34
\n+
35inline ImageContext::ImageContext(size_t width, size_t height)
\n+
36 : d_pixels(0), d_length(0), d_width(width), d_height(height), d_currentOffset(0), d_format(PF_RGBA)
\n+
37{
\n+
38}
\n
39
\n-
\n-
45class SILLY_EXPORT PNGImageContext : public ImageContext
\n-
46{
\n-
47public:
\n-\n-\n-
50
\n-
51 int read(png_bytep data, png_size_t length);
\n-
52
\n-
53
\n-
54
\n-
55private:
\n-
56 void setImageSize();
\n-
57
\n-
58 size_t d_offset;
\n-
59
\n-
60 DataSource* d_data;
\n-
61
\n-
62 png_structp d_png_ptr;
\n-
63
\n-
64 png_infop d_info_ptr;
\n-
65
\n-
66 size_t d_bit_depth;
\n-
67 size_t d_num_channels;
\n-
68
\n-
69
\n-
70 friend class PNGImageLoader;
\n-
71};
\n-
\n-
72
\n-
73
\n-
74} // End of section namespace SILLY
\n-
75
\n-
76// Inclue inline function when needed
\n-
77#ifdef SILLY_OPT_INLINE
\n-
78#include "SILLYPNGImageContext.icpp"
\n-
79#endif
\n-
80
\n-
81#endif // end of guard _SILLYPNGImageContext_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
Image Context for PNG Image Loader.
\n-
Loader for PNG Image.
\n-
This is an abstract class used to provide data to the loader.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
40
\n+
41inline ImageContext::~ImageContext()
\n+
42{
\n+
43}
\n+
44
\n+
45
\n+
46inline void ImageContext::setDestination(byte* pixels, size_t length, PixelFormat format)
\n+
47{
\n+
48 d_pixels = pixels;
\n+
49 d_length = length;
\n+
50 d_currentOffset = 0;
\n+
51 d_format = format;
\n+
52}
\n+
53
\n+
54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte alpha)
\n+
55{
\n+
56 //assert(d_currentOffset < d_length && "ASSERT: try to set a pixel outside of the image");
\n+
57 switch(d_format)
\n+
58 {
\n+
59 case PF_A1B5G5R5:
\n+
60 // The hard part
\n+
61 assert(0 && "ASSERT: Not yet implemented");
\n+
62 break;
\n+
63 case PF_RGB:
\n+
64 // Ignore alpha channel
\n+
65 d_pixels[d_currentOffset++] = red;
\n+
66 d_pixels[d_currentOffset++] = green;
\n+
67 d_pixels[d_currentOffset++] = bleu;
\n+
68 break;
\n+
69
\n+
70 case PF_RGBA:
\n+
71 d_pixels[d_currentOffset++] = red;
\n+
72 d_pixels[d_currentOffset++] = green;
\n+
73 d_pixels[d_currentOffset++] = bleu;
\n+
74 d_pixels[d_currentOffset++] = alpha;
\n+
75 break;
\n+
76
\n+
77 }
\n+
78}
\n+
79inline size_t ImageContext::getWidth() const
\n+
80{
\n+
81 return d_width;
\n+
82}
\n+
83
\n+
84inline void ImageContext::setWidth(size_t width)
\n+
85{
\n+
86 d_width = width;
\n+
87}
\n+
88
\n+
89inline size_t ImageContext::getHeight() const
\n+
90{
\n+
91 return d_height;
\n+
92}
\n+
93
\n+
94inline void ImageContext::setHeight(size_t height)
\n+
95{
\n+
96 d_height = height;
\n+
97}
\n+
98inline PixelFormat ImageContext::getPixelFormat() const
\n+
99{
\n+
100 return d_format;
\n+
101}
\n+
102
\n+
103} // End of section namespace SILLY
\n+
104
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYPNGImageContext.h\n+SILLYImageContext.icpp\n 1/***********************************************************************\n-2 filename: SILLYPNGImageContext.h\n-3 created: 11 Jun 2006\n+2 filename: SILLYImageContext.icpp\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Declaration of the PNGImageContext class\n+6 purpose: Inline definition for ImageContext\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,71 +29,88 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYPNGImageContext_h_\n-31#define _SILLYPNGImageContext_h_\n-32#include \"SILLYBase.h\"\n-33#include \"SILLYImageContext.h\"\n-34#include \"SILLYDataSource.h\"\n-35#include \n-36// Start of section namespace SILLY\n-37namespace _\bS_\bI_\bL_\bL_\bY\n-38{\n+30\n+31// Start of section namespace SILLY\n+32namespace SILLY\n+33{\n+34\n+35inline ImageContext::ImageContext(size_t width, size_t height)\n+36 : d_pixels(0), d_length(0), d_width(width), d_height(height),\n+d_currentOffset(0), d_format(PF_RGBA)\n+37{\n+38}\n 39\n-_\b4_\b5class SILLY_EXPORT _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt : public _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-46{\n-47public:\n-48 _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* data);\n-49 _\b~_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n-50\n-51 int read(png_bytep data, png_size_t length);\n-52\n+40\n+41inline ImageContext::~ImageContext()\n+42{\n+43}\n+44\n+45\n+46inline void ImageContext::setDestination(byte* pixels, size_t length,\n+PixelFormat format)\n+47{\n+48 d_pixels = pixels;\n+49 d_length = length;\n+50 d_currentOffset = 0;\n+51 d_format = format;\n+52}\n 53\n-54\n-55private:\n-56 void setImageSize();\n-57\n-58 size_t d_offset;\n-59\n-60 _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be* d_data;\n-61\n-62 png_structp d_png_ptr;\n-63\n-64 png_infop d_info_ptr;\n-65\n-66 size_t d_bit_depth;\n-67 size_t d_num_channels;\n-68\n+54inline void ImageContext::setNextPixel(byte red, byte green, byte bleu, byte\n+alpha)\n+55{\n+56 //assert(d_currentOffset < d_length && \"ASSERT: try to set a pixel outside\n+of the image\");\n+57 switch(d_format)\n+58 {\n+59 case PF_A1B5G5R5:\n+60 // The hard part\n+61 assert(0 && \"ASSERT: Not yet implemented\");\n+62 break;\n+63 case PF_RGB:\n+64 // Ignore alpha channel\n+65 d_pixels[d_currentOffset++] = red;\n+66 d_pixels[d_currentOffset++] = green;\n+67 d_pixels[d_currentOffset++] = bleu;\n+68 break;\n 69\n-70 friend class _\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br;\n-71};\n-72\n-73\n-74} // End of section namespace SILLY\n-75\n-76// Inclue inline function when needed\n-77#ifdef SILLY_OPT_INLINE\n-78#include \"SILLYPNGImageContext.icpp\"\n-79#endif\n-80\n-81#endif // end of guard _SILLYPNGImageContext_h_\n-_\bS_\bI_\bL_\bL_\bY\n-Simple Image Loading LibrarY namespace.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Image Context for PNG Image Loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-Loader for PNG Image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bP_\bN_\bG_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b3\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Store the data needed by an ImageLoader object during the parsing of an image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n+70 case PF_RGBA:\n+71 d_pixels[d_currentOffset++] = red;\n+72 d_pixels[d_currentOffset++] = green;\n+73 d_pixels[d_currentOffset++] = bleu;\n+74 d_pixels[d_currentOffset++] = alpha;\n+75 break;\n+76\n+77 }\n+78}\n+79inline size_t ImageContext::getWidth() const\n+80{\n+81 return d_width;\n+82}\n+83\n+84inline void ImageContext::setWidth(size_t width)\n+85{\n+86 d_width = width;\n+87}\n+88\n+89inline size_t ImageContext::getHeight() const\n+90{\n+91 return d_height;\n+92}\n+93\n+94inline void ImageContext::setHeight(size_t height)\n+95{\n+96 d_height = height;\n+97}\n+98inline PixelFormat ImageContext::getPixelFormat() const\n+99{\n+100 return d_format;\n+101}\n+102\n+103} // End of section namespace SILLY\n+104\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00116_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00116_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/loaders/SILLYTGAImageContext.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageLoaderManager.icpp Source File\n \n \n \n \n \n \n
\n@@ -40,88 +40,83 @@\n \n \n
\n
\n-
SILLYTGAImageContext.h
\n+
SILLYImageLoaderManager.icpp
\n
\n
\n-
1/***********************************************************************
\n-
2 filename: SILLYTGAImageContext.h
\n-
3 created: 11 Jun 2006
\n-
4 author: Olivier Delannoy
\n-
5
\n-
6 purpose: Declaration of the TGAImageContext class
\n-
7*************************************************************************/
\n-
8/***************************************************************************
\n-
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
10 *
\n-
11 * Permission is hereby granted, free of charge, to any person obtaining
\n-
12 * a copy of this software and associated documentation files (the
\n-
13 * "Software"), to deal in the Software without restriction, including
\n-
14 * without limitation the rights to use, copy, modify, merge, publish,
\n-
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
16 * permit persons to whom the Software is furnished to do so, subject to
\n-
17 * the following conditions:
\n-
18 *
\n-
19 * The above copyright notice and this permission notice shall be
\n-
20 * included in all copies or substantial portions of the Software.
\n-
21 *
\n-
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
28 * OTHER DEALINGS IN THE SOFTWARE.
\n-
29 ***************************************************************************/
\n-
30#ifndef _SILLYTGAImageContext_h_
\n-
31#define _SILLYTGAImageContext_h_
\n-
32#include "SILLYBase.h"
\n-
33#include "SILLYImageContext.h"
\n-
34// Start of section namespace SILLY
\n-
35namespace SILLY
\n-
36{
\n-
\n-\n-
43{
\n-
44public:
\n-
45 TGAImageContext(size_t width, size_t height);
\n-\n-
47
\n-
48private:
\n-
49 byte d_idLength;
\n-
50 byte d_imageType;
\n-
51 byte d_depth;
\n-
52 byte d_description;
\n-
53
\n-
54 friend class TGAImageLoader;
\n-
55
\n-
56};
\n-
\n-
57
\n-
58
\n-
59} // End of section namespace SILLY
\n+
1/***********************************************************************
\n+
2 filename: SILLYImageLoaderManager.icpp
\n+
3 created: 10 Jun 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Inline definition for ImageLoaderManager class
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30
\n+
31// Start of section namespace SILLY
\n+
32namespace SILLY
\n+
33{
\n+
34inline ImageLoaderList::iterator ImageLoaderManager::begin()
\n+
35{
\n+
36 return d_loaders.begin();
\n+
37}
\n+
38
\n+
39inline ImageLoaderList::iterator ImageLoaderManager::end()
\n+
40{
\n+
41 return d_loaders.end();
\n+
42}
\n+
43
\n+
44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr()
\n+
45{
\n+
46 return d_instance;
\n+
47}
\n+
48
\n+
49inline ImageLoaderManager& ImageLoaderManager::getSingleton()
\n+
50{
\n+
51 assert(d_instance && "ASSERT: Singleton object not yet created");
\n+
52 return *d_instance;
\n+
53}
\n+
54
\n+
55inline void ImageLoaderManager::add(ImageLoader* loader)
\n+
56{
\n+
57 assert(loader && "ASSERT: adding a none existing loader object");
\n+
58 d_loaders.push_back(loader);
\n+
59}
\n
60
\n-
61// Inclue inline function when needed
\n-
62#ifdef SILLY_OPT_INLINE
\n-
63#include "SILLYTGAImageContext.icpp"
\n-
64#endif
\n-
65
\n-
66#endif // end of guard _SILLYTGAImageContext_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
Image Context for Targa image.
\n-
Loader for Targa image.
\n-
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
61} // End of section namespace SILLY
\n+
62
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,20 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n- * _\bl_\bo_\ba_\bd_\be_\br_\bs\n-SILLYTGAImageContext.h\n+SILLYImageLoaderManager.icpp\n 1/***********************************************************************\n-2 filename: SILLYTGAImageContext.h\n-3 created: 11 Jun 2006\n+2 filename: SILLYImageLoaderManager.icpp\n+3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Declaration of the TGAImageContext class\n+6 purpose: Inline definition for ImageLoaderManager class\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -30,53 +29,42 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYTGAImageContext_h_\n-31#define _SILLYTGAImageContext_h_\n-32#include \"SILLYBase.h\"\n-33#include \"SILLYImageContext.h\"\n-34// Start of section namespace SILLY\n-35namespace _\bS_\bI_\bL_\bL_\bY\n-36{\n-_\b4_\b2class _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt : public _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-43{\n-44public:\n-45 _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(size_t width, size_t height);\n-46 _\b~_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n-47\n-48private:\n-49 byte d_idLength;\n-50 byte d_imageType;\n-51 byte d_depth;\n-52 byte d_description;\n-53\n-54 friend class _\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br;\n-55\n-56};\n-57\n-58\n-59} // End of section namespace SILLY\n+30\n+31// Start of section namespace SILLY\n+32namespace SILLY\n+33{\n+34inline ImageLoaderList::iterator ImageLoaderManager::begin()\n+35{\n+36 return d_loaders.begin();\n+37}\n+38\n+39inline ImageLoaderList::iterator ImageLoaderManager::end()\n+40{\n+41 return d_loaders.end();\n+42}\n+43\n+44inline ImageLoaderManager* ImageLoaderManager::getSingletonPtr()\n+45{\n+46 return d_instance;\n+47}\n+48\n+49inline ImageLoaderManager& ImageLoaderManager::getSingleton()\n+50{\n+51 assert(d_instance && \"ASSERT: Singleton object not yet created\");\n+52 return *d_instance;\n+53}\n+54\n+55inline void ImageLoaderManager::add(ImageLoader* loader)\n+56{\n+57 assert(loader && \"ASSERT: adding a none existing loader object\");\n+58 d_loaders.push_back(loader);\n+59}\n 60\n-61// Inclue inline function when needed\n-62#ifdef SILLY_OPT_INLINE\n-63#include \"SILLYTGAImageContext.icpp\"\n-64#endif\n-65\n-66#endif // end of guard _SILLYTGAImageContext_h_\n-_\bS_\bI_\bL_\bL_\bY\n-Simple Image Loading LibrarY namespace.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Image Context for Targa image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b3\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br\n-Loader for Targa image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bT_\bG_\bA_\bI_\bm_\ba_\bg_\be_\bL_\bo_\ba_\bd_\be_\br_\b._\bh_\b:_\b4_\b4\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n-Store the data needed by an ImageLoader object during the parsing of an image.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n+61} // End of section namespace SILLY\n+62\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00119_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00119_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLY.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYBase.h Source File\n \n \n \n \n \n \n
\n@@ -44,23 +44,23 @@\n \n \n
\n
\n-
SILLY.h
\n+
SILLYBase.h
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLY.h
\n-
3 created: 10 Jun 2006
\n+
2 filename: SILLYBase.h
\n+
3 created: 2006/06/10
\n
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: Master include for the SILLY library
\n+
6 purpose: Common header for the SILLY library
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -76,35 +76,71 @@\n
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n-
30#ifndef _SILLY_h_
\n-
31#define _SILLY_h_
\n-
109namespace SILLY
\n-
110{
\n-
111
\n-
112}
\n-
113
\n-
114
\n-
115
\n-
116
\n-
117#include "SILLYBase.h"
\n-
118#include "SILLYDataSource.h"
\n-
119#include "SILLYFileDataSource.h"
\n-
120#include "SILLYMemoryDataSource.h"
\n-
121#include "SILLYImageLoader.h"
\n-
122#include "SILLYImageContext.h"
\n-
123#include "SILLYImageLoaderManager.h"
\n-
124#include "SILLYImage.h"
\n-
125
\n-
126#endif // end of guard _SILLY_h_
\n-
Simple Image Loading LibrarY namespace.
\n+
30#ifndef _SILLYBase_h_
\n+
31#define _SILLYBase_h_
\n+
32#include <cassert>
\n+
33#include <cstddef>
\n+
34
\n+
35#if defined(USE_SILLYOPTIONS_H)
\n+
36#include "SILLYOptions.h"
\n+
37#endif
\n+
38
\n+
39#if defined(_WIN32) || defined(__WIN32__)
\n+
40# undef SILLY_OPT_INLINE // No inlining
\n+
41# undef SILLY_BE // Little Endian
\n+
42# ifdef SILLY_EXPORTS
\n+
43# define SILLY_EXPORT __declspec(dllexport)
\n+
44# else
\n+
45# define SILLY_EXPORT __declspec(dllimport)
\n+
46# endif
\n+
47#else
\n+
48# define SILLY_EXPORT
\n+
49#endif
\n+
50
\n+
51// Start of section namespace SILLY
\n+
52namespace SILLY
\n+
53{
\n+
54
\n+
\n+\n+
60{
\n+
61 PF_A1B5G5R5, //<! 16 bits, pixel format is A1R5G5B5 (GGGBBBBB,ARRRRRGG on disk)
\n+
62 PF_RGB, //<! 24 bits, pixel format is 8 bits for R, G, B
\n+
63 PF_RGBA, //<! 32 bits, pixel format is 8 bits for R, G, B and A channel
\n+
64 PF_ORIGIN, //<! This format is used when the input storage use a specific pixel format
\n+
65};
\n+
\n+
\n+\n+
71{
\n+
72 PO_TOP_LEFT, //<! The resulting image origine is Top Left
\n+
73 PO_BOTTOM_LEFT, //<! The resulting image origine is Bottom Left
\n+
74};
\n+
\n+
75
\n+
80typedef unsigned char byte;
\n+
88bool SILLY_EXPORT SILLYInit();
\n+
89
\n+
94void SILLY_EXPORT SILLYCleanup();
\n+
95
\n+
96} // End of section namespace SILLY
\n+
97
\n+
98#endif // end of guard _SILLYBase_h_
\n+
99
\n+
Simple Image Loading LibrarY namespace.
\n+
unsigned char byte
Typename for a byte.
Definition SILLYBase.h:80
\n+
void SILLYCleanup()
Cleanup SILLY library internal.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
bool SILLYInit()
Initialize the SILLY Library.
\n+
PixelOrigin
List all pixel origin supported.
Definition SILLYBase.h:71
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,19 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLY.h\n+SILLYBase.h\n 1/***********************************************************************\n-2 filename: SILLY.h\n-3 created: 10 Jun 2006\n+2 filename: SILLYBase.h\n+3 created: 2006/06/10\n 4 author: Olivier Delannoy\n 5\n-6 purpose: Master include for the SILLY library\n+6 purpose: Common header for the SILLY library\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,32 +29,81 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLY_h_\n-31#define _SILLY_h_\n-109namespace _\bS_\bI_\bL_\bL_\bY\n-110{\n-111\n-112}\n-113\n-114\n-115\n-116\n-117#include \"SILLYBase.h\"\n-118#include \"SILLYDataSource.h\"\n-119#include \"SILLYFileDataSource.h\"\n-120#include \"SILLYMemoryDataSource.h\"\n-121#include \"SILLYImageLoader.h\"\n-122#include \"SILLYImageContext.h\"\n-123#include \"SILLYImageLoaderManager.h\"\n-124#include \"SILLYImage.h\"\n-125\n-126#endif // end of guard _SILLY_h_\n+30#ifndef _SILLYBase_h_\n+31#define _SILLYBase_h_\n+32#include \n+33#include \n+34\n+35#if defined(USE_SILLYOPTIONS_H)\n+36#include \"SILLYOptions.h\"\n+37#endif\n+38\n+39#if defined(_WIN32) || defined(__WIN32__)\n+40# undef SILLY_OPT_INLINE // No inlining\n+41# undef SILLY_BE // Little Endian\n+42# ifdef SILLY_EXPORTS\n+43# define SILLY_EXPORT __declspec(dllexport)\n+44# else\n+45# define SILLY_EXPORT __declspec(dllimport)\n+46# endif\n+47#else\n+48# define SILLY_EXPORT\n+49#endif\n+50\n+51// Start of section namespace SILLY\n+52namespace _\bS_\bI_\bL_\bL_\bY\n+53{\n+54\n+_\b5_\b9enum _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+60{\n+61 PF_A1B5G5R5, //\n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYDataSource.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYImageContext.h Source File\n \n \n \n \n \n \n
\n@@ -44,23 +44,23 @@\n \n \n
\n
\n-
SILLYDataSource.h
\n+
SILLYImageContext.h
\n
\n
\n
1/***********************************************************************
\n-
2 filename: SILLYDataSource.h
\n+
2 filename: SILLYImageContext.h
\n
3 created: 10 Jun 2006
\n-
4 author: Olivier Delannoy
\n+
4 author: Olivier Delannoy
\n
5
\n-
6 purpose: SILLY::DataSource declaration for the SILLY library
\n+
6 purpose: ImageContext is an abstract class used to hide the loader specific data needed during the parsing of an image
\n
7*************************************************************************/
\n
8/***************************************************************************
\n
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n
10 *
\n
11 * Permission is hereby granted, free of charge, to any person obtaining
\n
12 * a copy of this software and associated documentation files (the
\n
13 * "Software"), to deal in the Software without restriction, including
\n@@ -76,47 +76,74 @@\n
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n
28 * OTHER DEALINGS IN THE SOFTWARE.
\n
29 ***************************************************************************/
\n-
30#ifndef _SILLYDataSource_h_
\n-
31#define _SILLYDataSource_h_
\n+
30#ifndef _SILLYImageContext_h_
\n+
31#define _SILLYImageContext_h_
\n
32#include "SILLYBase.h"
\n
33
\n
34// Start of section namespace SILLY
\n
35namespace SILLY
\n
36{
\n
37
\n-
\n-
46class SILLY_EXPORT DataSource
\n-
47{
\n-
48public:
\n-
53 virtual ~DataSource();
\n-
58 virtual const byte * getDataPtr() const = 0;
\n-
64 byte operator[] (size_t offset) const;
\n-
69 virtual size_t getSize() const = 0;
\n-
70};
\n+
\n+
43class SILLY_EXPORT ImageContext
\n+
44{
\n+
45public:
\n+
50 virtual ~ImageContext();
\n+
51
\n+
56 void setDestination(byte* pixels, size_t length, PixelFormat format);
\n+
57
\n+
62 void setNextPixel(byte red, byte green, byte bleu, byte alpha);
\n+
63
\n+
64 size_t getWidth() const;
\n+
65 size_t getHeight() const;
\n+
66 PixelFormat getPixelFormat() const;
\n+
67
\n+
74 bool flipVertically();
\n+
75 protected:
\n+
76 void setWidth(size_t width);
\n+
77
\n+
78 void setHeight(size_t height);
\n+
79
\n+
88 ImageContext(size_t width, size_t height);
\n+
89
\n+
90private:
\n+
91 byte* d_pixels;
\n+
92 size_t d_length;
\n+
93 size_t d_width;
\n+
94 size_t d_height;
\n+
95 size_t d_currentOffset;
\n+
96 PixelFormat d_format;
\n+
97
\n+
98 // Disabled operation
\n+\n+
100 ImageContext& operator=(ImageContext&);
\n+
101};
\n
\n-
71
\n-
72
\n-
73} // End of section namespace SILLY
\n-
74
\n-
75// Inclue inline function when needed
\n-
76#ifdef SILLY_OPT_INLINE
\n-
77#include "SILLYDataSource.icpp"
\n-
78#endif
\n-
79
\n-
80#endif // end of guard _SILLYDataSource_h_
\n-
Simple Image Loading LibrarY namespace.
\n-
This is an abstract class used to provide data to the loader.
\n-
virtual size_t getSize() const =0
Return the size of the data.
\n-
virtual const byte * getDataPtr() const =0
Get raw access to the image data.
\n-
virtual ~DataSource()
Destructor.
\n+
102
\n+
103
\n+
104} // End of section namespace SILLY
\n+
105
\n+
106// Inclue inline function when needed
\n+
107#ifdef SILLY_OPT_INLINE
\n+
108#include "SILLYImageContext.icpp"
\n+
109#endif
\n+
110
\n+
111#endif // end of guard _SILLYImageContext_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
PixelFormat
List all pixel format supported.
Definition SILLYBase.h:60
\n+
Store the data needed by an ImageLoader object during the parsing of an image.
\n+
void setNextPixel(byte red, byte green, byte bleu, byte alpha)
Set the next pixel of the image.
\n+
void setDestination(byte *pixels, size_t length, PixelFormat format)
Set the destination of the loading.
\n+
ImageContext(size_t width, size_t height)
Constructor.
\n+
virtual ~ImageContext()
Destructor.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,20 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYDataSource.h\n+SILLYImageContext.h\n 1/***********************************************************************\n-2 filename: SILLYDataSource.h\n+2 filename: SILLYImageContext.h\n 3 created: 10 Jun 2006\n 4 author: Olivier Delannoy\n 5\n-6 purpose: SILLY::DataSource declaration for the SILLY library\n+6 purpose: ImageContext is an abstract class used to hide the loader specific\n+data needed during the parsing of an image\n 7*************************************************************************/\n 8/***************************************************************************\n 9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n 10 *\n 11 * Permission is hereby granted, free of charge, to any person obtaining\n 12 * a copy of this software and associated documentation files (the\n 13 * \"Software\"), to deal in the Software without restriction, including\n@@ -29,50 +30,82 @@\n 23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n 25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n 26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n 28 * OTHER DEALINGS IN THE SOFTWARE.\n 29 ***************************************************************************/\n-30#ifndef _SILLYDataSource_h_\n-31#define _SILLYDataSource_h_\n+30#ifndef _SILLYImageContext_h_\n+31#define _SILLYImageContext_h_\n 32#include \"SILLYBase.h\"\n 33\n 34// Start of section namespace SILLY\n 35namespace _\bS_\bI_\bL_\bL_\bY\n 36{\n 37\n-_\b4_\b6class SILLY_EXPORT _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-47{\n-48public:\n-_\b5_\b3 virtual _\b~_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be();\n-_\b5_\b8 virtual const byte * _\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() const = 0;\n-_\b6_\b4 byte operator[] (size_t offset) const;\n-_\b6_\b9 virtual size_t _\bg_\be_\bt_\bS_\bi_\bz_\be() const = 0;\n-70};\n-71\n-72\n-73} // End of section namespace SILLY\n-74\n-75// Inclue inline function when needed\n-76#ifdef SILLY_OPT_INLINE\n-77#include \"SILLYDataSource.icpp\"\n-78#endif\n+_\b4_\b3class SILLY_EXPORT _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+44{\n+45public:\n+_\b5_\b0 virtual _\b~_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt();\n+51\n+_\b5_\b6 void _\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn(byte* pixels, size_t length, _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt format);\n+57\n+_\b6_\b2 void _\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl(byte red, byte green, byte bleu, byte alpha);\n+63\n+64 size_t getWidth() const;\n+65 size_t getHeight() const;\n+66 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt getPixelFormat() const;\n+67\n+74 bool flipVertically();\n+75 protected:\n+76 void setWidth(size_t width);\n+77\n+78 void setHeight(size_t height);\n 79\n-80#endif // end of guard _SILLYDataSource_h_\n+_\b8_\b8 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(size_t width, size_t height);\n+89\n+90private:\n+91 byte* d_pixels;\n+92 size_t d_length;\n+93 size_t d_width;\n+94 size_t d_height;\n+95 size_t d_currentOffset;\n+96 _\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt d_format;\n+97\n+98 // Disabled operation\n+99 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt&);\n+100 _\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt& operator=(_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt&);\n+101};\n+102\n+103\n+104} // End of section namespace SILLY\n+105\n+106// Inclue inline function when needed\n+107#ifdef SILLY_OPT_INLINE\n+108#include \"SILLYImageContext.icpp\"\n+109#endif\n+110\n+111#endif // end of guard _SILLYImageContext_h_\n _\bS_\bI_\bL_\bL_\bY\n Simple Image Loading LibrarY namespace.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-This is an abstract class used to provide data to the loader.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n-virtual size_t getSize() const =0\n-Return the size of the data.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n-virtual const byte * getDataPtr() const =0\n-Get raw access to the image data.\n-_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\b~_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n-virtual ~DataSource()\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bP_\bi_\bx_\be_\bl_\bF_\bo_\br_\bm_\ba_\bt\n+PixelFormat\n+List all pixel format supported.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bB_\ba_\bs_\be_\b._\bh_\b:_\b6_\b0\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+Store the data needed by an ImageLoader object during the parsing of an image.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bh_\b:_\b4_\b4\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bN_\be_\bx_\bt_\bP_\bi_\bx_\be_\bl\n+void setNextPixel(byte red, byte green, byte bleu, byte alpha)\n+Set the next pixel of the image.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bs_\be_\bt_\bD_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn\n+void setDestination(byte *pixels, size_t length, PixelFormat format)\n+Set the destination of the loading.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+ImageContext(size_t width, size_t height)\n+Constructor.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b:_\b:_\b~_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt\n+virtual ~ImageContext()\n Destructor.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00125_source.html", "source2": "./usr/share/doc/libsilly-doc/html/a00125_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYOptions.h Source File\n+Simple Image Loading LibrarY: /build/reproducible-path/silly-0.1.0/include/SILLYFileDataSource.h Source File\n \n \n \n \n \n \n
\n@@ -44,56 +44,86 @@\n \n \n
\n
\n-
SILLYOptions.h
\n+
SILLYFileDataSource.h
\n
\n
\n-
1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */
\n-
2/***********************************************************************
\n-
3 filename: SILLYOptions.h.in
\n-
4 created: 2006/06/10
\n-
5 author: Olivier Delannoy
\n-
6
\n-
7 purpose: Store options of the SILLY library
\n-
8*************************************************************************/
\n-
9/***************************************************************************
\n-
10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n-
11 *
\n-
12 * Permission is hereby granted, free of charge, to any person obtaining
\n-
13 * a copy of this software and associated documentation files (the
\n-
14 * "Software"), to deal in the Software without restriction, including
\n-
15 * without limitation the rights to use, copy, modify, merge, publish,
\n-
16 * distribute, sublicense, and/or sell copies of the Software, and to
\n-
17 * permit persons to whom the Software is furnished to do so, subject to
\n-
18 * the following conditions:
\n-
19 *
\n-
20 * The above copyright notice and this permission notice shall be
\n-
21 * included in all copies or substantial portions of the Software.
\n-
22 *
\n-
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n-
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n-
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n-
26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n-
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n-
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n-
29 * OTHER DEALINGS IN THE SOFTWARE.
\n-
30 ***************************************************************************/
\n-
31/* Defined to 1 if inline is enabled */
\n-
32#define SILLY_OPT_INLINE 1
\n-
33
\n-
34/* Defined to 1 if debug is enabled */
\n-
35/* #undef SILLY_OPT_DEBUG */
\n-
36
\n-
37/* Defined to 1 if profile is enabled */
\n-
38/* #undef SILLY_OPT_PROFILE */
\n-
39
\n+
1/***********************************************************************
\n+
2 filename: SILLYFileDataSource.h
\n+
3 created: 20 Jul 2006
\n+
4 author: Olivier Delannoy
\n+
5
\n+
6 purpose: Provide file based image loading
\n+
7*************************************************************************/
\n+
8/***************************************************************************
\n+
9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
\n+
10 *
\n+
11 * Permission is hereby granted, free of charge, to any person obtaining
\n+
12 * a copy of this software and associated documentation files (the
\n+
13 * "Software"), to deal in the Software without restriction, including
\n+
14 * without limitation the rights to use, copy, modify, merge, publish,
\n+
15 * distribute, sublicense, and/or sell copies of the Software, and to
\n+
16 * permit persons to whom the Software is furnished to do so, subject to
\n+
17 * the following conditions:
\n+
18 *
\n+
19 * The above copyright notice and this permission notice shall be
\n+
20 * included in all copies or substantial portions of the Software.
\n+
21 *
\n+
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\n+
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\n+
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
\n+
25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
\n+
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\n+
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\n+
28 * OTHER DEALINGS IN THE SOFTWARE.
\n+
29 ***************************************************************************/
\n+
30#ifndef _SILLYFileDataSource_h_
\n+
31#define _SILLYFileDataSource_h_
\n+
32#include "SILLYBase.h"
\n+
33#include "SILLYDataSource.h"
\n+
34// Start of section namespace SILLY
\n+
35namespace SILLY
\n+
36{
\n+
37
\n+
\n+
48class SILLY_EXPORT FileDataSource : public DataSource
\n+
49{
\n+
50public:
\n+
60 FileDataSource(const char* filename);
\n+\n+
73 bool isValid() const;
\n+
74
\n+
75 const byte* getDataPtr() const;
\n+
76 size_t getSize() const;
\n+
77private:
\n+
78 bool d_error;
\n+
79 byte* d_bytes;
\n+
80 size_t d_size;
\n+
81};
\n+
\n+
82
\n+
83
\n+
84} // End of section namespace SILLY
\n+
85
\n+
86// Inclue inline function when needed
\n+
87#ifdef SILLY_OPT_INLINE
\n+
88#include "SILLYFileDataSource.icpp"
\n+
89#endif
\n+
90
\n+
91#endif // end of guard _SILLYFileDataSource_h_
\n+
Simple Image Loading LibrarY namespace.
\n+
This is an abstract class used to provide data to the loader.
\n+
This class allow the loading of an image directly from a file.
\n+
const byte * getDataPtr() const
Get raw access to the image data.
\n+
bool isValid() const
Check wether the loading is successfull or not.
\n+
size_t getSize() const
Return the size of the data.
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,47 +1,87 @@\n Simple Image Loading LibrarY\u00a00.1.0\n * _\bb_\bu_\bi_\bl_\bd\n * _\br_\be_\bp_\br_\bo_\bd_\bu_\bc_\bi_\bb_\bl_\be_\b-_\bp_\ba_\bt_\bh\n * _\bs_\bi_\bl_\bl_\by_\b-_\b0_\b._\b1_\b._\b0\n * _\bi_\bn_\bc_\bl_\bu_\bd_\be\n-SILLYOptions.h\n-1/* include/SILLYOptions.h. Generated from SILLYOptions.h.in by configure. */\n-2/***********************************************************************\n-3 filename: SILLYOptions.h.in\n-4 created: 2006/06/10\n-5 author: Olivier Delannoy\n-6\n-7 purpose: Store options of the SILLY library\n-8*************************************************************************/\n-9/***************************************************************************\n-10 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n-11 *\n-12 * Permission is hereby granted, free of charge, to any person obtaining\n-13 * a copy of this software and associated documentation files (the\n-14 * \"Software\"), to deal in the Software without restriction, including\n-15 * without limitation the rights to use, copy, modify, merge, publish,\n-16 * distribute, sublicense, and/or sell copies of the Software, and to\n-17 * permit persons to whom the Software is furnished to do so, subject to\n-18 * the following conditions:\n-19 *\n-20 * The above copyright notice and this permission notice shall be\n-21 * included in all copies or substantial portions of the Software.\n-22 *\n-23 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n-24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n-25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n-26 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n-27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n-28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n-29 * OTHER DEALINGS IN THE SOFTWARE.\n-30 ***************************************************************************/\n-31/* Defined to 1 if inline is enabled */\n-32#define SILLY_OPT_INLINE 1\n-33\n-34/* Defined to 1 if debug is enabled */\n-35/* #undef SILLY_OPT_DEBUG */\n-36\n-37/* Defined to 1 if profile is enabled */\n-38/* #undef SILLY_OPT_PROFILE */\n-39\n+SILLYFileDataSource.h\n+1/***********************************************************************\n+2 filename: SILLYFileDataSource.h\n+3 created: 20 Jul 2006\n+4 author: Olivier Delannoy\n+5\n+6 purpose: Provide file based image loading\n+7*************************************************************************/\n+8/***************************************************************************\n+9 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team\n+10 *\n+11 * Permission is hereby granted, free of charge, to any person obtaining\n+12 * a copy of this software and associated documentation files (the\n+13 * \"Software\"), to deal in the Software without restriction, including\n+14 * without limitation the rights to use, copy, modify, merge, publish,\n+15 * distribute, sublicense, and/or sell copies of the Software, and to\n+16 * permit persons to whom the Software is furnished to do so, subject to\n+17 * the following conditions:\n+18 *\n+19 * The above copyright notice and this permission notice shall be\n+20 * included in all copies or substantial portions of the Software.\n+21 *\n+22 * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n+25 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n+26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n+27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n+28 * OTHER DEALINGS IN THE SOFTWARE.\n+29 ***************************************************************************/\n+30#ifndef _SILLYFileDataSource_h_\n+31#define _SILLYFileDataSource_h_\n+32#include \"SILLYBase.h\"\n+33#include \"SILLYDataSource.h\"\n+34// Start of section namespace SILLY\n+35namespace _\bS_\bI_\bL_\bL_\bY\n+36{\n+37\n+_\b4_\b8class SILLY_EXPORT _\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be : public _\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+49{\n+50public:\n+60 _\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be(const char* filename);\n+64 _\b~_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be();\n+_\b7_\b3 bool _\bi_\bs_\bV_\ba_\bl_\bi_\bd() const;\n+74\n+_\b7_\b5 const byte* _\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br() const;\n+_\b7_\b6 size_t _\bg_\be_\bt_\bS_\bi_\bz_\be() const;\n+77private:\n+78 bool d_error;\n+79 byte* d_bytes;\n+80 size_t d_size;\n+81};\n+82\n+83\n+84} // End of section namespace SILLY\n+85\n+86// Inclue inline function when needed\n+87#ifdef SILLY_OPT_INLINE\n+88#include \"SILLYFileDataSource.icpp\"\n+89#endif\n+90\n+91#endif // end of guard _SILLYFileDataSource_h_\n+_\bS_\bI_\bL_\bL_\bY\n+Simple Image Loading LibrarY namespace.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bJ_\bP_\bG_\bI_\bm_\ba_\bg_\be_\bC_\bo_\bn_\bt_\be_\bx_\bt_\b._\bc_\bp_\bp_\b:_\b4_\b6\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This is an abstract class used to provide data to the loader.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b7\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be\n+This class allow the loading of an image directly from a file.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn _\bS_\bI_\bL_\bL_\bY_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b._\bh_\b:_\b4_\b9\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bD_\ba_\bt_\ba_\bP_\bt_\br\n+const byte * getDataPtr() const\n+Get raw access to the image data.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bi_\bs_\bV_\ba_\bl_\bi_\bd\n+bool isValid() const\n+Check wether the loading is successfull or not.\n+_\bS_\bI_\bL_\bL_\bY_\b:_\b:_\bF_\bi_\bl_\be_\bD_\ba_\bt_\ba_\bS_\bo_\bu_\br_\bc_\be_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n+size_t getSize() const\n+Return the size of the data.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libsilly-doc/html/a00129.html", "source2": "./usr/share/doc/libsilly-doc/html/a00129.html", "unified_diff": "@@ -164,15 +164,15 @@\n typedef unsigned char byte\n \n \n
\n \n

Typename for a byte.

\n \n-

Definition at line 80 of file SILLYBase.h.

\n+

Definition at line 80 of file SILLYBase.h.

\n \n
\n
\n \n

◆ ImageLoaderList

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

Typename for a collection of image loader.

\n \n-

Definition at line 42 of file SILLYImageLoaderManager.h.

\n+

Definition at line 42 of file SILLYImageLoaderManager.h.

\n \n
\n
\n

Enumeration Type Documentation

\n \n

◆ PixelFormat

\n \n@@ -201,15 +201,15 @@\n enum PixelFormat\n \n \n
\n \n

List all pixel format supported.

\n \n-

Definition at line 59 of file SILLYBase.h.

\n+

Definition at line 59 of file SILLYBase.h.

\n \n
\n
\n \n

◆ PixelOrigin

\n \n
\n@@ -219,15 +219,15 @@\n enum PixelOrigin\n \n \n
\n \n

List all pixel origin supported.

\n \n-

Definition at line 70 of file SILLYBase.h.

\n+

Definition at line 70 of file SILLYBase.h.

\n \n
\n
\n

Function Documentation

\n \n

◆ JPG_emit_message()

\n \n@@ -250,15 +250,15 @@\n \n )\n \n \n \n
\n \n-

Definition at line 84 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 84 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n \n

◆ JPG_error_exit()

\n \n
\n@@ -270,15 +270,15 @@\n j_common_ptr \n cinfo)\n \n \n \n
\n \n-

Definition at line 76 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 76 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n \n

◆ JPG_fill_input_buffer()

\n \n
\n@@ -290,15 +290,15 @@\n j_decompress_ptr \n cinfo)\n \n \n \n
\n \n-

Definition at line 54 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 54 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n \n

◆ JPG_init_source()

\n \n
\n@@ -310,15 +310,15 @@\n j_decompress_ptr \n cinfo)\n \n \n \n
\n \n-

Definition at line 49 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 49 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n \n

◆ JPG_skip_input_data()

\n \n
\n@@ -340,15 +340,15 @@\n \n )\n \n \n \n
\n \n-

Definition at line 62 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 62 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n \n

◆ JPG_term_source()

\n \n
\n@@ -360,15 +360,15 @@\n j_decompress_ptr \n cinfo)\n \n \n \n
\n \n-

Definition at line 71 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 71 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n \n

◆ PNG_error_function()

\n \n
\n@@ -390,15 +390,15 @@\n \n )\n \n \n \n
\n \n-

Definition at line 64 of file SILLYPNGImageLoader.cpp.

\n+

Definition at line 64 of file SILLYPNGImageLoader.cpp.

\n \n
\n
\n \n

◆ PNG_read_function()

\n \n
\n@@ -426,15 +426,15 @@\n \n )\n \n \n \n
\n \n-

Definition at line 48 of file SILLYPNGImageLoader.cpp.

\n+

Definition at line 48 of file SILLYPNGImageLoader.cpp.

\n \n
\n
\n \n

◆ PNG_warning_function()

\n \n
\n@@ -456,15 +456,15 @@\n \n )\n \n \n \n
\n \n-

Definition at line 58 of file SILLYPNGImageLoader.cpp.

\n+

Definition at line 58 of file SILLYPNGImageLoader.cpp.

\n \n
\n
\n \n

◆ SILLYCleanup()

\n \n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00945.html", "source2": "./usr/share/doc/libsilly-doc/html/a00945.html", "unified_diff": "@@ -51,15 +51,15 @@\n
JPGImageContext Class Reference
\n
\n
\n \n

Image Context for JPG image loader. \n More...

\n \n-

#include <SILLYJPGImageContext.h>

\n+

#include <SILLYJPGImageContext.h>

\n
\n Inheritance diagram for JPGImageContext:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -135,15 +135,15 @@\n  \n \n

Detailed Description

\n

Image Context for JPG image loader.

\n

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

\n

Multiple loading is not handle yet.

\n \n-

Definition at line 56 of file SILLYJPGImageContext.h.

\n+

Definition at line 56 of file SILLYJPGImageContext.h.

\n

Constructor & Destructor Documentation

\n \n

◆ JPGImageContext()

\n \n
\n
\n \n@@ -152,15 +152,15 @@\n \n \n \n \n
()
\n
\n \n-

Definition at line 90 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 90 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n \n

◆ ~JPGImageContext()

\n \n
\n@@ -171,15 +171,15 @@\n (\n )\n \n \n \n
\n \n-

Definition at line 109 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 109 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ flipVertically()

\n \n@@ -221,15 +221,15 @@\n (\n )\n \n \n \n
\n \n-

Definition at line 115 of file SILLYJPGImageContext.cpp.

\n+

Definition at line 115 of file SILLYJPGImageContext.cpp.

\n \n
\n
\n

Member Data Documentation

\n \n

◆ cinfo

\n \n@@ -238,15 +238,15 @@\n \n \n \n \n
jpeg_decompress_struct cinfo
\n
\n \n-

Definition at line 66 of file SILLYJPGImageContext.h.

\n+

Definition at line 66 of file SILLYJPGImageContext.h.

\n \n
\n
\n \n

◆ d_error_mgr

\n \n
\n@@ -254,15 +254,15 @@\n \n \n \n \n
jpeg_error_mgr d_error_mgr
\n
\n \n-

Definition at line 68 of file SILLYJPGImageContext.h.

\n+

Definition at line 68 of file SILLYJPGImageContext.h.

\n \n
\n
\n \n

◆ d_source

\n \n
\n@@ -270,15 +270,15 @@\n \n \n \n \n
DataSource* d_source
\n
\n \n-

Definition at line 70 of file SILLYJPGImageContext.h.

\n+

Definition at line 70 of file SILLYJPGImageContext.h.

\n \n
\n
\n \n

◆ setjmp_buffer

\n \n
\n@@ -286,15 +286,15 @@\n \n \n \n \n
jmp_buf setjmp_buffer
\n
\n \n-

Definition at line 69 of file SILLYJPGImageContext.h.

\n+

Definition at line 69 of file SILLYJPGImageContext.h.

\n \n
\n
\n \n

◆ src_mgr

\n \n
\n@@ -302,21 +302,21 @@\n \n \n \n \n
jpeg_source_mgr src_mgr
\n
\n \n-

Definition at line 65 of file SILLYJPGImageContext.h.

\n+

Definition at line 65 of file SILLYJPGImageContext.h.

\n \n
\n
\n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00949.html", "source2": "./usr/share/doc/libsilly-doc/html/a00949.html", "unified_diff": "@@ -49,15 +49,15 @@\n
JPGImageLoader Class Reference
\n \n
\n \n

Loader class for JPG Image. \n More...

\n \n-

#include <SILLYJPGImageLoader.h>

\n+

#include <SILLYJPGImageLoader.h>

\n
\n Inheritance diagram for JPGImageLoader:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -90,15 +90,15 @@\n bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context)\n  Parse the pixels data of the image and fill the header struct.
\n  \n \n

Detailed Description

\n

Loader class for JPG Image.

\n \n-

Definition at line 42 of file SILLYJPGImageLoader.h.

\n+

Definition at line 42 of file SILLYJPGImageLoader.h.

\n

Constructor & Destructor Documentation

\n \n

◆ JPGImageLoader()

\n \n
\n
\n \n@@ -107,15 +107,15 @@\n \n \n \n \n
()
\n
\n \n-

Definition at line 46 of file SILLYJPGImageLoader.cpp.

\n+

Definition at line 46 of file SILLYJPGImageLoader.cpp.

\n \n
\n
\n \n

◆ ~JPGImageLoader()

\n \n
\n@@ -126,15 +126,15 @@\n (\n )\n \n \n \n
\n \n-

Definition at line 51 of file SILLYJPGImageLoader.cpp.

\n+

Definition at line 51 of file SILLYJPGImageLoader.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ destroyContext()

\n \n@@ -163,15 +163,15 @@\n
Parameters
\n \n \n
contexta pointer to the context
\n
\n
\n \n-

Definition at line 47 of file SILLYImageLoader.cpp.

\n+

Definition at line 47 of file SILLYImageLoader.cpp.

\n \n
\n \n \n

◆ loadHeader()

\n \n
\n@@ -213,15 +213,15 @@\n \n \n \n
Returns
Context for the rest of the parsing or 0 if an error occured
\n \n

Implements ImageLoader.

\n \n-

Definition at line 56 of file SILLYJPGImageLoader.cpp.

\n+

Definition at line 56 of file SILLYJPGImageLoader.cpp.

\n \n
\n \n \n

◆ loadImageData()

\n \n
\n@@ -270,21 +270,21 @@\n \n \n \n
Returns
true on success false on error
\n \n

Implements ImageLoader.

\n \n-

Definition at line 90 of file SILLYJPGImageLoader.cpp.

\n+

Definition at line 90 of file SILLYJPGImageLoader.cpp.

\n \n
\n \n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00953.html", "source2": "./usr/share/doc/libsilly-doc/html/a00953.html", "unified_diff": "@@ -51,15 +51,15 @@\n
PNGImageContext Class Reference
\n \n
\n \n

Image Context for PNG Image Loader. \n More...

\n \n-

#include <SILLYPNGImageContext.h>

\n+

#include <SILLYPNGImageContext.h>

\n
\n Inheritance diagram for PNGImageContext:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -117,15 +117,15 @@\n Friends\n class PNGImageLoader\n  \n \n

Detailed Description

\n

Image Context for PNG Image Loader.

\n \n-

Definition at line 45 of file SILLYPNGImageContext.h.

\n+

Definition at line 45 of file SILLYPNGImageContext.h.

\n

Constructor & Destructor Documentation

\n \n

◆ PNGImageContext()

\n \n
\n
\n \n@@ -135,15 +135,15 @@\n \n \n \n \n
DataSourcedata)
\n
\n \n-

Definition at line 59 of file SILLYPNGImageContext.cpp.

\n+

Definition at line 59 of file SILLYPNGImageContext.cpp.

\n \n
\n
\n \n

◆ ~PNGImageContext()

\n \n
\n@@ -154,15 +154,15 @@\n (\n )\n \n \n \n
\n \n-

Definition at line 65 of file SILLYPNGImageContext.cpp.

\n+

Definition at line 65 of file SILLYPNGImageContext.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ flipVertically()

\n \n@@ -215,15 +215,15 @@\n \n )\n \n \n \n
\n \n-

Definition at line 46 of file SILLYPNGImageContext.cpp.

\n+

Definition at line 46 of file SILLYPNGImageContext.cpp.

\n \n
\n \n

Friends And Related Symbol Documentation

\n \n

◆ PNGImageLoader

\n \n@@ -240,21 +240,21 @@\n \n \n friend \n \n \n
\n \n-

Definition at line 70 of file SILLYPNGImageContext.h.

\n+

Definition at line 70 of file SILLYPNGImageContext.h.

\n \n
\n \n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00957.html", "source2": "./usr/share/doc/libsilly-doc/html/a00957.html", "unified_diff": "@@ -49,15 +49,15 @@\n
PNGImageLoader Class Reference
\n \n
\n \n

Loader for PNG Image. \n More...

\n \n-

#include <SILLYPNGImageLoader.h>

\n+

#include <SILLYPNGImageLoader.h>

\n
\n Inheritance diagram for PNGImageLoader:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -90,15 +90,15 @@\n bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context)\n  Parse the pixels data of the image and fill the header struct.
\n  \n \n

Detailed Description

\n

Loader for PNG Image.

\n \n-

Definition at line 42 of file SILLYPNGImageLoader.h.

\n+

Definition at line 42 of file SILLYPNGImageLoader.h.

\n

Constructor & Destructor Documentation

\n \n

◆ PNGImageLoader()

\n \n
\n
\n \n@@ -107,15 +107,15 @@\n \n \n \n \n
()
\n
\n \n-

Definition at line 79 of file SILLYPNGImageLoader.cpp.

\n+

Definition at line 79 of file SILLYPNGImageLoader.cpp.

\n \n
\n
\n \n

◆ ~PNGImageLoader()

\n \n
\n@@ -126,15 +126,15 @@\n (\n )\n \n \n \n
\n \n-

Definition at line 83 of file SILLYPNGImageLoader.cpp.

\n+

Definition at line 83 of file SILLYPNGImageLoader.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ destroyContext()

\n \n@@ -163,15 +163,15 @@\n
Parameters
\n \n \n
contexta pointer to the context
\n
\n
\n \n-

Definition at line 47 of file SILLYImageLoader.cpp.

\n+

Definition at line 47 of file SILLYImageLoader.cpp.

\n \n
\n \n \n

◆ loadHeader()

\n \n
\n@@ -213,15 +213,15 @@\n \n \n \n
Returns
Context for the rest of the parsing or 0 if an error occured
\n \n

Implements ImageLoader.

\n \n-

Definition at line 88 of file SILLYPNGImageLoader.cpp.

\n+

Definition at line 88 of file SILLYPNGImageLoader.cpp.

\n \n
\n \n \n

◆ loadImageData()

\n \n
\n@@ -270,21 +270,21 @@\n \n \n \n
Returns
true on success false on error
\n \n

Implements ImageLoader.

\n \n-

Definition at line 154 of file SILLYPNGImageLoader.cpp.

\n+

Definition at line 154 of file SILLYPNGImageLoader.cpp.

\n \n
\n \n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00961.html", "source2": "./usr/share/doc/libsilly-doc/html/a00961.html", "unified_diff": "@@ -51,15 +51,15 @@\n
TGAImageContext Class Reference
\n \n
\n \n

Image Context for Targa image. \n More...

\n \n-

#include <SILLYTGAImageContext.h>

\n+

#include <SILLYTGAImageContext.h>

\n
\n Inheritance diagram for TGAImageContext:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -116,15 +116,15 @@\n Friends\n class TGAImageLoader\n  \n \n

Detailed Description

\n

Image Context for Targa image.

\n \n-

Definition at line 42 of file SILLYTGAImageContext.h.

\n+

Definition at line 42 of file SILLYTGAImageContext.h.

\n

Member Function Documentation

\n \n

◆ flipVertically()

\n \n
\n
\n \n@@ -169,20 +169,20 @@\n \n \n \n
\n friend
\n
\n \n-

Definition at line 54 of file SILLYTGAImageContext.h.

\n+

Definition at line 54 of file SILLYTGAImageContext.h.

\n \n
\n
\n
The documentation for this class was generated from the following file:\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00965.html", "source2": "./usr/share/doc/libsilly-doc/html/a00965.html", "unified_diff": "@@ -49,15 +49,15 @@\n
TGAImageLoader Class Reference
\n
\n
\n \n

Loader for Targa image. \n More...

\n \n-

#include <SILLYTGAImageLoader.h>

\n+

#include <SILLYTGAImageLoader.h>

\n
\n Inheritance diagram for TGAImageLoader:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -90,15 +90,15 @@\n bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context)\n  Parse the pixels data of the image and fill the header struct.
\n  \n \n

Detailed Description

\n

Loader for Targa image.

\n \n-

Definition at line 43 of file SILLYTGAImageLoader.h.

\n+

Definition at line 43 of file SILLYTGAImageLoader.h.

\n

Constructor & Destructor Documentation

\n \n

◆ TGAImageLoader()

\n \n
\n
\n \n@@ -107,15 +107,15 @@\n \n \n \n \n
()
\n
\n \n-

Definition at line 51 of file SILLYTGAImageLoader.cpp.

\n+

Definition at line 51 of file SILLYTGAImageLoader.cpp.

\n \n
\n
\n \n

◆ ~TGAImageLoader()

\n \n
\n@@ -126,15 +126,15 @@\n (\n )\n \n \n \n
\n \n-

Definition at line 56 of file SILLYTGAImageLoader.cpp.

\n+

Definition at line 56 of file SILLYTGAImageLoader.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ destroyContext()

\n \n@@ -163,15 +163,15 @@\n
Parameters
\n \n \n
contexta pointer to the context
\n
\n
\n \n-

Definition at line 47 of file SILLYImageLoader.cpp.

\n+

Definition at line 47 of file SILLYImageLoader.cpp.

\n \n
\n \n \n

◆ loadHeader()

\n \n
\n@@ -213,15 +213,15 @@\n \n \n \n
Returns
Context for the rest of the parsing or 0 if an error occured
\n \n

Implements ImageLoader.

\n \n-

Definition at line 74 of file SILLYTGAImageLoader.cpp.

\n+

Definition at line 74 of file SILLYTGAImageLoader.cpp.

\n \n
\n \n \n

◆ loadImageData()

\n \n
\n@@ -270,21 +270,21 @@\n \n \n \n
Returns
true on success false on error
\n \n

Implements ImageLoader.

\n \n-

Definition at line 134 of file SILLYTGAImageLoader.cpp.

\n+

Definition at line 134 of file SILLYTGAImageLoader.cpp.

\n \n
\n \n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00969.html", "source2": "./usr/share/doc/libsilly-doc/html/a00969.html", "unified_diff": "@@ -49,15 +49,15 @@\n
DataSource Class Referenceabstract
\n \n
\n \n

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

\n \n-

#include <SILLYDataSource.h>

\n+

#include <SILLYDataSource.h>

\n
\n Inheritance diagram for DataSource:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -84,15 +84,15 @@\n  Destructor.
\n  \n \n

Detailed Description

\n

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

\n

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

\n \n-

Definition at line 46 of file SILLYDataSource.h.

\n+

Definition at line 46 of file SILLYDataSource.h.

\n

Member Function Documentation

\n \n

◆ getDataPtr()

\n \n
\n
\n \n@@ -145,15 +145,15 @@\n

Return the size of the data.

\n \n

Implemented in FileDataSource, and MemoryDataSource.

\n \n \n \n
The documentation for this class was generated from the following file:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00973.html", "source2": "./usr/share/doc/libsilly-doc/html/a00973.html", "unified_diff": "@@ -49,15 +49,15 @@\n
FileDataSource Class Reference
\n \n
\n \n

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

\n \n-

#include <SILLYFileDataSource.h>

\n+

#include <SILLYFileDataSource.h>

\n
\n Inheritance diagram for FileDataSource:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -97,15 +97,15 @@\n
\n \n
 destructor
 
\n

Detailed Description

\n

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

\n

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.

\n \n-

Definition at line 48 of file SILLYFileDataSource.h.

\n+

Definition at line 48 of file SILLYFileDataSource.h.

\n

Constructor & Destructor Documentation

\n \n

◆ FileDataSource()

\n \n
\n
\n \n@@ -124,15 +124,15 @@\n
Parameters
\n
\n \n
filenamethe name of the file containing the data
\n \n \n \n-

Definition at line 46 of file SILLYFileDataSource.cpp.

\n+

Definition at line 46 of file SILLYFileDataSource.cpp.

\n \n
\n
\n \n

◆ ~FileDataSource()

\n \n
\n@@ -145,15 +145,15 @@\n \n \n \n
\n \n

destructor

\n \n-

Definition at line 86 of file SILLYFileDataSource.cpp.

\n+

Definition at line 86 of file SILLYFileDataSource.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ getDataPtr()

\n \n@@ -230,16 +230,16 @@\n

Check wether the loading is successfull or not.

\n

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

\n
Returns
true if the loading is successfull.
\n \n
\n
\n
The documentation for this class was generated from the following files:\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00977.html", "source2": "./usr/share/doc/libsilly-doc/html/a00977.html", "unified_diff": "@@ -49,15 +49,15 @@\n
Image Class Reference
\n \n
\n \n

Image is the main user class of the library. \n More...

\n \n-

#include <SILLYImage.h>

\n+

#include <SILLYImage.h>

\n \n \n \n \n \n@@ -102,15 +102,15 @@\n  \n \n \n

\n Public Member Functions

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

Detailed Description

\n

Image is the main user class of the library.

\n \n-

Definition at line 46 of file SILLYImage.h.

\n+

Definition at line 46 of file SILLYImage.h.

\n

Constructor & Destructor Documentation

\n \n

◆ Image()

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

Definition at line 48 of file SILLYImage.cpp.

\n+

Definition at line 48 of file SILLYImage.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ loadImageData()

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

Definition at line 68 of file SILLYImage.cpp.

\n+

Definition at line 68 of file SILLYImage.cpp.

\n \n
\n \n \n

◆ loadImageHeader()

\n \n
\n@@ -192,21 +192,21 @@\n \n \n
\n \n

Retrieve the information concerning the image object.

\n
Returns
true on success
\n \n-

Definition at line 54 of file SILLYImage.cpp.

\n+

Definition at line 54 of file SILLYImage.cpp.

\n \n
\n \n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00981.html", "source2": "./usr/share/doc/libsilly-doc/html/a00981.html", "unified_diff": "@@ -50,15 +50,15 @@\n
ImageContext Class Reference
\n \n
\n \n

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

\n \n-

#include <SILLYImageContext.h>

\n+

#include <SILLYImageContext.h>

\n
\n Inheritance diagram for ImageContext:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -108,15 +108,15 @@\n \n void setWidth (size_t width)\n  \n \n

Detailed Description

\n

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

\n \n-

Definition at line 43 of file SILLYImageContext.h.

\n+

Definition at line 43 of file SILLYImageContext.h.

\n

Constructor & Destructor Documentation

\n \n

◆ ImageContext()

\n \n
\n
\n \n@@ -179,15 +179,15 @@\n
Returns
true on success false otherwise
\n \n

Definition at line 45 of file SILLYImageContext.cpp.

\n \n \n \n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00985.html", "source2": "./usr/share/doc/libsilly-doc/html/a00985.html", "unified_diff": "@@ -50,15 +50,15 @@\n
ImageLoader Class Referenceabstract
\n \n
\n \n

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

\n \n-

#include <SILLYImageLoader.h>

\n+

#include <SILLYImageLoader.h>

\n
\n Inheritance diagram for ImageLoader:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -97,15 +97,15 @@\n
\n \n
 Constructor.
 
\n

Detailed Description

\n

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

\n

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

\n \n-

Definition at line 46 of file SILLYImageLoader.h.

\n+

Definition at line 46 of file SILLYImageLoader.h.

\n

Member Function Documentation

\n \n

◆ destroyContext()

\n \n
\n
\n \n@@ -123,15 +123,15 @@\n
Parameters
\n
\n \n
contexta pointer to the context
\n \n \n \n-

Definition at line 47 of file SILLYImageLoader.cpp.

\n+

Definition at line 47 of file SILLYImageLoader.cpp.

\n \n
\n
\n \n

◆ loadHeader()

\n \n
\n@@ -231,16 +231,16 @@\n
Returns
true on success false on error
\n \n

Implemented in JPGImageLoader, PNGImageLoader, and TGAImageLoader.

\n \n
\n
\n
The documentation for this class was generated from the following files:\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00989.html", "source2": "./usr/share/doc/libsilly-doc/html/a00989.html", "unified_diff": "@@ -50,15 +50,15 @@\n
ImageLoaderManager Class Reference
\n
\n
\n \n

Manage the list of all supported ImageLoader. \n More...

\n \n-

#include <SILLYImageLoaderManager.h>

\n+

#include <SILLYImageLoaderManager.h>

\n \n \n \n \n \n \n \n

\n Public Member Functions

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

Detailed Description

\n

Manage the list of all supported ImageLoader.

\n \n-

Definition at line 56 of file SILLYImageLoaderManager.h.

\n+

Definition at line 56 of file SILLYImageLoaderManager.h.

\n

Constructor & Destructor Documentation

\n \n

◆ ImageLoaderManager()

\n \n
\n
\n \n@@ -156,15 +156,15 @@\n
\n \n \n \n
\n
\n
The documentation for this class was generated from the following files:\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/a00993.html", "source2": "./usr/share/doc/libsilly-doc/html/a00993.html", "unified_diff": "@@ -49,15 +49,15 @@\n
MemoryDataSource Class Reference
\n
\n
\n \n

Load an image from a memory area. \n More...

\n \n-

#include <SILLYMemoryDataSource.h>

\n+

#include <SILLYMemoryDataSource.h>

\n
\n Inheritance diagram for MemoryDataSource:
\n
\n
\"Inheritance
\n \n \"\"\n \"\"\n@@ -91,15 +91,15 @@\n  Retieve the byte at offset.
\n  \n \n

Detailed Description

\n

Load an image from a memory area.

\n

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.

\n \n-

Definition at line 48 of file SILLYMemoryDataSource.h.

\n+

Definition at line 48 of file SILLYMemoryDataSource.h.

\n

Constructor & Destructor Documentation

\n \n

◆ MemoryDataSource()

\n \n
\n
\n \n@@ -129,15 +129,15 @@\n
\n \n \n
dataa byte array of size size
sizethe size of data
\n \n \n \n-

Definition at line 46 of file SILLYMemoryDataSource.cpp.

\n+

Definition at line 46 of file SILLYMemoryDataSource.cpp.

\n \n
\n
\n

Member Function Documentation

\n \n

◆ getDataPtr()

\n \n@@ -193,16 +193,16 @@\n

Return the size of the data.

\n \n

Implements DataSource.

\n \n
\n
\n
The documentation for this class was generated from the following files:\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}, {"source1": "./usr/share/doc/libsilly-doc/html/dir_0d87e2e7ddaae8a2a8572c0afc59fe0d.html", "source2": "./usr/share/doc/libsilly-doc/html/dir_0d87e2e7ddaae8a2a8572c0afc59fe0d.html", "unified_diff": "@@ -60,47 +60,47 @@\n

\n Directories

\n  loaders\n  \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n

\n Files

 SILLY.h
 SILLY.h
 
 SILLYBase.h
 SILLYBase.h
 
 SILLYDataSource.h
 SILLYDataSource.h
 
 SILLYDataSource.icpp
 SILLYDataSource.icpp
 
 SILLYFileDataSource.h
 SILLYFileDataSource.h
 
 SILLYFileDataSource.icpp
 SILLYFileDataSource.icpp
 
 SILLYImage.h
 SILLYImage.h
 
 SILLYImage.icpp
 SILLYImage.icpp
 
 SILLYImageContext.h
 SILLYImageContext.h
 
 SILLYImageContext.icpp
 SILLYImageContext.icpp
 
 SILLYImageLoader.h
 SILLYImageLoader.h
 
 SILLYImageLoader.icpp
 SILLYImageLoader.icpp
 
 SILLYImageLoaderManager.h
 SILLYImageLoaderManager.h
 
 SILLYImageLoaderManager.icpp
 SILLYImageLoaderManager.icpp
 
 SILLYMemoryDataSource.h
 SILLYMemoryDataSource.h
 
 SILLYMemoryDataSource.icpp
 SILLYMemoryDataSource.icpp
 
 SILLYOptions.h
 SILLYOptions.h
 
\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/dir_7b011f4828cd5682692dd5e7c066fc3b.html", "source2": "./usr/share/doc/libsilly-doc/html/dir_7b011f4828cd5682692dd5e7c066fc3b.html", "unified_diff": "@@ -54,25 +54,25 @@\n \"\"\n \"\"\n \n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n

\n Files

 SILLYJPGImageContext.cpp
 SILLYJPGImageContext.cpp
 
 SILLYJPGImageLoader.cpp
 SILLYJPGImageLoader.cpp
 
 SILLYPNGImageContext.cpp
 SILLYPNGImageContext.cpp
 
 SILLYPNGImageLoader.cpp
 SILLYPNGImageLoader.cpp
 
 SILLYTGAImageContext.cpp
 SILLYTGAImageContext.cpp
 
 SILLYTGAImageLoader.cpp
 SILLYTGAImageLoader.cpp
 
\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/dir_7b53bc9a32849689d682eb098e891de5.html", "source2": "./usr/share/doc/libsilly-doc/html/dir_7b53bc9a32849689d682eb098e891de5.html", "unified_diff": "@@ -62,25 +62,25 @@\n  loaders\n  \n \n \n \n \n-\n+\n \n-\n+\n \n \n \n-\n+\n \n \n \n-\n+\n \n

\n Files

 SILLYDataSource.cpp
 
 SILLYFileDataSource.cpp
 SILLYFileDataSource.cpp
 
 SILLYImage.cpp
 SILLYImage.cpp
 
 SILLYImageContext.cpp
 
 SILLYImageLoader.cpp
 SILLYImageLoader.cpp
 
 SILLYImageLoaderManager.cpp
 
 SILLYMemoryDataSource.cpp
 SILLYMemoryDataSource.cpp
 
\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/dir_7cea72c962538e8359f822070f2512f7.html", "source2": "./usr/share/doc/libsilly-doc/html/dir_7cea72c962538e8359f822070f2512f7.html", "unified_diff": "@@ -54,37 +54,37 @@\n \"\"\n \"\"\n \n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n

\n Files

 SILLYJPGImageContext.h
 SILLYJPGImageContext.h
 
 SILLYJPGImageContext.icpp
 SILLYJPGImageContext.icpp
 
 SILLYJPGImageLoader.h
 SILLYJPGImageLoader.h
 
 SILLYJPGImageLoader.icpp
 SILLYJPGImageLoader.icpp
 
 SILLYPNGImageContext.h
 SILLYPNGImageContext.h
 
 SILLYPNGImageContext.icpp
 SILLYPNGImageContext.icpp
 
 SILLYPNGImageLoader.h
 SILLYPNGImageLoader.h
 
 SILLYPNGImageLoader.icpp
 SILLYPNGImageLoader.icpp
 
 SILLYTGAImageContext.h
 SILLYTGAImageContext.h
 
 SILLYTGAImageContext.icpp
 SILLYTGAImageContext.icpp
 
 SILLYTGAImageLoader.h
 SILLYTGAImageLoader.h
 
 SILLYTGAImageLoader.icpp
 SILLYTGAImageLoader.icpp
 
\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/files.html", "source2": "./usr/share/doc/libsilly-doc/html/files.html", "unified_diff": "@@ -45,58 +45,58 @@\n
Here is a list of all documented files with brief descriptions:
\n
[detail level 123456]
\n \n \n \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n \n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n
  build
  reproducible-path
  silly-0.1.0
  include
  loaders
 SILLYJPGImageContext.h
 SILLYJPGImageContext.icpp
 SILLYJPGImageLoader.h
 SILLYJPGImageLoader.icpp
 SILLYPNGImageContext.h
 SILLYPNGImageContext.icpp
 SILLYPNGImageLoader.h
 SILLYPNGImageLoader.icpp
 SILLYTGAImageContext.h
 SILLYTGAImageContext.icpp
 SILLYTGAImageLoader.h
 SILLYTGAImageLoader.icpp
 SILLY.h
 SILLYBase.h
 SILLYDataSource.h
 SILLYDataSource.icpp
 SILLYFileDataSource.h
 SILLYFileDataSource.icpp
 SILLYImage.h
 SILLYImage.icpp
 SILLYImageContext.h
 SILLYImageContext.icpp
 SILLYImageLoader.h
 SILLYImageLoader.icpp
 SILLYImageLoaderManager.h
 SILLYImageLoaderManager.icpp
 SILLYMemoryDataSource.h
 SILLYMemoryDataSource.icpp
 SILLYOptions.h
 SILLYJPGImageContext.h
 SILLYJPGImageContext.icpp
 SILLYJPGImageLoader.h
 SILLYJPGImageLoader.icpp
 SILLYPNGImageContext.h
 SILLYPNGImageContext.icpp
 SILLYPNGImageLoader.h
 SILLYPNGImageLoader.icpp
 SILLYTGAImageContext.h
 SILLYTGAImageContext.icpp
 SILLYTGAImageLoader.h
 SILLYTGAImageLoader.icpp
 SILLY.h
 SILLYBase.h
 SILLYDataSource.h
 SILLYDataSource.icpp
 SILLYFileDataSource.h
 SILLYFileDataSource.icpp
 SILLYImage.h
 SILLYImage.icpp
 SILLYImageContext.h
 SILLYImageContext.icpp
 SILLYImageLoader.h
 SILLYImageLoader.icpp
 SILLYImageLoaderManager.h
 SILLYImageLoaderManager.icpp
 SILLYMemoryDataSource.h
 SILLYMemoryDataSource.icpp
 SILLYOptions.h
  src
  loaders
 SILLYJPGImageContext.cpp
 SILLYJPGImageLoader.cpp
 SILLYPNGImageContext.cpp
 SILLYPNGImageLoader.cpp
 SILLYTGAImageContext.cpp
 SILLYTGAImageLoader.cpp
 SILLYJPGImageContext.cpp
 SILLYJPGImageLoader.cpp
 SILLYPNGImageContext.cpp
 SILLYPNGImageLoader.cpp
 SILLYTGAImageContext.cpp
 SILLYTGAImageLoader.cpp
 SILLYDataSource.cpp
 SILLYFileDataSource.cpp
 SILLYImage.cpp
 SILLYFileDataSource.cpp
 SILLYImage.cpp
 SILLYImageContext.cpp
 SILLYImageLoader.cpp
 SILLYImageLoader.cpp
 SILLYImageLoaderManager.cpp
 SILLYMemoryDataSource.cpp
 SILLYMemoryDataSource.cpp
\n
\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n"}, {"source1": "./usr/share/doc/libsilly-doc/html/index.html", "source2": "./usr/share/doc/libsilly-doc/html/index.html", "unified_diff": "@@ -90,19 +90,19 @@\n
}
\n
// Return a pointer to a byte array containing the
\n
// pixels stored as RGBA
\n
img.getPixelsDataPtr();
\n
// Get the size of the pixel array
\n
img.getPixelsDataSize();
\n
SILLY::SILLYCleanup(); // Free all memory used by the library
\n-
unsigned char byte
Typename for a byte.
Definition SILLYBase.h:80
\n+
unsigned char byte
Typename for a byte.
Definition SILLYBase.h:80
\n
void SILLYCleanup()
Cleanup SILLY library internal.
\n
bool SILLYInit()
Initialize the SILLY Library.
\n-
Image is the main user class of the library.
Definition SILLYImage.h:47
\n-
Load an image from a memory area.
\n+
Image is the main user class of the library.
Definition SILLYImage.h:47
\n+
Load an image from a memory area.
\n \n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n"}]}]}]}]}