Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MultiPage Tiff Compression
Message
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01153672
Message ID:
01153728
Views:
30
>>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

		&& Create three Bitmap objects.
		multif = .Bitmap.New(fax_path + '1.tif')
		page2  = .Bitmap.New(fax_path + '2.tif')
	
		&& Get an ImageCodecInfo object that represents the TIFF codec.
		myImageCodecInfo = .Imaging.ImageFormat.Tiff

		&& Create an Encoder object based on the GUID for the SaveFlag parameter category.
		myEncoder = .Imaging.Encoder.SaveFlag
		
		&& Create an EncoderParameters object An EncoderParameters object has an array of EncoderParameter
		&& objects. In this case, there is only one EncoderParameter object in the array.
		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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform