Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9245574
Add min/max/average and control over size of color picker preview window
soswow Jun 6, 2025
757bb2e
Merge branch 'main' into move-glsl-into-files
soswow Jun 6, 2025
d536287
After merge-conflict fix
soswow Jun 6, 2025
f464d18
Merge branch 'main' into add-avg-and-sizing-for-color-picker
soswow Jun 8, 2025
9fe6c27
Add raw string syntax modifier for VSCode and Cursor to be able to sy…
soswow Jun 8, 2025
32f0535
Merge branch 'add-syntax-modifer-to-shader-strings' into add-avg-and-…
soswow Jun 8, 2025
f07fd4e
Add separate settings control for avg value section and make yellow a…
soswow Jun 8, 2025
4d8550e
Add tooltip to new settings controls
soswow Jun 9, 2025
c5e1f5e
Add coordinates of measured pixel
soswow Jun 9, 2025
2a525f1
shifting current measured pixel indicator when looking at edges with …
soswow Jun 14, 2025
ff11760
Fix problem with showing min/max calues outside data window for float…
soswow Jun 14, 2025
716c76c
Keep closeup window within window bounds
soswow Jun 14, 2025
4ea3ff9
Merge remote-tracking branch 'upstream/main' into add-avg-and-sizing-…
soswow Jun 18, 2025
e70fa34
Tidying up: small refactoring, better variable names and comments
soswow Jun 19, 2025
e841931
Include explicit header to fix std::setw compilation error
soswow Jun 19, 2025
730918c
Do not use std:setw streaming approach but simple string formattting
soswow Jun 19, 2025
87866e7
Do local using of format
soswow Jul 13, 2025
4f794a2
Make channel colors more uniform in perfecption
soswow Jul 13, 2025
c4a2619
Add support for longer channel names
soswow Jul 15, 2025
9958420
Add visual separation between center value and aggregate ones
soswow Jul 16, 2025
ecc2f56
Merge branch 'main' into add-avg-and-sizing-for-color-picker
soswow Jul 16, 2025
3816999
Fix formatting
soswow Jul 16, 2025
a34ecd3
Handle half-format properly and DRY stats calc code
soswow Jul 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/iv/imageviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,40 @@ ImageViewer::createActions()
toggleAreaSampleAct->setShortcut(tr("Ctrl+A"));
connect(toggleAreaSampleAct, SIGNAL(triggered()), this,
SLOT(toggleAreaSample()));

closeupPixelsLabel = new QLabel(tr("# closeup pixels:"));
closeupPixelsBox = new QSpinBox();
closeupPixelsBox->setRange(9, 25);
closeupPixelsBox->setValue(13);
closeupPixelsBox->setSingleStep(2);

QString closeupPixelsTooltip = tr(
"Number of pixels to show in the closeup view.");
closeupPixelsBox->setToolTip(closeupPixelsTooltip);
closeupPixelsLabel->setToolTip(closeupPixelsTooltip);

closeupAvgPixelsLabel = new QLabel(tr("# closeup avg pixels:"));
closeupAvgPixelsBox = new QSpinBox();
closeupAvgPixelsBox->setRange(3, 25);
closeupAvgPixelsBox->setValue(11);
closeupAvgPixelsBox->setSingleStep(2);

QString closeupAvgPixelsTooltip = tr(
"Number of pixels to use for averaging in the closeup view.");
closeupAvgPixelsBox->setToolTip(closeupAvgPixelsTooltip);
closeupAvgPixelsLabel->setToolTip(closeupAvgPixelsTooltip);

// Connect signals to ensure closeupAvgPixelsBox value is always <= closeupPixelsBox value
connect(closeupPixelsBox, QOverload<int>::of(&QSpinBox::valueChanged),
[this](int value) {
if (closeupAvgPixelsBox->value() > value)
closeupAvgPixelsBox->setValue(value);
});
connect(closeupAvgPixelsBox, QOverload<int>::of(&QSpinBox::valueChanged),
[this](int value) {
if (value > closeupPixelsBox->value())
closeupAvgPixelsBox->setValue(closeupPixelsBox->value());
});
}


Expand Down Expand Up @@ -833,6 +867,7 @@ ImageViewer::readSettings(bool ui_is_set_up)
maxMemoryIC->setValue(settings.value("maxMemoryIC", 2048).toInt());
slideShowDuration->setValue(
settings.value("slideShowDuration", 10).toInt());
closeupPixelsBox->setValue(settings.value("closeupPixels", 13).toInt());

OIIO::attribute("imagebuf:use_imagecache", 1);

Expand All @@ -855,6 +890,7 @@ ImageViewer::writeSettings()
settings.setValue("autoMipmap", autoMipmap->isChecked());
settings.setValue("maxMemoryIC", maxMemoryIC->value());
settings.setValue("slideShowDuration", slideShowDuration->value());
settings.setValue("closeupPixels", closeupPixelsBox->value());
QStringList recent;
for (auto&& s : m_recent_files)
recent.push_front(QString(s.c_str()));
Expand Down
16 changes: 15 additions & 1 deletion src/iv/imageviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <QDialog>
#include <QMainWindow>
#include <QMimeData>
#include <QSpinBox>

#if OIIO_QT_MAJOR < 6
# include <QGLWidget>
Expand All @@ -50,7 +51,6 @@ class QMenu;
class QMenuBar;
class QProgressBar;
class QPushButton;
class QSpinBox;
class QScrollArea;
class QStatusBar;
class QVBoxLayout;
Expand Down Expand Up @@ -245,6 +245,16 @@ class ImageViewer final : public QMainWindow {
return linearInterpolationBox && linearInterpolationBox->isChecked();
}

int closeupPixels(void) const
{
return closeupPixelsBox ? closeupPixelsBox->value() : 13;
}

int closeupAvgPixels(void) const
{
return closeupAvgPixelsBox ? closeupAvgPixelsBox->value() : 11;
}

bool darkPalette(void) const
{
return darkPaletteBox ? darkPaletteBox->isChecked() : m_darkPalette;
Expand Down Expand Up @@ -416,6 +426,10 @@ private slots:
QSpinBox* maxMemoryIC;
QLabel* slideShowDurationLabel;
QSpinBox* slideShowDuration;
QLabel* closeupPixelsLabel;
QSpinBox* closeupPixelsBox;
QLabel* closeupAvgPixelsLabel;
QSpinBox* closeupAvgPixelsBox;

std::vector<IvImage*> m_images; // List of images
int m_current_image; // Index of current image, -1 if none
Expand Down
Loading
Loading