Open
Description
I want to convert a jpg image into a vtf file, but I don't know where the problem is. The file is wrong
from srctools.vtf import VTF
import io
a = VTF(width=1024,height=1024)
with open('C:\\Users\\73580\\Desktop\\R.jpg','rb') as fi:
img1 = fi.read()
img1 = io.BytesIO(img1)
a.save(file=img1)
with open('C:\\Users\\73580\\Desktop\\file.vtf','wb') as f:
a.save(f)
Activity