Original implementation of Resampling Image filters

This involves also resizing the renderbuffer of the clone source. Upsampling is cubic (faster approximation) and Downsampling is bilinear.
This commit is contained in:
Bruno Herbelin
2022-06-05 23:43:23 +02:00
parent d2e3b854aa
commit fec2fb7ce6
18 changed files with 356 additions and 7 deletions

View File

@@ -772,6 +772,26 @@ void ImGuiVisitor::visit (DelayFilter& f)
}
}
void ImGuiVisitor::visit (ResampleFilter& f)
{
std::ostringstream oss;
// Resampling Factor selection
if (ImGuiToolkit::IconButton(8, 5)) {
f.setFactor( 0 );
oss << "Resample " << ResampleFilter::factor_label[0];
Action::manager().store(oss.str());
}
ImGui::SameLine(0, IMGUI_SAME_LINE);
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
int m = (int) f.factor();
if (ImGui::Combo("Factor", &m, ResampleFilter::factor_label, IM_ARRAYSIZE(ResampleFilter::factor_label) )) {
f.setFactor( m );
oss << "Resample " << ResampleFilter::factor_label[m];
Action::manager().store(oss.str());
}
}
void ImGuiVisitor::visit (BlurFilter& f)
{
std::ostringstream oss;