Support Center

Saving JPG Compressed Tiff Files using the ImageMan ActiveX Suite

Last Updated: Apr 22, 2011 05:35PM EDT

 

The attached VB6 sample illustrates how to use the ImageMan ActiveX controls to save an image as a JPG compressed TIFF file.

When saving as a JPG compressed TIFF your application can specify the compression quality factor used to compress the image. The LOSSY_QUALITY attribute ranges from 1 (Best compression, worst quality)  to 99 (Worst Compression, best image quality). The default value is 75.

Private Sub mnuSave_Click()

    Dim Attrs As New IMActX8Ctl.Attributes

    Attrs.Add "APPEND", "ON", IMActX8Ctl.IMString
    Attrs.Add "OVERWRITE", "OFF", IMActX8Ctl.IMString
    Attrs.Add "EXTENSION", "TIF", IMActX8Ctl.IMString
    Attrs.Add "COMPRESS", "True", IMActX8Ctl.IMString
    Attrs.Add "TIFF_COMPRESS", "JPEG_DCT", IMActX8Ctl.IMString
    Attrs.Add "LOSSY_QUALITY", "50", IMActX8Ctl.IMString

    ImageControl1.SaveAs "", Attrs
End Sub

Contact Us