When I display a document using the AxGdPicturePro5S.AxGdViewer's DisplayFromFile, everything works fine. When I use the GdPicturePro5.cImaging's CreateFromFile then try to load the image handle to the viewer, it gives me the error "Invalid image: Can not get picture height. Below is a demo of the issue. Could you please advise?
- Code: Select all
this.axGdViewer1.ZoomMode = GdPicturePro5S.ViewerZoomMode.ZoomFitToControl;
// Displays fine
GdPicturePro5S.GdPictureStatus status3 = this.axGdViewer1.DisplayFromFile("c:\\blah.jpg");
int imageId = this.gdImaging.CreateImageFromFile("c:\\blah.jpg");
// Status returns InvalidParamater, error message states "Invalid image: Can not get picture height"
GdPicturePro5S.GdPictureStatus status = this.axGdViewer1.SetNativeImage(imageId);