Check your email.
>Mike,
>
>Here is how I'm creating the individual tiff images with compression 4. Now I need to take these individual tiff images and append them into a multi-page tiff image, with compression 4. I'm trying to append the images together with the code below but that isn't working. Maybe there is an easier way to do this and any help would be appreciated...
>
>FOR PageCounter = 1 TO SavePageCount
> * Last parameter of 101 creates a tif file (used for first page only); 201 appends to an existing tif file (subsequent pages).
> ReportListenerObj.OutputPage(PageCounter, fax_path + ALLTRIM(STR(PageCounter)) + '.bmp', 105)
>
> WITH _SCREEN.System.Drawing
> LOCAL loMyBitmap AS xfcBitmap
> LOCAL myEncoder AS xfcEncoder
> LOCAL myEncoderParameters AS xfcEncoderParameters
>
> loMyBitmap = .Bitmap.New(fax_path + ALLTRIM(STR(PageCounter)) + '.bmp')
> myEncoder = .Imaging.Encoder.Compression
> myEncoderParameters = .Imaging.EncoderParameters.New(1)
>
> LOCAL loMonoChrBmp as xfcBitmap
> loMonoChrBmp = loMyBitmap.GetMonochrome()
> loMyBitmap = NULL
>
> myEncoderParameters.Param(1) = .Imaging.EncoderParameter.New(myEncoder, .Imaging.EncoderValue.CompressionCCITT4)
> loMonoChrBmp.Save(fax_path + ALLTRIM(STR(PageCounter)) + '.tif', .Imaging.ImageFormat.Tiff, myEncoderParameters)
>
> DELETE FILE (fax_path + ALLTRIM(STR(PageCounter)) + '.bmp')
> ENDWITH
>ENDFOR
>
>Thanks,
>
>Jennifer
>
>
>>Pass the through Cesar's monochrome function, it is possible they are not 100% monochrome, which would alter the compression level to accomodate the shades of gray.
>>
>>>>>Does anybody know how to create a multipage tiff in compression 4 (CCITT4) from individual tiffs with compression 4.
>>>>
>>>>In this month's edition of UTMAG you'll find an article on this subject
>>>>
http://www.utmag.com/Index.asp>>>>
>>>>HTH
>>>>
>>>>Cesar
>>>
>>>Cesar,
>>>
>>>The article is really helpful that is what I've been using. Below is my code '1.tif' and '2.tif' they are both compression 4 tiff files but when I combine them with the code below, I'm getting my multi-page tiff file but it is in the LZW compression and I need the compression 4 format. Any help would be appreciated.
>>>
>>>WITH _SCREEN.System.Drawing
>>> LOCAL multif AS xfcBitmap
>>> LOCAL page2 AS xfcBitmap
>>> LOCAL page3 AS xfcBitmap
>>> LOCAL myImageCodecInfo AS xfcImageCodecInfo
>>> LOCAL myEncoder AS xfcEncoder
>>> LOCAL myEncoderParameter AS xfcEncoderParameter
>>> LOCAL myEncoderParameters AS xfcEncoderParameters
>>>
>>>
>>> multif = .Bitmap.New(fax_path + '1.tif')
>>> page2 = .Bitmap.New(fax_path + '2.tif')
>>>
>>>
>>> myImageCodecInfo = .Imaging.ImageFormat.Tiff
>>>
>>>
>>> myEncoder = .Imaging.Encoder.SaveFlag
>>>
>>>
>>>
>>> myEncoderParameters = .Imaging.EncoderParameters.New(1);
>>>
>>> myEncoderParameter = .Imaging.EncoderParameter.New(myEncoder, .Imaging.EncoderValue.MultiFrame)
>>> myEncoderParameters.Param[1] = myEncoderParameter
>>> multif.Save(fax_path + file_copy + '.tif', myImageCodecInfo, myEncoderParameters)
>>>
>>> *!* Save the second page (frame).
>>> myEncoderParameter = .Imaging.EncoderParameter.New(myEncoder, .Imaging.EncoderValue.FrameDimensionPage)
>>> myEncoderParameters.Param[1] = myEncoderParameter
>>> multif.SaveAdd(page2, myEncoderParameters)
>>>
>>> *!* Close the multiple-frame file.
>>> myEncoderParameter = .Imaging.EncoderParameter.New(myEncoder, .Imaging.EncoderValue.Flush)
>>> myEncoderParameters.Param[1] = myEncoderParameter
>>> multif.SaveAdd(myEncoderParameters)
>>>ENDWITH