mirror of
https://github.com/huderlem/porymap.git
synced 2026-07-19 08:53:52 -05:00
Fix degraded timelapse gif quality
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
This commit is contained in:
parent
0f8eb35f76
commit
9728a851cf
|
|
@ -9,6 +9,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
|
|||
- Add API functions for reading and writing text files.
|
||||
|
||||
### Fixed
|
||||
- Fix degraded image quality in exported timelapse gifs.
|
||||
- Fix custom top-level data in the `encounters` object of `wild_encounters.json` being discarded if no `fields` data is present.
|
||||
|
||||
## [6.3.0] - 2025-12-26
|
||||
|
|
|
|||
|
|
@ -114,6 +114,8 @@ private:
|
|||
void on_pushButton_Reset_pressed();
|
||||
void on_spinBox_TimelapseDelay_editingFinished();
|
||||
void on_spinBox_FrameSkip_editingFinished();
|
||||
|
||||
QImage::Format imageFormat() const;
|
||||
};
|
||||
|
||||
#endif // MAPIMAGEEXPORTER_H
|
||||
|
|
|
|||
|
|
@ -285,11 +285,15 @@ bool MapImageExporter::currentHistoryAppliesToFrame(QUndoStack *historyStack) {
|
|||
}
|
||||
}
|
||||
|
||||
QImage::Format MapImageExporter::imageFormat() const {
|
||||
return (m_mode == ImageExporterMode::Timelapse) ? QImage::Format_RGB888 : QImage::Format_RGBA8888;
|
||||
}
|
||||
|
||||
QImage MapImageExporter::getExpandedImage(const QImage &image, const QSize &targetSize, const QColor &fillColor) {
|
||||
if (image.width() >= targetSize.width() && image.height() >= targetSize.height())
|
||||
return image;
|
||||
|
||||
QImage resizedImage(targetSize, QImage::Format_RGBA8888);
|
||||
QImage resizedImage(targetSize, imageFormat());
|
||||
QPainter painter(&resizedImage);
|
||||
resizedImage.fill(fillColor);
|
||||
|
||||
|
|
@ -448,7 +452,7 @@ QImage MapImageExporter::getStitchedImage(QProgressDialog *progress) {
|
|||
dimensions |= (QRect(map.x, map.y, map.map->pixelWidth(), map.map->pixelHeight()) + getMargins(map.map));
|
||||
}
|
||||
|
||||
QImage stitchedImage(dimensions.width(), dimensions.height(), QImage::Format_RGBA8888);
|
||||
QImage stitchedImage(dimensions.width(), dimensions.height(), imageFormat());
|
||||
stitchedImage.fill(m_settings.fillColor);
|
||||
|
||||
QPainter painter(&stitchedImage);
|
||||
|
|
@ -583,7 +587,7 @@ QImage MapImageExporter::getFormattedMapImage() {
|
|||
QMargins margins = getMargins(m_map);
|
||||
QImage image(m_layout->image.width() + margins.left() + margins.right(),
|
||||
m_layout->image.height() + margins.top() + margins.bottom(),
|
||||
QImage::Format_RGBA8888);
|
||||
imageFormat());
|
||||
image.fill(m_settings.fillColor);
|
||||
|
||||
QPainter painter(&image);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user