Sign in to follow this  
aaro4130

'Unexpected Error' Upon Saving File

Recommended Posts

EDIT : This topic can be locked or deleted, I have fixed my problem

 

Hey! I have a problem with my script. the OnSave method, even though only containing the following code, throws an error. Can anybody think of why? :/

Protected Overrides Sub OnSave(ByVal input As Document, ByVal output As Stream, ByVal token As SaveConfigToken, ByVal scratchSurface As Surface, ByVal callback As ProgressEventHandler)

        Dim tk As TEXSaveConfigToken = DirectCast(token, TEXSaveConfigToken)
        Using renderArg As RenderArgs = New RenderArgs(New Surface(input.Size))
            input.Render(renderArg, True)
            Dim b As System.Drawing.Bitmap = renderArg.Bitmap.Clone()

           
            Using w As System.IO.BinaryWriter = New System.IO.BinaryWriter(output)
                    w.Write(0)
End Using
End Using
End Sub
Edited by aaro4130

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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.

Sign in to follow this