Class PsdOptions

Class PsdOptions

名称: Aspose.Imaging.ImageOptions アセンション: Aspose.Imaging.dll (25.4.0)

API を使用して Photoshop Document (PSD) 画像を作成し、多様なオプションを提供します。異なる形式のバージョン、圧縮方法、色のモード、およびビットはカラーチャンネルごとに数えています. XMP メタデータコンテナを無駄に処理し、総合的な画像処理をPSD形式機能のパワーで確保する画像層、層マスク、およびカスタマイズのためのファイル情報などあなたのデザインにおける創造性

[JsonObject(MemberSerialization.OptIn)]
public class PsdOptions : ImageOptionsBase, IDisposable, IHasXmpData, IHasMetadata, ICloneable

Inheritance

object DisposableObject ImageOptionsBase PsdOptions

Implements

IDisposable , IHasXmpData , IHasMetadata , ICloneable

相続人

ImageOptionsBase.Clone() , ImageOptionsBase.ReleaseManagedResources() , ImageOptionsBase.KeepMetadata , ImageOptionsBase.XmpData , ImageOptionsBase.Source , ImageOptionsBase.Palette , ImageOptionsBase.ResolutionSettings , ImageOptionsBase.VectorRasterizationOptions , ImageOptionsBase.BufferSizeHint , ImageOptionsBase.MultiPageOptions , ImageOptionsBase.FullFrame , ImageOptionsBase.ProgressEventHandler , DisposableObject.Dispose() , DisposableObject.ReleaseManagedResources() , DisposableObject.ReleaseUnmanagedResources() , DisposableObject.VerifyNotDisposed() , DisposableObject.Disposed , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

この例では、Aspsoe.Imaging for .Net API を使用して画像を PSD 形式に変換することを示しています。この目標を達成するために、この例は既存の画像をアップロードし、PSD 形式に戻します。

string dir = "c:\\temp\\";

                                                                                                                                                                                                            //Creates an instance of image class and initialize it with an existing file through File path
                                                                                                                                                                                                            using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.bmp"))
                                                                                                                                                                                                            {
                                                                                                                                                                                                                //Create an instance of PsdOptions class
                                                                                                                                                                                                                Aspose.Imaging.ImageOptions.PsdOptions psdOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                                                                                                                                //Set the CompressionMethod as RLE
                                                                                                                                                                                                                //Note: Other supported CompressionMethod is CompressionMethod.RAW [No Compression]
                                                                                                                                                                                                                psdOptions.CompressionMethod = Aspose.Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                                                                                                                                //Set the ColorMode to GrayScale
                                                                                                                                                                                                                //Note: Other supported ColorModes are ColorModes.Bitmap and ColorModes.RGB
                                                                                                                                                                                                                psdOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Grayscale;

                                                                                                                                                                                                                //Save the image to disk location with supplied PsdOptions settings
                                                                                                                                                                                                                image.Save(dir + "output.psd", psdOptions);
                                                                                                                                                                                                            }

下記の例では、特定の画像タイプを参照せずに、複数のページベクター画像を一般的にPSD形式に変換する方法を示しています。

string dir = "C:\\aspose.imaging\\net\\misc\\ImagingReleaseQATester\\Tests\\testdata\\2548";
                                                                                                                                                           string inputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr");
                                                                                                                                                           string outputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr.psd");

                                                                                                                                                           Aspose.Imaging.ImageOptionsBase exportOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFilePath))
                                                                                                                                                           {
                                                                                                                                                               exportOptions.MultiPageOptions = null;

                                                                                                                                                               // Export only first two pages. These pages will be presented as layers in the output PSD.
                                                                                                                                                               Aspose.Imaging.IMultipageImage multipageImage = image as Aspose.Imaging.IMultipageImage;
                                                                                                                                                               if (multipageImage != null && (multipageImage.Pages != null && multipageImage.PageCount > 2))
                                                                                                                                                               {
                                                                                                                                                                   exportOptions.MultiPageOptions = new Aspose.Imaging.ImageOptions.MultiPageOptions(new Aspose.Imaging.IntRange(0, 2));
                                                                                                                                                               }

                                                                                                                                                               if (image is Aspose.Imaging.VectorImage)
                                                                                                                                                               {
                                                                                                                                                                   exportOptions.VectorRasterizationOptions = (Aspose.Imaging.ImageOptions.VectorRasterizationOptions)image.GetDefaultOptions(new object[] { Aspose.Imaging.Color.White, image.Width, image.Height });
                                                                                                                                                                   exportOptions.VectorRasterizationOptions.TextRenderingHint = Aspose.Imaging.TextRenderingHint.SingleBitPerPixel;
                                                                                                                                                                   exportOptions.VectorRasterizationOptions.SmoothingMode = Aspose.Imaging.SmoothingMode.None;
                                                                                                                                                               }

                                                                                                                                                               image.Save(outputFilePath, exportOptions);
                                                                                                                                                           }

