Fix various typos in the codebase

Fixes mostly source documentation, comments, and some user-facing typos.
Found via `codespell -q 3 -S "*.eps,*.raw" -L ahd,siz,widthn`
This commit is contained in:
Kunda Ki
2025-12-05 10:41:17 +00:00
parent 72a809bcfd
commit 5140567853
14 changed files with 20 additions and 20 deletions

View File

@@ -290,7 +290,7 @@ in your cmake options.**
The following defines can be defined in cmake to modify the behavior of the The following defines can be defined in cmake to modify the behavior of the
plugin: plugin:
- `DDS_DISABLE_STRIDE_ALIGNMENT`: disable the stride aligment based on DDS - `DDS_DISABLE_STRIDE_ALIGNMENT`: disable the stride alignment based on DDS
pitch: it is known that some writers do not set it correctly. pitch: it is known that some writers do not set it correctly.
### The HEIF plugin ### The HEIF plugin
@@ -382,7 +382,7 @@ The following defines can be defined in cmake to modify the behavior of the
plugin: plugin:
- `JXR_DENY_FLOAT_IMAGE`: disables the use of float images and consequently - `JXR_DENY_FLOAT_IMAGE`: disables the use of float images and consequently
any HDR data will be lost. any HDR data will be lost.
- `JXR_DISABLE_DEPTH_CONVERSION`: remove the neeeds of additional memory by - `JXR_DISABLE_DEPTH_CONVERSION`: remove the needs of additional memory by
disabling the conversion between different color depths (e.g. RGBA64bpp to disabling the conversion between different color depths (e.g. RGBA64bpp to
RGBA32bpp) at the cost of reduced compatibility. RGBA32bpp) at the cost of reduced compatibility.
- `JXR_DISABLE_BGRA_HACK`: Windows displays and opens JXR files correctly out - `JXR_DISABLE_BGRA_HACK`: Windows displays and opens JXR files correctly out

View File

@@ -56,7 +56,7 @@ public:
/*! /*!
* \brief skipSequentialDeviceTest * \brief skipSequentialDeviceTest
* \return tre it the sequential test should be skipped. * \return True if the sequential test should be skipped.
*/ */
bool skipSequentialDeviceTest() const; bool skipSequentialDeviceTest() const;

View File

@@ -36,7 +36,7 @@ Q_DECLARE_LOGGING_CATEGORY(LOG_IFFPLUGIN)
#define LIST_CHUNK QByteArray("LIST") #define LIST_CHUNK QByteArray("LIST")
#define PROP_CHUNK QByteArray("PROP") #define PROP_CHUNK QByteArray("PROP")
// Main chuncks (Maya) // Main chunks (Maya)
#define CAT4_CHUNK QByteArray("CAT4") // 4 byte alignment #define CAT4_CHUNK QByteArray("CAT4") // 4 byte alignment
#define FOR4_CHUNK QByteArray("FOR4") #define FOR4_CHUNK QByteArray("FOR4")
#define LIS4_CHUNK QByteArray("LIS4") #define LIS4_CHUNK QByteArray("LIS4")
@@ -145,7 +145,7 @@ public:
/*! /*!
* \brief bytes * \brief bytes
* \return The size (in bytes) of the chunck data. * \return The size (in bytes) of the chunk data.
*/ */
quint32 bytes() const; quint32 bytes() const;
@@ -870,7 +870,7 @@ public:
/*! /*!
* \brief transformation * \brief transformation
* \return The image transformation. * \return The image transformation.
* \note The Default implentation returns the trasformation of EXIF chunk (if any). * \note The Default implementation returns the transformation of EXIF chunk (if any).
*/ */
virtual QImageIOHandler::Transformation transformation() const; virtual QImageIOHandler::Transformation transformation() const;

View File

@@ -20,7 +20,7 @@
#include <cmath> #include <cmath>
#ifndef DDS_DISABLE_STRIDE_ALIGNMENT #ifndef DDS_DISABLE_STRIDE_ALIGNMENT
// Disable the stride aligment based on DDS pitch: it is known that some writers do not set it correctly // Disable the stride alignment based on DDS pitch: it is known that some writers do not set it correctly
// #define DDS_DISABLE_STRIDE_ALIGNMENT // #define DDS_DISABLE_STRIDE_ALIGNMENT
#endif #endif

View File

@@ -179,7 +179,7 @@ bool EPSHandler::read(QImage *image)
const QString gsExec = QStandardPaths::findExecutable(QStringLiteral("gs")); const QString gsExec = QStandardPaths::findExecutable(QStringLiteral("gs"));
if (gsExec.isEmpty()) { if (gsExec.isEmpty()) {
qCWarning(EPSPLUGIN) << "Couldn't find gs exectuable (from GhostScript) in PATH."; qCWarning(EPSPLUGIN) << "Couldn't find gs executable (from GhostScript) in PATH.";
return false; return false;
} }

