mirror of
https://github.com/NickeManarin/ScreenToGif.git
synced 2026-04-25 15:15:51 +03:00
[GH-ISSUE #387] [Feature Request] Add other image scaling algorithms like bilinear or bicubic #319
Labels
No labels
copy cats
duplicated
future feature
pull-request
⬜ Accepted
⬜ Completed
⬜ Help Wanted 💪
⬜ In Progress
⬜ Missing Details
⬜ Pending
⬜ Waiting For Answer ⏳
🆕 feature preview
🔷 Bug 🐛
🔷 Out Of Scope
🔷 Out Of Scope
🔷 Question
🔷Enhancement
🔷Enhancement
🔷Invalid / External
🔷Knowledge Base
🔷Won't Fix
🕑 High
🕑 High
🕑 High
🕕 Medium
🕙 Low
🕛 Critical
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ScreenToGif#319
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Naetmul on GitHub (Oct 15, 2018).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/387
Originally assigned to: @NickeManarin on GitHub.
Problem
The image resized to ~50% of the original size with ScreenToGif showed visibly lower quality than the image resized to ~50% of the original size with Photoshop. The former image had some visible artifacts (something like over-sharpening) due to the scaling.
This kind of problem will also apply when enlarging images.
Cause
System.Windows.Media, which is used in WPF, uses "linear" scaling as the default scaling algorithm as stated in the MS document.There are also other algorithms in
System.Windows.Media: NearestNeighbor (lower quality than linear) and Fant (higher quality than linear).The problem is that all the supported scaling algorithms of
System.Windows.Media, which are NearestNeighbor, Linear, Fant, do not give us good results.This is discussed in a StackOverflow question and VirtualDub blog.
The followings are talking about the Fant algorithm, which is the highest quality algorithm among them:
Therefore, adding the Fant algorithm only seems easy (because we only need to change the option parameter), but it seems not so good.
Suggestion
Add other image scaling algorithms like "bilinear" or "bicubic" scaling algorithms.
Notes
They are already in GDI+ (
System.Drawing), but they are not available inSystem.Windows.Media.Some notes when using GDI+'s bicubic scaling: InterpolationMode HighQualityBicubic introducing artefacts on edge of resized images
@NickeManarin commented on GitHub (Sep 1, 2020):
With the next version, Fant and NearestNeighbor were added.
For others algorithms, they need to be implemented manually.