public ICredentials UriOperationCredentials { get; set; }
public:
property ICredentials^ UriOperationCredentials {
ICredentials^ get();
void set ( ICredentials^ );
}
UriOperationCredentials # get and set (RasterCodecs)
An ICredentials that contains the authentication credentials used with URI-based operations. The default is a null reference.
NOTE: This topic is part of RasterCodecs
Async support using the .NET System.ComponentMode.AsyncOperation
model. For .NET async/await
support this type/member is not used. Instead, refer to RasterCodecs Async Operations.
The UriOperationCredentials is used to authenticate the required access to a remote resource.
To override the default credentials to use when accessing a remote resource, you must change the value of the UriOperationCredentials property prior to calling any of these methods:
To change the proxy information to use when accessing a remote resource, use the UriOperationProxy property.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
using Leadtools.Svg;
public void SaveToSharePointExample()
{
RasterCodecs codecs = new RasterCodecs();
// Change the path to a server you have access to
string mySharePointServer = @"http://leadweb3/Shared%20Documents";
string myDocumentFileName = mySharePointServer + "/MyJpegFile.jpg";
RasterImage image = null;
// Create a multi-page TIF file
for (int i = 0; i < 4; i++)
{
string pageFileName = Path.Combine(LEAD_VARS.ImagesDir, "Ocr" + (i + 1).ToString() + ".tif");
RasterImage pageImage = codecs.Load(pageFileName, 0, CodecsLoadByteOrder.BgrOrGray, 1, 1);
if (image == null)
image = pageImage;
else
{
image.AddPage(pageImage);
pageImage.Dispose();
}
}
// We have the image, upload it
// Use the credentials of the logged in user
// Change this if you have different user name/password/domain
// For example:
// codecs.UriOperationCredentials = new System.Net.NetworkCredential("myuser", "mypassword", "mydomain");
codecs.UriOperationCredentials = System.Net.CredentialCache.DefaultCredentials;
// Use the default proxy
codecs.UriOperationProxy = WebRequest.DefaultWebProxy;
// Upload the second page of the file to the server as JPEG
codecs.Save(image, new Uri(myDocumentFileName), RasterImageFormat.Jpeg, 24, 2, 2);
image.Dispose();
codecs.Dispose();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.