Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 5th, 2005, 04:13 PM
Registered User
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting a bmp to a tiff image

Hello all,

I am attempting to create a bitmap on the fly of an email that I have just read and attempting to save it as a tiff image.

The following code allows me to save the newly created bitmap with LZW compression and its readable by Microsoft Office Document Image writer.

 oEncoderParameters = New Imaging.EncoderParameters(1)
      oEncoder = Imaging.Encoder.Compression
      oParameter = New Imaging.EncoderParameter(oEncoder, Imaging.EncoderValue.CompressionLZW)

      oEncoderParameters.Param(0) = oParameter
      ocodecinfo = GetEncoderinfo("image/tiff")
 bmpImage.Save(sFilePath, ocodecinfo, oEncoderParameters)

If I change the compression to CompressionCCITT4, I am able to create the tif file but am unable to view the file through Microsoft Office Image Document Writer.

Any help is appreciated.

Similar Threads
Thread Thread Starter Forum Replies Last Post
convert Image(jpeg/bmp,etc) file into binary forma venkat2reddy C# 2 September 14th, 2010 07:58 AM
Compression changes on single tiff image hutchison1 Pro Visual Basic 2005 0 May 11th, 2007 03:28 PM
Flash Support TIFF and BMP on runtime? arif007khan Flash (all versions) 1 December 20th, 2005 08:28 AM
converting image in picturebox to byte[] connect2sandep General .NET 0 July 26th, 2005 04:31 PM
BMP Iamges shs BOOK: Beginning ASP.NET 1.0 1 August 31st, 2004 05:34 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.