The Gist contains code snippets related to Aspose.Imabging Cloud SDK for .NET. For more information on usage of these code snippets, please visit the following links
Last active
April 4, 2021 17:15
-
-
Save aspose-cloud/5eede2f9a400aab66218e741fa1c6733 to your computer and use it in GitHub Desktop.
This gist contains the code snippets related to GIF image to DICOM and JPEG to PNG conversion using Aspose.Imaging Cloud SDK for .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String MyClientID = "c235e685-1aab-4cda-a95b-54afd63eb87f"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
String MyClientSecret = "b8da4ee37494f2ef8da3c727f3a0acb9"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
ImagingApi imagingApi = new ImagingApi(MyClientSecret, MyClientID,"https://api.aspose.cloud"); | |
// Please refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats | |
// for possible output formats | |
string format = "dicom"; | |
string folder = null; // Input file is saved at the root of the storage | |
string storage = null; // Cloud Storage name | |
var request = new Aspose.Imaging.Cloud.Sdk.Model.Requests.ConvertImageRequest("kite.gif", format, folder, storage); | |
Stream updatedImage = imagingApi.ConvertImage(request); | |
// Save updated image to local storage | |
using (var fileStream = File.Create("/Users/nayyershahbaz/Documents/myResultant." + format)) | |
{ | |
updatedImage.Seek(0, SeekOrigin.Begin); | |
updatedImage.CopyTo(fileStream); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String MyClientID = "c235e685-1aab-4cda-a95b-54afd63eb87f"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
String MyClientSecret = "b8da4ee37494f2ef8da3c727f3a0acb9"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
ImagingApi imagingApi = new ImagingApi(MyClientSecret, MyClientID,"https://api.aspose.cloud"); | |
// Please refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats | |
// for possible output formats | |
string format = "png"; | |
string folder = null; // Input file is saved at the root of the storage | |
string storage = null; // Cloud Storage name | |
var request = new Aspose.Imaging.Cloud.Sdk.Model.Requests.ConvertImageRequest("Converter.jpg", format, folder, storage); | |
Stream updatedImage = imagingApi.ConvertImage(request); | |
// Save updated image to local storage | |
using (var fileStream = File.Create("/Users/nayyershahbaz/Documents/myResultant." + format)) | |
{ | |
updatedImage.Seek(0, SeekOrigin.Begin); | |
updatedImage.CopyTo(fileStream); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist contains the code snippets related to GIF image to DICOM and JPEG to PNG conversion using Aspose.Imaging Cloud SDK for .NET |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment