mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 23:27:38 +03:00
chore(clang-format-fix): fixing format
This commit is contained in:
parent
fbda7aa4f1
commit
8fc51668d0
@ -372,8 +372,8 @@ bool Epub::generateThumbBmp() const {
|
|||||||
// Generate 1-bit BMP for fast home screen rendering (no gray passes needed)
|
// Generate 1-bit BMP for fast home screen rendering (no gray passes needed)
|
||||||
constexpr int THUMB_TARGET_WIDTH = 240;
|
constexpr int THUMB_TARGET_WIDTH = 240;
|
||||||
constexpr int THUMB_TARGET_HEIGHT = 400;
|
constexpr int THUMB_TARGET_HEIGHT = 400;
|
||||||
const bool success =
|
const bool success = JpegToBmpConverter::jpegFileTo1BitBmpStreamWithSize(coverJpg, thumbBmp, THUMB_TARGET_WIDTH,
|
||||||
JpegToBmpConverter::jpegFileTo1BitBmpStreamWithSize(coverJpg, thumbBmp, THUMB_TARGET_WIDTH, THUMB_TARGET_HEIGHT);
|
THUMB_TARGET_HEIGHT);
|
||||||
coverJpg.close();
|
coverJpg.close();
|
||||||
thumbBmp.close();
|
thumbBmp.close();
|
||||||
SdMan.remove(coverJpgTempPath.c_str());
|
SdMan.remove(coverJpgTempPath.c_str());
|
||||||
|
|||||||
@ -762,7 +762,8 @@ bool JpegToBmpConverter::jpegFileToBmpStreamInternal(FsFile& jpegFile, Print& bm
|
|||||||
// 1-bit output with Atkinson dithering for better quality
|
// 1-bit output with Atkinson dithering for better quality
|
||||||
for (int x = 0; x < outWidth; x++) {
|
for (int x = 0; x < outWidth; x++) {
|
||||||
const uint8_t gray = mcuRowBuffer[bufferY * imageInfo.m_width + x];
|
const uint8_t gray = mcuRowBuffer[bufferY * imageInfo.m_width + x];
|
||||||
const uint8_t bit = atkinson1BitDitherer ? atkinson1BitDitherer->processPixel(gray, x) : quantize1bit(gray, x, y);
|
const uint8_t bit =
|
||||||
|
atkinson1BitDitherer ? atkinson1BitDitherer->processPixel(gray, x) : quantize1bit(gray, x, y);
|
||||||
// Pack 1-bit value: MSB first, 8 pixels per byte
|
// Pack 1-bit value: MSB first, 8 pixels per byte
|
||||||
const int byteIndex = x / 8;
|
const int byteIndex = x / 8;
|
||||||
const int bitOffset = 7 - (x % 8);
|
const int bitOffset = 7 - (x % 8);
|
||||||
@ -837,7 +838,8 @@ bool JpegToBmpConverter::jpegFileToBmpStreamInternal(FsFile& jpegFile, Print& bm
|
|||||||
// 1-bit output with Atkinson dithering for better quality
|
// 1-bit output with Atkinson dithering for better quality
|
||||||
for (int x = 0; x < outWidth; x++) {
|
for (int x = 0; x < outWidth; x++) {
|
||||||
const uint8_t gray = (rowCount[x] > 0) ? (rowAccum[x] / rowCount[x]) : 0;
|
const uint8_t gray = (rowCount[x] > 0) ? (rowAccum[x] / rowCount[x]) : 0;
|
||||||
const uint8_t bit = atkinson1BitDitherer ? atkinson1BitDitherer->processPixel(gray, x) : quantize1bit(gray, x, currentOutY);
|
const uint8_t bit = atkinson1BitDitherer ? atkinson1BitDitherer->processPixel(gray, x)
|
||||||
|
: quantize1bit(gray, x, currentOutY);
|
||||||
// Pack 1-bit value: MSB first, 8 pixels per byte
|
// Pack 1-bit value: MSB first, 8 pixels per byte
|
||||||
const int byteIndex = x / 8;
|
const int byteIndex = x / 8;
|
||||||
const int bitOffset = 7 - (x % 8);
|
const int bitOffset = 7 - (x % 8);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user