GetPcdResolution Method (original) (raw)

Summary

Examines a PhotoCD file to determine which resolutions it contains.

Syntax

public int[] GetPcdResolution( string _fileName_ )

public: array<int>^ GetPcdResolution( String^ _fileName_ )

Parameters

fileName
A String containing the name of the PhotoCD file.

Return Value

An array of 6 boolean values that specifies if the resolution at the corresponding index exists.

Example

This example checks for a high resolution PCD image and loads it if possible.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; using Leadtools.Svg; void GetPcdResolutionExample(string pcdFileName) { RasterCodecs codecs = new RasterCodecs(); // Get the PCD resolution information. const int pcd4Base = 4; int[] resolutions = codecs.GetPcdResolution(pcdFileName); // Use high resolution if possible if (resolutions[pcd4Base] != 0) { codecs.Options.Pcd.Load.Resolution = new LeadSize(1024, 1536); Debug.WriteLine("Loading 1024 x 1536"); } else { codecs.Options.Pcd.Load.Resolution = new LeadSize(512, 768); Debug.WriteLine("Loading 512 x 768"); } // Load the image at its own bits per pixel RasterImage image = codecs.Load(pcdFileName, 0, CodecsLoadByteOrder.Bgr, 1, 1); Debug.WriteLine("Image size loaded: {0} by {1}", image.Width, image.Height); image.Dispose(); // Reset the default PCD resolution codecs.Options.Pcd.Load.Resolution = new LeadSize(512, 768); // Clean up codecs.Dispose(); }

Leadtools.Codecs Assembly

CompactFile(Stream,Stream,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(Stream,Stream,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

CompactFile(string,string,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(string,string,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

StartCompress(int,int,int,RasterByteOrder,RasterViewPerspective,int,byte[],int,int,CodecsCompression,CodecsCompressDataCallback) Method