View File

@@ -514,7 +514,7 @@ bool HDRHandler::canRead(QIODevice *device)
return true; return true;
} }
// allow to load offical test cases: https://radsite.lbl.gov/radiance/framed.html // allow to load official test cases: https://radsite.lbl.gov/radiance/framed.html
device->startTransaction(); device->startTransaction();
auto h = HDRHandlerPrivate::readHeader(device); auto h = HDRHandlerPrivate::readHeader(device);
device->rollbackTransaction(); device->rollbackTransaction();

View File

@@ -180,7 +180,7 @@ bool QJpegXLHandler::ensureDecoder()
int num_worker_threads = QThread::idealThreadCount(); int num_worker_threads = QThread::idealThreadCount();
if (!m_runner && num_worker_threads >= 4) { if (!m_runner && num_worker_threads >= 4) {
/* use half of the threads because plug-in is usually used in environment /* use half of the threads because plug-in is usually used in environment
* where application performs another tasks in backround (pre-load other images) */ * where application performs other tasks in the background (pre-load other images) */
num_worker_threads = num_worker_threads / 2; num_worker_threads = num_worker_threads / 2;
num_worker_threads = qBound(2, num_worker_threads, 64); num_worker_threads = qBound(2, num_worker_threads, 64);
m_runner = JxlThreadParallelRunnerCreate(nullptr, num_worker_threads); m_runner = JxlThreadParallelRunnerCreate(nullptr, num_worker_threads);

View File

@@ -45,7 +45,7 @@ Q_LOGGING_CATEGORY(LOG_JXRPLUGIN, "kf.imageformats.plugins.jxr", QtWarningMsg)
// #define JXR_DENY_FLOAT_IMAGE // #define JXR_DENY_FLOAT_IMAGE
/*! /*!
* Remove the neeeds of additional memory by disabling the conversion between * Remove the needs of additional memory by disabling the conversion between
* different color depths (e.g. RGBA64bpp to RGBA32bpp). * different color depths (e.g. RGBA64bpp to RGBA32bpp).
* *
* NOTE: Leaving deptch conversion enabled (default) ensures maximum read compatibility. * NOTE: Leaving deptch conversion enabled (default) ensures maximum read compatibility.

View File

@@ -256,7 +256,7 @@ static bool checkHeader(QDataStream &ds)
/*! /*!
* \brief updatePos * \brief updatePos
* Write the current stram position in \a pos position as uint32. * Write the current stream position in \a pos position as uint32.
* \return True on success, otherwise false; * \return True on success, otherwise false;
*/ */
static bool updatePos(QDataStream &ds, quint32 pos) static bool updatePos(QDataStream &ds, quint32 pos)
@@ -510,7 +510,7 @@ static QByteArray readBytes(QDataStream &ds, quint32 count, bool asciiz)
* \param pos The position of the IFD. * \param pos The position of the IFD.
* \param knownTags List of known and supported tags. * \param knownTags List of known and supported tags.
* \param nextIfd The position of next IFD (0 if none). * \param nextIfd The position of next IFD (0 if none).
* \return True on succes, otherwise false. * \return True on success, otherwise false.
*/ */
static bool readIfd(QDataStream &ds, MicroExif::Tags &tags, quint32 pos = 0, const KnownTags &knownTags = staticTagTypes, quint32 *nextIfd = nullptr) static bool readIfd(QDataStream &ds, MicroExif::Tags &tags, quint32 pos = 0, const KnownTags &knownTags = staticTagTypes, quint32 *nextIfd = nullptr)
{ {

View File

@@ -125,7 +125,7 @@ public:
/*! /*!
* \brief transformation * \brief transformation
* \return The orientation converted in the equvalent Qt transformation. * \return The orientation converted in the equivalent Qt transformation.
* \sa orientation * \sa orientation
*/ */
QImageIOHandler::Transformation transformation() const; QImageIOHandler::Transformation transformation() const;

View File

@@ -640,7 +640,7 @@ static bool setResolution(QImage &img, const PSDImageResourceSection &irs)
s.skipRawData(4); // Display data (not used here) s.skipRawData(4); // Display data (not used here)
s >> i32; // Vertial resolution in pixels per inch. s >> i32; // Vertical resolution in pixels per inch.
if (i32 <= 0) if (i32 <= 0)
return false; return false;
auto vres = dpi2ppm(fixedPointToDouble(i32)); auto vres = dpi2ppm(fixedPointToDouble(i32));
@@ -1529,7 +1529,7 @@ bool PSDHandler::read(QImage *image)
planarToChunchy<float>(scanLine, rawStride.data(), header.width, 0, imgChannels); planarToChunchy<float>(scanLine, rawStride.data(), header.width, 0, imgChannels);
planarToChunchy<float>(scanLine, rawStride.data(), header.width, 1, imgChannels); planarToChunchy<float>(scanLine, rawStride.data(), header.width, 1, imgChannels);
planarToChunchy<float>(scanLine, rawStride.data(), header.width, 2, imgChannels); planarToChunchy<float>(scanLine, rawStride.data(), header.width, 2, imgChannels);
} else { // 32-bits float images: Grayscale (coverted to equivalent integer 16-bits) } else { // 32-bits float images: Grayscale (converted to equivalent integer 16-bits)
planarToChunchyFloatToUInt16<float>(scanLine, rawStride.data(), header.width, c, imgChannels); planarToChunchyFloatToUInt16<float>(scanLine, rawStride.data(), header.width, c, imgChannels);
} }
} }

