Android Question Error Loading Bitmap on Corrupted JPG

geoffschultz

Member
Licensed User
Longtime User
I am trying to load a jpg file which contains a signature in my JobDone routine. However, the jpg is corrupt and generates an Error Loading Bitmap exception. I'm trying to figure out how to handle this. I thought that a Try/Catch would word, but I still get the error. How do I solve this?

B4X:
    If Job.JobName = "getSig" Then ' signature image
        If Job.Success Then
            Try
                signature = Job.GetBitmap
                imgSignature.SetBackgroundImage(signature)
            Catch
            End Try
        End If
        Return
    End If

Thanks, Geoff
 

geoffschultz

Member
Licensed User
Longtime User
Never mind...this works...I was looking at the logs and saw the exception being logged and for some reason didn't expect it to be logged. Duh!

-- Geoff
 
Upvote 0
Top