cancel
Showing results for 
Search instead for 
Did you mean: 

Error on image page provider on a GIF

Scott_Johnson3
World-Class Innovator
World-Class Innovator

I am running  core12.0.3.217.  I get this error message on selected GIF files:

An error occurred within the Unity API: Error code: (-24). DLL not loaded for platinum Win 3.x version.

Here is my code:

ImageDataProvider OBProvider = app.Core.Retrieval.Image;
// Create a page range object
PageRangeSet pageRangeSet = OBProvider.CreatePageRangeSet();

using (PageDataList pageDataList = OBProvider.GetPages(Latestrendition,pageRangeSet))                
    {
    //document.Imaging.AddPages (pageDataList,rendition.NumberOfPages+1);
    int i = 0;
    //write page info    
    foreach (PageData pageData in pageDataList)
        {
        //app.Diagnostics.Write("foreach cnt: " + i.ToString());                                                
        docname = System.IO.Path.GetRandomFileName();
        fullPath = String.Format(@"{0}\{1}.{2}", BasePath, docname, pageData.Extension);  
        app.Diagnostics.Write("Write Attachment Image Page Data: " + fullPath);

        Utility.WriteStreamToFile(pageData.Stream, fullPath);
        fileList.Add(fullPath);
        i++;
        }
}

It errors on the using statement (in red).  I saw this error message in 11 but I thought it was fixed in 12 according to responses to my earlier post.  I guess not all cases were fixed.  Does anyone have any suggestions?

Thanks

Scott

1 REPLY 1

Brian_Koning
Star Contributor
Star Contributor

Hello Scott,

We resolved your issue through API Support several months ago but I didn't realize you also had a Community Post about the problem as well.

For others who are experiencing the same issue, check that documents you are indexing into OnBase are given the correct OnBase FileType. This issue occurred because an HTML document was misnamed with a .GIF extension and was incorrectly being passed to our image processing library, Snowbound. Snowbound was seeing the input file as an HTML file, not a GIF, and was attempting to convert it to a TIFF image. The exception was being thrown during this conversion process.

The implemented fix was to create an exception queue within the Workflow this script was being run and have a human user manually diagnose and correct the invalid GIF files.