DaveWortley
03-10-2011, 05:05 PM
The TIF itifio interface doesn't compress the alpha channel of a file when the bitmap is saved via maxscript when a file is opened by maxscript, anyone got any ideas why?
with;
tif.itifio.setAlpha #true
tif.itifio.setCompression #packbits
Filesize is 7mb in test file....
with
tif.itifio.setAlpha #false
tif.itifio.setCompression #packbits
The Filesize is 100kb
Saving the file manually from the vfb with alpha creates a file 120kb
Thus, when saving via maxscript the alpha is not compressed. This only seems to happen if you use Openbitmap and then Save this bitmap with the new TIF settings.
Example...
tt = openbitmap "c:\\Test\\Source.tif"
b = bitmap tt.width tt.height
copy tt b
b.filename = "C:\\Test\\test_f.tif"
tif.itifio.setAlpha #true
tif.itifio.setType #color
tif.itifio.setCompression #packbits
save b
close b
Thankfully it appears to work when doing a new render..
tif.itifio.setAlpha #true
tif.itifio.setType #color
tif.itifio.setCompression #packbits
Render outputfile:"C:\\test\\test01.tif"
then the file is the correct file size.
Anyone know why the openbitmap method causes the alpha not to be saved?
with;
tif.itifio.setAlpha #true
tif.itifio.setCompression #packbits
Filesize is 7mb in test file....
with
tif.itifio.setAlpha #false
tif.itifio.setCompression #packbits
The Filesize is 100kb
Saving the file manually from the vfb with alpha creates a file 120kb
Thus, when saving via maxscript the alpha is not compressed. This only seems to happen if you use Openbitmap and then Save this bitmap with the new TIF settings.
Example...
tt = openbitmap "c:\\Test\\Source.tif"
b = bitmap tt.width tt.height
copy tt b
b.filename = "C:\\Test\\test_f.tif"
tif.itifio.setAlpha #true
tif.itifio.setType #color
tif.itifio.setCompression #packbits
save b
close b
Thankfully it appears to work when doing a new render..
tif.itifio.setAlpha #true
tif.itifio.setType #color
tif.itifio.setCompression #packbits
Render outputfile:"C:\\test\\test01.tif"
then the file is the correct file size.
Anyone know why the openbitmap method causes the alpha not to be saved?
