Jump to content

Writing TIFF Files with .NET


Recommended Posts

I have been playing around with the possibility of using .NET to read and write TIFF files. I've hit a little bit of a wall when trying to configure the encoding parameters such as compression and color depth. I followed the example code on the MSDN website here. However, I am getting errors when I try to run this code in LabVIEW. I've been able to isolate the error to the encoderParams argument of the Bitmap.Save() method. However, I believe that I am constructing this argument properly, per the example code. Has anyone else played around with this?

Download File:post-17-1196143600.zip

Link to comment

I have been playing around with the possibility of using .NET to read and write TIFF files. I've hit a little bit of a wall when trying to configure the encoding parameters such as compression and color depth. I followed the example code on the MSDN website here. However, I am getting errors when I try to run this code in LabVIEW. I've been able to isolate the error to the encoderParams argument of the Bitmap.Save() method. However, I believe that I am constructing this argument properly, per the example code. Has anyone else played around with this?

Download File:post-17-1196143600.zip

Link to comment

QUOTE(Jim Kring @ Nov 27 2007, 01:09 AM)

According to the C++ example on MSDN it would seem that the EncoderParameter.value should be an Int64. So I simply tried to select the EncoderParameter(Encoder encoder, Int64 value) method instead of the EncoderParameter(Encoder encoder, Int16 value) and everything seems to be alright. At least I do not get any error anymore. Of course the Convert to Int16 could go away or be explicitedly converted to Int64 but LabVIEW will do that implicitedly too.

Rolf Kalbermatter

Link to comment

QUOTE(rolfk @ Nov 27 2007, 12:29 PM)

According to the C++ example on MSDN it would seem that the EncoderParameter.value should be an Int64. So I simply tried to select the EncoderParameter(Encoder encoder, Int64 value) method instead of the EncoderParameter(Encoder encoder, Int16 value) and everything seems to be alright.

Hi Rolf. Thanks for the help. That works fine for me, too :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.