YomikoR/VapourSynth-Editor

Resizing with Qt

Closed this issue · 1 comments

In some circumstances the previewer fails to show the output in the correct resolution, causing a mess when using the pipette.

Example script

import vapoursynth as vs
core = vs.core
clip = core.std.BlankClip(width=512, height=512, format=vs.RGB24)
def make_grid(n, f):
    fout = f.copy()
    for x in range(256):
        for y in range(256):
            fout[0][2 * x, 2 * y] = x
            fout[1][2 * x, 2 * y] = y
            fout[0][2 * x + 1, 2 * y + 1] = x
            fout[1][2 * x + 1, 2 * y + 1] = y
    return fout
clip = core.std.ModifyFrame(clip, clip, make_grid)
#clip = core.std.Invert(clip)
clip.set_output()

Example usage:

  • Zoom by nearest neighbor at 34x. The bottom-right grid has only 29 pixels shown.
  • Zoom by nearest neighbor at 8x, with 150% Windows resolution scale.

The reason is unclear, but it can be confirmed that QImage with formats RGB32 and ARGB32 have different scaling behavior.