XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : TIF saving bug...

03-10-2011, 06: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?


tif.itifio.setAlpha #true
tif.itifio.setCompression #packbits

Filesize is 7mb in test file....


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.


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?

03-10-2011, 07:00 PM
not sure why this happens, but maybe you can work around it using dotnet images?

CGTalk Moderation
03-10-2011, 07:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.