View Full Version : Handling Multiple Image Resolutions
brucethemoose
26th May 2019, 10:57
I'm (ab)using VapourSynth for something it was probably not meant to do: batch image processing. But I've run into an issue: trying to feed a script images of different sizes, without resizing them to a common size, throws a "Size mismatch for frame X" error. Just poking around the Github, it seems this is a limitation of the ImageMagick reader, and I can't seem to get around it by reading images inside FrameEval.: https://github.com/vapoursynth/vapoursynth/blob/master/src/filters/imwri/imwri.cpp
However, I have read that ffms2 in Vapoursynth supports (https://github.com/FFMS/ffms2/blob/master/doc/ffms2-vapoursynth.md) "video streams that change resolution mid-stream". Other than running different scripts back-to-back or encoding images as a video, is there a workaround for feeding VS images with different resolutions?
Myrsloik
26th May 2019, 14:50
I'm (ab)using VapourSynth for something it was probably not meant to do: batch image processing. But I've run into an issue: trying to feed a script images of different sizes, without resizing them to a common size, throws a "Size mismatch for frame X" error. Just poking around the Github, it seems this is a limitation of the ImageMagick reader, and I can't seem to get around it by reading images inside FrameEval.: https://github.com/vapoursynth/vapoursynth/blob/master/src/filters/imwri/imwri.cpp
However, I have read that ffms2 in Vapoursynth supports (https://github.com/FFMS/ffms2/blob/master/doc/ffms2-vapoursynth.md) "video streams that change resolution mid-stream". Other than running different scripts back-to-back or encoding images as a video, is there a workaround for feeding VS images with different resolutions?
Why do you need the images to be lumped together into one clip?
You can technically create one image image source per image and then combine them all into one clip with "std.Splice([all the one frame clips], mismatch=True)" if it really matters a lot to you.
brucethemoose
27th May 2019, 02:53
Why do you need the images to be lumped together into one clip?
You can technically create one image image source per image and then combine them all into one clip with "std.Splice([all the one frame clips], mismatch=True)" if it really matters a lot to you.
With something like a bunch of folders full of game textures, cramming everything into one clip makes scrubbing through them for comparison in VSEdit or the multi-viewer easier.
And thanks, that works.
Dressy
1st April 2021, 16:06
I discovered how to increases image resolution without losing quality on this site imglarger.com (https://imglarger.com) that really amazed me a lot because I saw there besides other equally useful options. It helped me to enhance color and contrast with only one click, to remove the background from the image automatically, to retouch and fix the blurry face, to unblur image with advanced and fast AI technology, and many other opportunities that I personally often use because it's part of my job and it brings me maximum pleasure.
jackoneill
3rd April 2021, 21:41
imwri.Read also has a „mismatch” parameter.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.