17.10.2020, 09:14
I'm not totally sure atm. how to handle 32bit Tiff with Levels properly.
Load a single 32bit TIFF with vsImageReader and applying levels on it returns a black screen the way I assumed it would work.
I assumed that the color space should be RGBS with 32bit precision and thus analog to limiting to 16-235 I used min_in = 16 << (32-8), max_in=235 << (32-8), min_out= 16 << (32-8), max_out = 235 << (32-8).
That gave me a black preview and I'm not sure whether this is due to a limitation of the preview, if I did something wrong or if it's a limitation somewhere else.
So any help is welcome.
-> posted over at doom9s (https://forum.doom9.org/showpost.php?p=1925989) to see whether someone there knows how to do it properly.
for your 'JPEG 8-bit HQ enabled.jpg' file.
and for the "PNG 8-bit":
Cu Selur
Load a single 32bit TIFF with vsImageReader and applying levels on it returns a black screen the way I assumed it would work.
I assumed that the color space should be RGBS with 32bit precision and thus analog to limiting to 16-235 I used min_in = 16 << (32-8), max_in=235 << (32-8), min_out= 16 << (32-8), max_out = 235 << (32-8).
That gave me a black preview and I'm not sure whether this is due to a limitation of the preview, if I did something wrong or if it's a limitation somewhere else.
So any help is welcome.
# Imports
import vapoursynth as vs
core = vs.get_core()
# source: 'C:/Users/Selur/Desktop/images v2/TIFF 32-bit.tif'
# current color space: RGBS, bit depth: 32, resolution: 640x480, fps: 25, color matrix: 709, yuv luminance scale: full, scanorder: progressive
# Loading C:\Users\Selur\Desktop\images v2\TIFF 32-bit.tif using vsImageReader
clip = core.imwri.Read(["C:/Users/Selur/Desktop/images v2/TIFF 32-bit.tif"])
clip = core.std.Loop(clip=clip, times=100)
# Input color space is assumed to be RGBS
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to PC (full) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0)
# Color Adjustment
clip = core.std.Levels(clip=clip, min_in=268435456, max_in=18446744073357230080, min_out=268435456, max_out=18446744073357230080)
# Output
clip.set_output()
Quote: Not sure why it detects JPEG as YUV444P8@8 and same time other image formats as RGB24@8. Maybe JPEG is somehow special...Hybrid takes the color space from MediaInfo which reports:
Image
Format : JPEG
Width : 640 pixels
Height : 480 pixels
Color space : YUV
Chroma subsampling : 4:4:4
Bit depth : 8 bits
Compression mode : Lossy
Stream size : 44.5 KiB (100%)
ColorSpace_ICC : RGB
and for the "PNG 8-bit":
Image
Format : PNG
Format/Info : Portable Network Graphic
Format_Compression : Deflate
Width : 640 pixels
Height : 480 pixels
Color space : RGB
Bit depth : 8 bits
Cu Selur