Determine Format from Stream

General discussions about GdPicture.NET.
Post Reply
indxlogic
Posts: 7
Joined: Tue Aug 21, 2012 4:42 pm

Determine Format from Stream

Post by indxlogic » Wed Feb 14, 2018 2:16 pm

I have a viewer that will routinely open PDF or TIFF documents from a stream. Previously, I would use

var _fmt = GdPictureImaging.GetDocumentFormatFromStream(_stream) to determine the format.

I would then open the stream with the appropriate method either:

GdPicturePDF.LoadFromStream(_stream)

or

GdPictureImaging.CreateGdPictureImageFromStream(_stream,_fmt)

After upgrading to the latest version. I see that imaging object no longer has a method for GetDocumentFormatFromStream. I have two questions.

1. Where is the documentation that says this method was removed?
2. What is the appropriate method to open a stream of unknown format?

Thanks!

User avatar
Loïc
Site Admin
Posts: 5592
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Determine Format from Stream

Post by Loïc » Tue Mar 27, 2018 9:44 am

Hi,

This method was marked as deprecated since few time now and have been removed in recent update.
Please use the new static method: GdPictureDocumentUtilities.GetDocumentFormat()

Kind regards,

Loïc

User avatar
Loïc
Site Admin
Posts: 5592
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Determine Format from Stream

Post by Loïc » Tue Mar 27, 2018 9:44 am

Hi,

This method was marked as deprecated since few time now and have been removed in recent update.
Please use the new static method: GdPictureDocumentUtilities.GetDocumentFormat()

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest