Skip to content

Instantly share code, notes, and snippets.

@AlphaAtlas
Created November 13, 2019 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlphaAtlas/86231c8bcec19bcc2f808b931ede0a92 to your computer and use it in GitHub Desktop.
Save AlphaAtlas/86231c8bcec19bcc2f808b931ede0a92 to your computer and use it in GitHub Desktop.
PNG Scaling
#Downscale it with the highest possible quality, and write the full frame and image to disk
#Can run wit this: https://github.com/theChaosCoder/vapoursynth-portable-FATPACK/releases/\
import mvsfunc as mvf
import muvsfunc as muf
import xvs as xvs
import vapoursynth as vs
from vapoursynth import core
clip = core.imwri.Read("pathtoimage/image%d.png")
clip = mvf.Depth(clip, depth = 32)
clip = xvs.Dpid(clip, width = 1920, height = 1080)
clip = mvf.Depth(clip, depth = 8)
clip = core.imwri.Write(clip, imgformat = "png", filename="best_pngs_on_the_citadel%d"), firstnum = 0, quality = 100, overwrite = True)
clip.set_output()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment