Jim Kring Posted November 28, 2007 Author Report Share Posted November 28, 2007 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 Quote Link to comment
Jim Kring Posted November 28, 2007 Report Share Posted November 28, 2007 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 Quote Link to comment
Rolf Kalbermatter Posted November 28, 2007 Report Share Posted November 28, 2007 QUOTE(Jim Kring @ Nov 27 2007, 01:09 AM) [cross-posted to NI forums]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 . 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? 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 Quote Link to comment
Jim Kring Posted November 28, 2007 Author Report Share Posted November 28, 2007 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.