Constructors

PsdOptions()

Aspose.Imaging.ImageOptions.PsdOptionsクラスの新しい例を開始します。

[JsonConstructor]
public PsdOptions()

PsdOptions(PsdOptions)

Aspose.Imaging.ImageOptions.PsdOptionsクラスの新しい例を開始します。

public PsdOptions(PsdOptions options)

Parameters

options PsdOptions

オプションです。

Properties

ChannelBitsCount

カラーチャンネルごとにビットを数えるか設定します。

public short ChannelBitsCount { get; set; }

不動産価値

short

Examples

この例では、さまざまなPSD特定のオプションを使用してPNG画像をPSD形式に保存する方法を示しています。

string dir = "c:\\temp\\";

                                                                                                       // Create a PNG image of 100x100 px.
                                                                                                       using (Aspose.Imaging.FileFormats.Png.PngImage pngImage = new Aspose.Imaging.FileFormats.Png.PngImage(100, 100, Aspose.Imaging.FileFormats.Png.PngColorType.TruecolorWithAlpha))
                                                                                                       {
                                                                                                           // Define a linear blue-transparent gradient.
                                                                                                           Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                   new Aspose.Imaging.Point(0, 0),
                                                                                                                   new Aspose.Imaging.Point(pngImage.Width, pngImage.Height),
                                                                                                                   Aspose.Imaging.Color.Blue,
                                                                                                                   Aspose.Imaging.Color.Transparent);

                                                                                                           Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(pngImage);

                                                                                                           // Fill the PNG image with the linear blue-transparent gradient.
                                                                                                           graphics.FillRectangle(gradientBrush, pngImage.Bounds);

                                                                                                           // The following options will be used to save the PNG image to PSD format.
                                                                                                           Aspose.Imaging.ImageOptions.PsdOptions saveOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                           // The number of bits per channel
                                                                                                           saveOptions.ChannelBitsCount = 8;

                                                                                                           // The number of channels. One channel for each color component R,G,B,A
                                                                                                           saveOptions.ChannelsCount = 4;

                                                                                                           // The color mode
                                                                                                           saveOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Rgb;

                                                                                                           // No compression
                                                                                                           saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.Raw;

                                                                                                           // Default version is 6
                                                                                                           saveOptions.Version = 6;            

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.psd"))
                                                                                                           {
                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RAW compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.RLE.psd"))
                                                                                                           {
                                                                                                               // The RLE compression allows to reduce the size of the output image
                                                                                                               saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RLE compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           // The output may look like this:
                                                                                                           // The size of the PSD image with RAW compression: 40090
                                                                                                           // The size of the PSD image with RLE compression: 16185
                                                                                                       }

ChannelsCount

色のチャンネルを数えるか、数えるか。

public short ChannelsCount { get; set; }

不動産価値

short

Examples

この例では、さまざまなPSD特定のオプションを使用してPNG画像をPSD形式に保存する方法を示しています。

string dir = "c:\\temp\\";

                                                                                                       // Create a PNG image of 100x100 px.
                                                                                                       using (Aspose.Imaging.FileFormats.Png.PngImage pngImage = new Aspose.Imaging.FileFormats.Png.PngImage(100, 100, Aspose.Imaging.FileFormats.Png.PngColorType.TruecolorWithAlpha))
                                                                                                       {
                                                                                                           // Define a linear blue-transparent gradient.
                                                                                                           Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                   new Aspose.Imaging.Point(0, 0),
                                                                                                                   new Aspose.Imaging.Point(pngImage.Width, pngImage.Height),
                                                                                                                   Aspose.Imaging.Color.Blue,
                                                                                                                   Aspose.Imaging.Color.Transparent);

                                                                                                           Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(pngImage);

                                                                                                           // Fill the PNG image with the linear blue-transparent gradient.
                                                                                                           graphics.FillRectangle(gradientBrush, pngImage.Bounds);

                                                                                                           // The following options will be used to save the PNG image to PSD format.
                                                                                                           Aspose.Imaging.ImageOptions.PsdOptions saveOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                           // The number of bits per channel
                                                                                                           saveOptions.ChannelBitsCount = 8;

                                                                                                           // The number of channels. One channel for each color component R,G,B,A
                                                                                                           saveOptions.ChannelsCount = 4;

                                                                                                           // The color mode
                                                                                                           saveOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Rgb;

                                                                                                           // No compression
                                                                                                           saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.Raw;

                                                                                                           // Default version is 6
                                                                                                           saveOptions.Version = 6;            

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.psd"))
                                                                                                           {
                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RAW compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.RLE.psd"))
                                                                                                           {
                                                                                                               // The RLE compression allows to reduce the size of the output image
                                                                                                               saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RLE compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           // The output may look like this:
                                                                                                           // The size of the PSD image with RAW compression: 40090
                                                                                                           // The size of the PSD image with RLE compression: 16185
                                                                                                       }

ColorMode

PSD色のモードを取得または設定します。

public ColorModes ColorMode { get; set; }

不動産価値

ColorModes

Examples

この例では、Aspsoe.Imaging for .Net API を使用して画像を PSD 形式に変換することを示しています。この目標を達成するために、この例は既存の画像をアップロードし、PSD 形式に戻します。

string dir = "c:\\temp\\";

                                                                                                                                                                                                            //Creates an instance of image class and initialize it with an existing file through File path
                                                                                                                                                                                                            using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.bmp"))
                                                                                                                                                                                                            {
                                                                                                                                                                                                                //Create an instance of PsdOptions class
                                                                                                                                                                                                                Aspose.Imaging.ImageOptions.PsdOptions psdOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                                                                                                                                //Set the CompressionMethod as RLE
                                                                                                                                                                                                                //Note: Other supported CompressionMethod is CompressionMethod.RAW [No Compression]
                                                                                                                                                                                                                psdOptions.CompressionMethod = Aspose.Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                                                                                                                                //Set the ColorMode to GrayScale
                                                                                                                                                                                                                //Note: Other supported ColorModes are ColorModes.Bitmap and ColorModes.RGB
                                                                                                                                                                                                                psdOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Grayscale;

                                                                                                                                                                                                                //Save the image to disk location with supplied PsdOptions settings
                                                                                                                                                                                                                image.Save(dir + "output.psd", psdOptions);
                                                                                                                                                                                                            }

この例では、さまざまなPSD特定のオプションを使用してPNG画像をPSD形式に保存する方法を示しています。

string dir = "c:\\temp\\";

                                                                                                       // Create a PNG image of 100x100 px.
                                                                                                       using (Aspose.Imaging.FileFormats.Png.PngImage pngImage = new Aspose.Imaging.FileFormats.Png.PngImage(100, 100, Aspose.Imaging.FileFormats.Png.PngColorType.TruecolorWithAlpha))
                                                                                                       {
                                                                                                           // Define a linear blue-transparent gradient.
                                                                                                           Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                   new Aspose.Imaging.Point(0, 0),
                                                                                                                   new Aspose.Imaging.Point(pngImage.Width, pngImage.Height),
                                                                                                                   Aspose.Imaging.Color.Blue,
                                                                                                                   Aspose.Imaging.Color.Transparent);

                                                                                                           Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(pngImage);

                                                                                                           // Fill the PNG image with the linear blue-transparent gradient.
                                                                                                           graphics.FillRectangle(gradientBrush, pngImage.Bounds);

                                                                                                           // The following options will be used to save the PNG image to PSD format.
                                                                                                           Aspose.Imaging.ImageOptions.PsdOptions saveOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                           // The number of bits per channel
                                                                                                           saveOptions.ChannelBitsCount = 8;

                                                                                                           // The number of channels. One channel for each color component R,G,B,A
                                                                                                           saveOptions.ChannelsCount = 4;

                                                                                                           // The color mode
                                                                                                           saveOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Rgb;

                                                                                                           // No compression
                                                                                                           saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.Raw;

                                                                                                           // Default version is 6
                                                                                                           saveOptions.Version = 6;            

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.psd"))
                                                                                                           {
                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RAW compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.RLE.psd"))
                                                                                                           {
                                                                                                               // The RLE compression allows to reduce the size of the output image
                                                                                                               saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RLE compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           // The output may look like this:
                                                                                                           // The size of the PSD image with RAW compression: 40090
                                                                                                           // The size of the PSD image with RLE compression: 16185
                                                                                                       }

CompressionMethod

PSD圧縮方法を取得または設定します。

public CompressionMethod CompressionMethod { get; set; }

不動産価値

CompressionMethod

Examples

この例では、Aspsoe.Imaging for .Net API を使用して画像を PSD 形式に変換することを示しています。この目標を達成するために、この例は既存の画像をアップロードし、PSD 形式に戻します。

string dir = "c:\\temp\\";

                                                                                                                                                                                                            //Creates an instance of image class and initialize it with an existing file through File path
                                                                                                                                                                                                            using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.bmp"))
                                                                                                                                                                                                            {
                                                                                                                                                                                                                //Create an instance of PsdOptions class
                                                                                                                                                                                                                Aspose.Imaging.ImageOptions.PsdOptions psdOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                                                                                                                                //Set the CompressionMethod as RLE
                                                                                                                                                                                                                //Note: Other supported CompressionMethod is CompressionMethod.RAW [No Compression]
                                                                                                                                                                                                                psdOptions.CompressionMethod = Aspose.Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                                                                                                                                //Set the ColorMode to GrayScale
                                                                                                                                                                                                                //Note: Other supported ColorModes are ColorModes.Bitmap and ColorModes.RGB
                                                                                                                                                                                                                psdOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Grayscale;

                                                                                                                                                                                                                //Save the image to disk location with supplied PsdOptions settings
                                                                                                                                                                                                                image.Save(dir + "output.psd", psdOptions);
                                                                                                                                                                                                            }

この例では、さまざまなPSD特定のオプションを使用してPNG画像をPSD形式に保存する方法を示しています。

string dir = "c:\\temp\\";

                                                                                                       // Create a PNG image of 100x100 px.
                                                                                                       using (Aspose.Imaging.FileFormats.Png.PngImage pngImage = new Aspose.Imaging.FileFormats.Png.PngImage(100, 100, Aspose.Imaging.FileFormats.Png.PngColorType.TruecolorWithAlpha))
                                                                                                       {
                                                                                                           // Define a linear blue-transparent gradient.
                                                                                                           Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                   new Aspose.Imaging.Point(0, 0),
                                                                                                                   new Aspose.Imaging.Point(pngImage.Width, pngImage.Height),
                                                                                                                   Aspose.Imaging.Color.Blue,
                                                                                                                   Aspose.Imaging.Color.Transparent);

                                                                                                           Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(pngImage);

                                                                                                           // Fill the PNG image with the linear blue-transparent gradient.
                                                                                                           graphics.FillRectangle(gradientBrush, pngImage.Bounds);

                                                                                                           // The following options will be used to save the PNG image to PSD format.
                                                                                                           Aspose.Imaging.ImageOptions.PsdOptions saveOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                           // The number of bits per channel
                                                                                                           saveOptions.ChannelBitsCount = 8;

                                                                                                           // The number of channels. One channel for each color component R,G,B,A
                                                                                                           saveOptions.ChannelsCount = 4;

                                                                                                           // The color mode
                                                                                                           saveOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Rgb;

                                                                                                           // No compression
                                                                                                           saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.Raw;

                                                                                                           // Default version is 6
                                                                                                           saveOptions.Version = 6;            

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.psd"))
                                                                                                           {
                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RAW compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.RLE.psd"))
                                                                                                           {
                                                                                                               // The RLE compression allows to reduce the size of the output image
                                                                                                               saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RLE compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           // The output may look like this:
                                                                                                           // The size of the PSD image with RAW compression: 40090
                                                                                                           // The size of the PSD image with RLE compression: 16185
                                                                                                       }

PsdVersion

ファイル形式のバージョンを取得または設定します. それはPSDまたはPSBかもしれません。

public PsdVersion PsdVersion { get; set; }

不動産価値

PsdVersion

RefreshImagePreviewData

[画像プレビューデータを更新するかどうかを示す値を取得または設定する] - 他のPSD画像視聴者との互換性を最大化するために使用されるオプション。注:最終配置まで描くテキスト層は、コンパクトフレームワークプラットフォームではサポートされていません。

public bool RefreshImagePreviewData { get; set; }

不動産価値

bool

RemoveGlobalTextEngineResource

得るか設定する値を示すかどうか - グローバルテキストエンジンリソースを削除するか - いくつかのテキスト層のPSDファイルに使用され、処理後に開くことができない場合にのみ(主に欠席のフォントに関連するテキスト層の場合)。このオプションを使用した後、ユーザーはフォトショップファイルで開いたメニュー「テキスト」 ->「プロセス欠席の文字」で次の作成を行う必要があります。この操作が最終的な配置の変更を引き起こす可能性があることに注意してください。

public bool RemoveGlobalTextEngineResource { get; set; }

不動産価値

bool

VectorizationOptions

受信または PSD ベクトリズム オプションを設定します。

public PsdVectorizationOptions VectorizationOptions { get; set; }

不動産価値

PsdVectorizationOptions

Version

PSDファイルのバージョンを取得または設定します。

public int Version { get; set; }

不動産価値

int

Examples

この例では、さまざまなPSD特定のオプションを使用してPNG画像をPSD形式に保存する方法を示しています。

string dir = "c:\\temp\\";

                                                                                                       // Create a PNG image of 100x100 px.
                                                                                                       using (Aspose.Imaging.FileFormats.Png.PngImage pngImage = new Aspose.Imaging.FileFormats.Png.PngImage(100, 100, Aspose.Imaging.FileFormats.Png.PngColorType.TruecolorWithAlpha))
                                                                                                       {
                                                                                                           // Define a linear blue-transparent gradient.
                                                                                                           Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                   new Aspose.Imaging.Point(0, 0),
                                                                                                                   new Aspose.Imaging.Point(pngImage.Width, pngImage.Height),
                                                                                                                   Aspose.Imaging.Color.Blue,
                                                                                                                   Aspose.Imaging.Color.Transparent);

                                                                                                           Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(pngImage);

                                                                                                           // Fill the PNG image with the linear blue-transparent gradient.
                                                                                                           graphics.FillRectangle(gradientBrush, pngImage.Bounds);

                                                                                                           // The following options will be used to save the PNG image to PSD format.
                                                                                                           Aspose.Imaging.ImageOptions.PsdOptions saveOptions = new Aspose.Imaging.ImageOptions.PsdOptions();

                                                                                                           // The number of bits per channel
                                                                                                           saveOptions.ChannelBitsCount = 8;

                                                                                                           // The number of channels. One channel for each color component R,G,B,A
                                                                                                           saveOptions.ChannelsCount = 4;

                                                                                                           // The color mode
                                                                                                           saveOptions.ColorMode = Aspose.Imaging.FileFormats.Psd.ColorModes.Rgb;

                                                                                                           // No compression
                                                                                                           saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.Raw;

                                                                                                           // Default version is 6
                                                                                                           saveOptions.Version = 6;            

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.psd"))
                                                                                                           {
                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RAW compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           using (System.IO.FileStream stream = System.IO.File.Create(dir + "saveoptions.RLE.psd"))
                                                                                                           {
                                                                                                               // The RLE compression allows to reduce the size of the output image
                                                                                                               saveOptions.CompressionMethod = Imaging.FileFormats.Psd.CompressionMethod.RLE;

                                                                                                               pngImage.Save(stream, saveOptions);
                                                                                                               System.Console.WriteLine("The size of the PSD image with RLE compression: {0}", stream.Length);
                                                                                                           }

                                                                                                           // The output may look like this:
                                                                                                           // The size of the PSD image with RAW compression: 40090
                                                                                                           // The size of the PSD image with RLE compression: 16185
                                                                                                       }

XmpData

XMP データコンテナを取得または設定する

public override XmpPacketWrapper XmpData { get; set; }

不動産価値

XmpPacketWrapper

 日本語