- (nullable NSArray<NSValue/*CGSize*/ *> *)loadResolutionsForStream:(LTLeadStream *)stream error:(NSError **)error
public LeadSize[] readLoadResolutions(ILeadStream stream)
public:
array<LeadSize>^ ReadLoadResolutions(
Stream^ stream
)
def ReadLoadResolutions(self,stream):
stream
A Stream containing the data of the image file to query.
A LeadSize structure containing the available resolutions.
A FlashPix, PhotoCD, JPEG 2000 or JBIG/JBIG2 file can contain more than one copy of the same image, each at a different physical resolution (width and height in pixels).
After you get the available resolutions, you can use any of the following to specify the one to be loaded:
For more information, refer to Implementing JBIG Features.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
using Leadtools.Svg;
void ReadLoadResolutionsExample(string jbigFileName)
{
RasterCodecs codecs = new RasterCodecs();
// Get the number of resolutions (sizes) available in this file
LeadSize[] resolution = codecs.ReadLoadResolutions(jbigFileName);
if (resolution.Length > 0)
{
Debug.WriteLine("{0} resolutions available", resolution.Length);
for (int i = 0; i < resolution.Length; i++)
Debug.WriteLine("{0} by {1}", resolution[i].Width, resolution[i].Height);
// Set the size to load, the smallest size in this case */
codecs.Options.Jpeg2000.Load.J2kResolution = resolution[0];
// Get the info in of the image to show its original size
CodecsImageInfo info = codecs.GetInformation(jbigFileName, false);
Debug.WriteLine("Size of image according to GetInformation is {0} by {1}", info.Width, info.Height);
// Load the image, keeping the bits per pixel of the file
RasterImage image = codecs.Load(jbigFileName);
Debug.WriteLine("Size of image loaded is {0} by {1}", image.Width, image.Height);
image.Dispose();
}
else
Debug.WriteLine("No resolutions found");
// Clean up
codecs.Dispose();
}
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.