View File

@@ -610,7 +610,7 @@ void setParams(QImageIOHandler *handler, LibRaw *rawProcessor)
* \brief use_auto_wb * \brief use_auto_wb
* Average the whole image for white balance (0 - off, 1 - on) * Average the whole image for white balance (0 - off, 1 - on)
* *
* This is usefull if no camera white balance is available. * This is useful if no camera white balance is available.
*/ */
params.use_auto_wb = T_AW(quality); params.use_auto_wb = T_AW(quality);

View File

@@ -49,7 +49,7 @@ private:
* _: reserved (should be zero) * _: reserved (should be zero)
* I: interpolation quality (0 - linear, 1 - VNG, 2 - PPG, 3 - AHD, 4 - DCB, 11 - DHT, 12 - AAHD) * I: interpolation quality (0 - linear, 1 - VNG, 2 - PPG, 3 - AHD, 4 - DCB, 11 - DHT, 12 - AAHD)
* C: output colorspace (0 - raw, 1 - sRGB, 2 - Adobe, 3 - Wide, 4 - ProPhoto, 5 - XYZ, 6 - ACES, 7 - DCI-P3, 8 - Rec2020) * C: output colorspace (0 - raw, 1 - sRGB, 2 - Adobe, 3 - Wide, 4 - ProPhoto, 5 - XYZ, 6 - ACES, 7 - DCI-P3, 8 - Rec2020)
* W: use camera white balace (0 - off, 1 - on) * W: use camera white balance (0 - off, 1 - on)
* A: use auto white balance (0 - off, 1 - on) * A: use auto white balance (0 - off, 1 - on)
* B: output bit per sample (0 - 8-bits, 1 - 16-bits) * B: output bit per sample (0 - 8-bits, 1 - 16-bits)
* H: half size image (0 - off, 1 - on) * H: half size image (0 - off, 1 - on)

View File

@@ -1379,13 +1379,13 @@ bool XCFImageFormat::composeTiles(XCFImage &xcf_image)
// SANITY CHECK: Avoid to load XCF with a layer grater than 10 times the final image // SANITY CHECK: Avoid to load XCF with a layer grater than 10 times the final image
if (qint64(layer.width) * layer.height / 10 > qint64(xcf_image.header.width) * xcf_image.header.height) { if (qint64(layer.width) * layer.height / 10 > qint64(xcf_image.header.width) * xcf_image.header.height) {
if (qint64(layer.width) * layer.height > 16384 * 16384) { // large layers only if (qint64(layer.width) * layer.height > 16384 * 16384) { // large layers only
qCWarning(XCFPLUGIN) << "Euristic sanity check: the image may be corrupted!"; qCWarning(XCFPLUGIN) << "Heuristic sanity check: the image may be corrupted!";
return false; return false;
} }
} }
#ifndef XCF_QT5_SUPPORT #ifndef XCF_QT5_SUPPORT
// Qt 6 image allocation limit calculation: we have to check the limit here because the image is splitted in // Qt 6 image allocation limit calculation: we have to check the limit here because the image is split in
// tiles of 64x64 pixels. The required memory to build the image is at least doubled because tiles are loaded // tiles of 64x64 pixels. The required memory to build the image is at least doubled because tiles are loaded
// and then the final image is created by copying the tiles inside it. // and then the final image is created by copying the tiles inside it.
// NOTE: on Windows to open a 10GiB image the plugin uses 28GiB of RAM // NOTE: on Windows to open a 10GiB image the plugin uses 28GiB of RAM