Loading...

Horizontal binary images not displaying

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Horizontal binary images not displaying

Postby JohnT » Wed Jan 27, 2010 6:12 am

Hello all,

I am using the trial GdPicture Pro ActiveX in a PowerBuilder application. I am running against a MS SQL Server database where individual scanned images are stored in binary format in an "Image" data type field.
Everything is working great, except that if the original image was scanned in landscape mode the saved image file appears blank. I've confirmed that there is valid data in the blob data I am retrieving from the database, and the return code from the save functions are good. The file definitely gets created, but it is always blank if the original was scanned in landscape mode.

We have another application that is able to extract this exact same data and successfully build a multi-page PDF, so I'm at a bit of a loss. Any input would be most appreciated!

PS - I've saved using single page tiff's, multi-page tiff's, and single page PDF's, and the results are always the same... blank pages!
JohnT
 
Posts: 5
Joined: Wed Jan 27, 2010 5:56 am

Re: Horizontal binary images not displaying

Postby Loïc » Wed Jan 27, 2010 10:49 am

Hi,

Please give us some information to be able to reproduce your problem quickly. Ie: code snippet, some explanations & file of the image you are trying to open.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Horizontal binary images not displaying

Postby JohnT » Wed Jan 27, 2010 3:42 pm

This code may look unusual, but I am trying three different tests at the same time. Each file type creation works the same if run individually...
Sorry, but the indentation seems to be lost when posting in this forum.

Code: Select all
// I have already set the license at this point. This is just the code section that
// loops through an array of blobs (binary large objects) where each element contains binary data
// of a single scanned image page.

FOR ll_index = 1 TO il_blob_image_count
                     // Build the file names for the multi-page tiff, the single-page pdf and the single-page tiff
        // Note: These name strings work fine and are created correctly

   ls_TiffFileName = ls_export_path +String(al_idbatch) + ".tif"
   ls_PDFFileName =  ls_export_path +String(al_idbatch) + "_" + String(ll_index) + ".pdf"
   ls_SingleTiffFileName =  ls_export_path +String(al_idbatch) + "_" + String(ll_index) + ".tif"

   // Populate the object with the binary image data
   ll_image_handle = ole_1.object.CreateImageFromByteArray(lblob_tiff_image_data[ll_index])

   IF ll_index = 1 THEN
      // If it is the first time through the loop, then create the multi-page tif file
      ll_image_handle = ole_1.object.CreateImageFromByteArray(lblob_tiff_image_data[ll_index])
      ll_gdPictureStatus = ole_1.object.TiffSaveAsNativeMultiPage (ls_TiffFileName)
   ELSE
      // Otherwise add this image to the multi-page tiff
      ll_gdPictureStatus = ole_1.object.TiffAddToNativeMultipage (ll_image_handle)         
   END IF

   lb_retval = ole_1.object.SaveAsPDFEx(ls_PDFFileName) // This line could be commented out
   ll_gdPictureStatus = ole_1.object.SaveAsTiff(ls_SingleTiffFileName) // This line could be commented out

   ll_gdPictureStatus = ole_1.object.CloseImage (ll_image_handle)
NEXT

ll_gdPictureStatus = ole_1.object.TiffCloseNativeMultiPage()



Again, this code works perfectly. That is, a multi-page tiff is created for every blob in the array (which in the case of my test has 10 elements/pages). In addition, 10 individual tiff images are created and 10 individual PDF's are created. So everything appears as if it worked properly. But if you look at pages 4 thru 10 of the multi-page tiff, the pages are blank. And if you look at the individual tiff and PDF files, numbers 4 thru 10 are also blank. The only difference that I can see between the images contained in the blobs are the fact that images 1 thru 3 are in portrait orientation and the remaining images 4 thru 10 are all in landscape orientation.

And the image data (for all 10 pages) is valid because we have another application that is able to successfully extract the data and create a 10-page multi-page PDF file, and that is how I know that the last 7 pages are of landscape orientation. Any ideas?
JohnT
 
Posts: 5
Joined: Wed Jan 27, 2010 5:56 am

Re: Horizontal binary images not displaying

Postby Loïc » Wed Jan 27, 2010 4:04 pm

Hi,

Are you able to extract the blank rendered image as file for investigation ?

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Horizontal binary images not displaying

Postby JohnT » Wed Jan 27, 2010 4:30 pm

Yes, I could send you the blank tiff or blank PDF, whichever you prefer. Or I could possibly send you the raw binary data.
JohnT
 
Posts: 5
Joined: Wed Jan 27, 2010 5:56 am

Re: Horizontal binary images not displaying

Postby Loïc » Wed Jan 27, 2010 4:35 pm

Hi,

What I need is the input data saved into a file not the resulting blank image.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Horizontal binary images not displaying

Postby JohnT » Wed Jan 27, 2010 4:40 pm

I can do that, where shall I sent it? Thanks!
JohnT
 
Posts: 5
Joined: Wed Jan 27, 2010 5:56 am

Re: Horizontal binary images not displaying

Postby Loïc » Wed Jan 27, 2010 4:44 pm

to esupport (at) gdpicture (dot) com.
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Horizontal binary images not displaying

Postby JohnT » Wed Jan 27, 2010 4:59 pm

Email has been sent, thanks!
JohnT
 
Posts: 5
Joined: Wed Jan 27, 2010 5:56 am


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron