Home | About us | Overview | Software - Download | Evaluate | Order | Support | Contact | F.A.Q. | Documentations | Blog | Newsletter
Loading...

Buffer cannot be null error in GdPictureImaging.SaveAsByteAr

Discussions about image processing in GdPicture.NET using GdPictureImaging.

Buffer cannot be null error in GdPictureImaging.SaveAsByteAr

Postby rangasamy » Wed Aug 11, 2010 2:26 pm

Hi,

C# Code :
GdPictureImaging ObjImaging = new GdPictureImaging();
byte[] RedactionByteArray = null;
int bytesread = 0;

int ImageID = GdViewer1.CurrentPage;
ObjImaging.SaveAsByteArray(ImageID, ref RedactionByteArray, ref bytesread, DocumentFormat.DocumentFormatIFF, 4);

whenever i call the GdPictureImaging SaveAsByteArray() method, randomly i am getting the following error

Buffer cannot be null.
Parameter name: buffer


How can i fix that error?
rangasamy
 
Posts: 8
Joined: Wed Jul 14, 2010 11:14 am

Re: Buffer cannot be null error in GdPictureImaging.SaveAsBy

Postby Loïc » Fri Aug 13, 2010 2:03 pm

Hi,

The current page property does not return a GdPicture Image ID but the number of the curren tpage in a multipage document.
If you want to handle the same image into a GdPcitureImaging and a GdViewer object at the same time you should read the reference guide at Using GdPicture.NET / 5. Displaying a GdPicture Image handled by a GdPictureImaging object to a GdViewer object.

See: http://guides.gdpicture.com/v6/html/con ... e_NET.html

Hope this helps !

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


Return to Image Processing

Who is online

Users browsing this forum: No registered users and 0 guests