troubleshooting Question

Error loading TIFF Image into Bitmap object

Avatar of gfahd1
gfahd1 asked on
.NET ProgrammingVisual Basic.NET
15 Comments1 Solution652 ViewsLast Modified:
Hello,
This problem driving crazy. I am loading tiff images into a bitmap object and passing the object to LuraTech. All working well, except for some tiff files (large files, not compressed, color, 650MB). Whe I get to pass this file to the bitmap object, i get an error: "Parameter is not valid." and Inner error: "Referenced object has a value of 'Nothing'.". The strange thing is, it does work on some machines and not on others. I couldn't find any pattern for the problem except the dot net framework release. The one that works is: 2.00.50727.0042 and my machine doesn't work with the version: 2.00.50727.1433.

Any help is appreciated. Thanks in advanced.
Private Function LoadBitmap(ByVal filename As String) As Bitmap
        Dim bitmap As Bitmap = Nothing
 
        Try
            ' load bitmap
            bitmap = New Bitmap(filename)     'ERROR HERE
        Catch ex As Exception
            moLog.Write("Could not load image to Bitmap. Unsupported file format.", moMail, True)
            moLog.Write(ex.ToString.ToString, moMail, True)
            Return Nothing
 
        End Try
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros