Class JpegImage

Class JpegImage

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

API を使用して JPEG ラスター画像を効率的に操作し、サポートを提供します。RGBやCMYKなどの色のプロファイル、ピクセルごとにカスタマイズ可能なビットEXIF、JFIF、XMPメタデータコンテナの解像度および処理オリエンテーションデータに基づく自動回転をお楽しみください。損失のないJPEGを含む圧縮レベルは、最適な画像品質を達成するためにあなたのプロジェクトのためのバランスのサイズをファイルします。

[JsonObject(MemberSerialization.OptIn)]
public sealed class JpegImage : RasterCachedImage, IDisposable, IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader, IHasXmpData, IHasJpegExifData, IHasExifData, IHasMetadata

Inheritance

object DisposableObject DataStreamSupporter Image RasterImage RasterCachedImage JpegImage

Implements

IDisposable , IObjectWithBounds , IRasterImageArgb32PixelLoader , IRasterImageRawDataLoader , IHasXmpData , IHasJpegExifData , IHasExifData , IHasMetadata

相続人

RasterCachedImage.CacheData() , RasterCachedImage.Blend(Point, RasterImage, Rectangle, byte) , RasterCachedImage.Resize(int, int, ResizeType) , RasterCachedImage.Resize(int, int, ImageResizeSettings) , RasterCachedImage.RotateFlip(RotateFlipType) , RasterCachedImage.Rotate(float, bool, Color) , RasterCachedImage.Crop(Rectangle) , RasterCachedImage.Dither(DitheringMethod, int, IColorPalette) , RasterCachedImage.Grayscale() , RasterCachedImage.NormalizeHistogram() , RasterCachedImage.BinarizeFixed(byte) , RasterCachedImage.BinarizeOtsu() , RasterCachedImage.BinarizeBradley(double, int) , RasterCachedImage.BinarizeBradley(double) , RasterCachedImage.AdjustBrightness(int) , RasterCachedImage.AdjustContrast(float) , RasterCachedImage.AdjustGamma(float, float, float) , RasterCachedImage.AdjustGamma(float) , RasterCachedImage.IsCached , RasterImage.RemoveMetadata() , RasterImage.Save(Stream, ImageOptionsBase, Rectangle) , RasterImage.GetModifyDate(bool) , RasterImage.Dither(DitheringMethod, int) , RasterImage.Dither(DitheringMethod, int, IColorPalette) , RasterImage.GetDefaultPixels(Rectangle, IPartialArgb32PixelLoader) , RasterImage.GetDefaultRawData(Rectangle, IPartialRawDataLoader, RawDataSettings) , RasterImage.GetDefaultArgb32Pixels(Rectangle) , RasterImage.GetDefaultRawData(Rectangle, RawDataSettings) , RasterImage.GetArgb32Pixel(int, int) , RasterImage.GetPixel(int, int) , RasterImage.SetArgb32Pixel(int, int, int) , RasterImage.SetPixel(int, int, Color) , RasterImage.ReadScanLine(int) , RasterImage.ReadArgb32ScanLine(int) , RasterImage.WriteScanLine(int, Color[]) , RasterImage.WriteArgb32ScanLine(int, int[]) , RasterImage.LoadPartialArgb32Pixels(Rectangle, IPartialArgb32PixelLoader) , RasterImage.LoadPartialPixels(Rectangle, IPartialPixelLoader) , RasterImage.LoadArgb32Pixels(Rectangle) , RasterImage.LoadArgb64Pixels(Rectangle) , RasterImage.LoadPartialArgb64Pixels(Rectangle, IPartialArgb64PixelLoader) , RasterImage.LoadPixels(Rectangle) , RasterImage.LoadCmykPixels(Rectangle) , RasterImage.LoadCmyk32Pixels(Rectangle) , RasterImage.LoadRawData(Rectangle, RawDataSettings, IPartialRawDataLoader) , RasterImage.LoadRawData(Rectangle, Rectangle, RawDataSettings, IPartialRawDataLoader) , RasterImage.SaveRawData(byte[], int, Rectangle, RawDataSettings) , RasterImage.SaveArgb32Pixels(Rectangle, int[]) , RasterImage.SavePixels(Rectangle, Color[]) , RasterImage.SaveCmykPixels(Rectangle, CmykColor[]) , RasterImage.SaveCmyk32Pixels(Rectangle, int[]) , RasterImage.SetResolution(double, double) , RasterImage.SetPalette(IColorPalette, bool) , RasterImage.Resize(int, int, ImageResizeSettings) , RasterImage.Rotate(float, bool, Color) , RasterImage.Rotate(float) , RasterImage.BinarizeFixed(byte) , RasterImage.BinarizeOtsu() , RasterImage.BinarizeBradley(double) , RasterImage.BinarizeBradley(double, int) , RasterImage.Blend(Point, RasterImage, Rectangle, byte) , RasterImage.Blend(Point, RasterImage, byte) , RasterImage.Grayscale() , RasterImage.NormalizeHistogram() , RasterImage.AdjustBrightness(int) , RasterImage.AdjustContrast(float) , RasterImage.AdjustGamma(float, float, float) , RasterImage.AdjustGamma(float) , RasterImage.GetSkewAngle() , RasterImage.NormalizeAngle() , RasterImage.NormalizeAngle(bool, Color) , RasterImage.Filter(Rectangle, FilterOptionsBase) , RasterImage.ReplaceColor(Color, byte, Color) , RasterImage.ReplaceColor(int, byte, int) , RasterImage.ReplaceNonTransparentColors(Color) , RasterImage.ReplaceNonTransparentColors(int) , RasterImage.ToBitmap() , RasterImage.PremultiplyComponents , RasterImage.UseRawData , RasterImage.UpdateXmpData , RasterImage.XmpData , RasterImage.RawIndexedColorConverter , RasterImage.RawCustomColorConverter , RasterImage.RawFallbackIndex , RasterImage.RawDataSettings , RasterImage.UsePalette , RasterImage.RawDataFormat , RasterImage.RawLineSize , RasterImage.IsRawDataAvailable , RasterImage.HorizontalResolution , RasterImage.VerticalResolution , RasterImage.HasTransparentColor , RasterImage.HasAlpha , RasterImage.TransparentColor , RasterImage.ImageOpacity , Image.CanLoad(string) , Image.CanLoad(string, LoadOptions) , Image.CanLoad(Stream) , Image.CanLoad(Stream, LoadOptions) , Image.Create(ImageOptionsBase, int, int) , Image.Create(Image[]) , Image.Create(MultipageCreateOptions) , Image.Create(string[], bool) , Image.Create(string[]) , Image.Create(Image[], bool) , Image.GetFileFormat(string) , Image.GetFileFormat(Stream) , Image.GetFittingRectangle(Rectangle, int, int) , Image.GetFittingRectangle(Rectangle, int[], int, int) , Image.Load(string, LoadOptions) , Image.Load(string) , Image.Load(Stream, LoadOptions) , Image.Load(Stream) , Image.GetProportionalWidth(int, int, int) , Image.GetProportionalHeight(int, int, int) , Image.RemoveMetadata() , Image.CanSave(ImageOptionsBase) , Image.Resize(int, int) , Image.Resize(int, int, ResizeType) , Image.Resize(int, int, ImageResizeSettings) , Image.GetDefaultOptions(object[]) , Image.GetOriginalOptions() , Image.ResizeWidthProportionally(int) , Image.ResizeHeightProportionally(int) , Image.ResizeWidthProportionally(int, ResizeType) , Image.ResizeHeightProportionally(int, ResizeType) , Image.ResizeWidthProportionally(int, ImageResizeSettings) , Image.ResizeHeightProportionally(int, ImageResizeSettings) , Image.RotateFlip(RotateFlipType) , Image.Rotate(float) , Image.Crop(Rectangle) , Image.Crop(int, int, int, int) , Image.Save() , Image.Save(string) , Image.Save(string, ImageOptionsBase) , Image.Save(string, ImageOptionsBase, Rectangle) , Image.Save(Stream, ImageOptionsBase) , Image.Save(Stream, ImageOptionsBase, Rectangle) , Image.GetSerializedStream(ImageOptionsBase, Rectangle, out int) , Image.SetPalette(IColorPalette, bool) , Image.BitsPerPixel , Image.Bounds , Image.Container , Image.Height , Image.Palette , Image.UsePalette , Image.Size , Image.Width , Image.InterruptMonitor , Image.BufferSizeHint , Image.AutoAdjustPalette , Image.HasBackgroundColor , Image.FileFormat , Image.BackgroundColor , DataStreamSupporter.CacheData() , DataStreamSupporter.Save() , DataStreamSupporter.Save(Stream) , DataStreamSupporter.Save(string) , DataStreamSupporter.Save(string, bool) , DataStreamSupporter.DataStreamContainer , DataStreamSupporter.IsCached , DisposableObject.Dispose() , DisposableObject.Disposed , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

アクセスカメラメーカーのノートは、Jpeg画像に表示されます。

using (var image = (JpegImage)Image.Load("Sample.jpg"))
                                                                {
                                                                    foreach (var makerNote in image.ExifData.MakerNotes)
                                                                    {
                                                                        Console.WriteLine("Name = {0}, Value = {1}", makerNote.Name, makerNote.Value);
                                                                    }
                                                                }

例では、ファイルから JpegImage をアップロードする方法を示しています。

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

                                                                 // Load a JPEG image from a file.
                                                                 using (Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = new Aspose.Imaging.FileFormats.Jpeg.JpegImage(dir + "sample.jpg"))
                                                                 {
                                                                     // Do some image processing.
                                                                     // Save to another JPEG file.
                                                                     jpegImage.Save(dir + "sample.output.jpg");
                                                                 }

Constructors

JpegImage(ストレッチ)

Aspose.Imaging.FileFormats.Jpeg.JpegImage クラスは、そのクラスを呼び出すことによって、努力なくスタートします。定められた道のパラメーターを搭載した構造器 この構造器は、シールドなしを可能にするJPEG画像を作成し、プロジェクトに迅速な統合を確保します。

public JpegImage(string path)

Parameters

path string

画像をアップロードし、ピクセルとパレットデータを開始するための道です。

Examples

例では、ファイルから JpegImage をアップロードする方法を示しています。

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

                                                                 // Load a JPEG image from a file.
                                                                 using (Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = new Aspose.Imaging.FileFormats.Jpeg.JpegImage(dir + "sample.jpg"))
                                                                 {
                                                                     // Do some image processing.
                                                                     // Save to another JPEG file.
                                                                     jpegImage.Save(dir + "sample.output.jpg");
                                                                 }

JpegImage(Stream)

Aspose.Imaging.FileFormats.Jpeg.JpegImage クラスを使用して JPEG イメージ オブジェクトを開始します。ストリームパラメーター この構築器は、JPEGで作業するプロセスを簡素化します画像、プロジェクトに統合するためのシンプルなアプローチを提供無力で。

public JpegImage(Stream stream)

Parameters

stream Stream

ストリームから画像をアップロードし、ピクセルとパレットデータを開始します。

Examples

例では、ファイルストリームからJpegImageをアップロードする方法を示しています。

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

                                                                        // Load a JPEG image from a file stream.
                                                                        using (System.IO.Stream stream = System.IO.File.OpenRead(dir + "sample.jpg"))
                                                                        {
                                                                            using (Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = new Aspose.Imaging.FileFormats.Jpeg.JpegImage(stream))
                                                                            {
                                                                                // Do some image processing.
                                                                                // Save to another JPEG file.
                                                                                jpegImage.Save(dir + "sample.output.jpg");
                                                                            }
                                                                        }

JpegImage(RasterImage)

Aspose.Imaging.FileFormats.Jpeg.JpegImage クラスの新しい例を、ラスター画像で開始します。この構築器は、JPEG画像を作成するための便利な方法を提供します。ラスター画像から直接、JPEG画像で作業するためのワークフローを簡素化するあなたのアプリケーション

public JpegImage(RasterImage rasterImage)

Parameters

rasterImage RasterImage

画像は、ピクセルとパレットデータを開始します。

Examples

例では、別の RasterImage から JpegImage をアップロードする方法を示しています。

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

                                                                              // Load a JPEG image from another raster image.
                                                                              // First, create a temporal PNG image that will be a foundation for building a JPEG image.
                                                                              // You can also load PNG image from a file or use an image of any other raster format.
                                                                              Aspose.Imaging.ImageOptions.PngOptions createOptions = new Aspose.Imaging.ImageOptions.PngOptions();
                                                                              createOptions.Source = new Aspose.Imaging.Sources.StreamSource(new System.IO.MemoryStream(), false);
                                                                              using (Aspose.Imaging.RasterImage rasterImage = (Aspose.Imaging.RasterImage)Aspose.Imaging.Image.Create(createOptions, 100, 100))
                                                                              {
                                                                                  // Fill the entire PNG image in red.
                                                                                  Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(rasterImage);
                                                                                  Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
                                                                                  graphics.FillRectangle(brush, rasterImage.Bounds);

                                                                                  // Create a JPEG image based on the PNG image.
                                                                                  using (Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = new Aspose.Imaging.FileFormats.Jpeg.JpegImage(rasterImage))
                                                                                  {
                                                                                      // Save to a JPEG file
                                                                                      jpegImage.Save(dir + "output.jpg");
                                                                                  }
                                                                              }

JpegImage(int、 int)

Aspose.Imaging.FileFormats.Jpeg.JpegImage クラスの新しい例を作成するこの構築器は、JPEG画像を作成することを可能にしますカスタマイズされたサイズで、アプリケーション内の画像サイズを管理するための柔軟性を提供します。

public JpegImage(int width, int height)

Parameters

width int

画像の幅

height int

画像の高さ。

Examples

下記の例では、指定されたサイズのJPEG画像を作成する方法を示しています。

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

                                                                                      // Create a JPEG image of 100x100 px.
                                                                                      using (Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = new Aspose.Imaging.FileFormats.Jpeg.JpegImage(100, 100))
                                                                                      {
                                                                                          // Do some image processing.
                                                                                          // Save to a file.
                                                                                          jpegImage.Save(dir + "output.jpg");
                                                                                      }

次の例では、BMP 画像をアップロードし、さまざまな保存オプションを使用して JPEG に保存します。

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

                                                                                                   // Load a BMP image from a file.
                                                                                                   using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.bmp"))
                                                                                                   {
                                                                                                       // Do some image processing.

                                                                                                       // Use additional options to specify the desired image parameters.
                                                                                                       Aspose.Imaging.ImageOptions.JpegOptions saveOptions = new Aspose.Imaging.ImageOptions.JpegOptions();

                                                                                                       // The number of bits per channel is 8.
                                                                                                       // When a palette is used, the color index is stored in the image data instead of the color itself.
                                                                                                       saveOptions.BitsPerChannel = 8;

                                                                                                       // Set the progressive type of compression.
                                                                                                       saveOptions.CompressionType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionMode.Progressive;

                                                                                                       // Set the image quality. It is a value between 1 and 100.
                                                                                                       saveOptions.Quality = 100;

                                                                                                       // Set the horizontal/vertical resolution to 96 dots per inch.
                                                                                                       saveOptions.ResolutionSettings = new Aspose.Imaging.ResolutionSetting(96.0, 96.0);
                                                                                                       saveOptions.ResolutionUnit = Aspose.Imaging.ResolutionUnit.Inch;

                                                                                                       // If the source image is colored, it will be converted to grayscaled.
                                                                                                       saveOptions.ColorType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionColorMode.Grayscale;

                                                                                                       // Use a palette to reduce the output size.
                                                                                                       saveOptions.Palette = Aspose.Imaging.ColorPaletteHelper.Create8BitGrayscale(false);

                                                                                                       image.Save(dir + "sample.palettized.jpg", saveOptions);
                                                                                                   }

JpegImage(JpegOptions、 int、 int)

新しい Aspose.Imaging.FileFormats.Jpeg.JpegImage オブジェクトを提供された JPEG オプションで開始します。この構築機は、JPEG画像のさまざまな設定を調整することを可能にします。圧縮レベル、品質、および追加パラメーターとして、正確なコントロールを提供結果の画像形式について。

public JpegImage(JpegOptions jpegOptions, int width, int height)

Parameters

jpegOptions JpegOptions

JPEGのオプション

width int

画像幅

height int

画像の高さ

Examples

次の例では、BMP 画像をアップロードし、さまざまな保存オプションを使用して JPEG に保存します。

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

                                                                                                   // Load a BMP image from a file.
                                                                                                   using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.bmp"))
                                                                                                   {
                                                                                                       // Do some image processing.

                                                                                                       // Use additional options to specify the desired image parameters.
                                                                                                       Aspose.Imaging.ImageOptions.JpegOptions saveOptions = new Aspose.Imaging.ImageOptions.JpegOptions();

                                                                                                       // The number of bits per channel is 8.
                                                                                                       // When a palette is used, the color index is stored in the image data instead of the color itself.
                                                                                                       saveOptions.BitsPerChannel = 8;

                                                                                                       // Set the progressive type of compression.
                                                                                                       saveOptions.CompressionType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionMode.Progressive;

                                                                                                       // Set the image quality. It is a value between 1 and 100.
                                                                                                       saveOptions.Quality = 100;

                                                                                                       // Set the horizontal/vertical resolution to 96 dots per inch.
                                                                                                       saveOptions.ResolutionSettings = new Aspose.Imaging.ResolutionSetting(96.0, 96.0);
                                                                                                       saveOptions.ResolutionUnit = Aspose.Imaging.ResolutionUnit.Inch;

                                                                                                       // If the source image is colored, it will be converted to grayscaled.
                                                                                                       saveOptions.ColorType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionColorMode.Grayscale;

                                                                                                       // Use a palette to reduce the output size.
                                                                                                       saveOptions.Palette = Aspose.Imaging.ColorPaletteHelper.Create8BitGrayscale(false);

                                                                                                       image.Save(dir + "sample.palettized.jpg", saveOptions);
                                                                                                   }

下記の例では、指定されたパラメーターで指定されたサイズのJPEG画像を作成する方法を示しています。

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

                                                                                                                    // Create a JPEG image of 100x100 px.
                                                                                                                    // Use additional options to specify the desired image parameters.
                                                                                                                    Aspose.Imaging.ImageOptions.JpegOptions createOptions = new Aspose.Imaging.ImageOptions.JpegOptions();

                                                                                                                    // The number of bits per channel is 8, 8, 8 for Y, Cr, Cb components accordingly.
                                                                                                                    createOptions.BitsPerChannel = 8;

                                                                                                                    // Set the progressive type of compression.
                                                                                                                    createOptions.CompressionType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionMode.Progressive;

                                                                                                                    // Set the image quality. It is a value between 1 and 100.
                                                                                                                    createOptions.Quality = 100;

                                                                                                                    // Set the horizontal/vertical resolution to 96 dots per inch.
                                                                                                                    createOptions.ResolutionSettings = new Aspose.Imaging.ResolutionSetting(96.0, 96.0);
                                                                                                                    createOptions.ResolutionUnit = Aspose.Imaging.ResolutionUnit.Inch;

                                                                                                                    // This is a standard option for JPEG images.
                                                                                                                    // Two chroma components (Cb and Cr) can be bandwidth-reduced, subsampled, compressed.
                                                                                                                    createOptions.ColorType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionColorMode.YCbCr;

                                                                                                                    using (Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = new Aspose.Imaging.FileFormats.Jpeg.JpegImage(createOptions, 100, 100))
                                                                                                                    {
                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(jpegImage);

                                                                                                                        Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                            new Aspose.Imaging.Point(0, 0),
                                                                                                                            new Aspose.Imaging.Point(jpegImage.Width, jpegImage.Height),
                                                                                                                            Aspose.Imaging.Color.Yellow,
                                                                                                                            Aspose.Imaging.Color.Blue);

                                                                                                                        // Fill the image with a grayscale gradient
                                                                                                                        graphics.FillRectangle(gradientBrush, jpegImage.Bounds);

                                                                                                                        // Save to a file.
                                                                                                                        jpegImage.Save(dir + "output.explicitoptions.jpg");
                                                                                                                    }

Properties

BitsPerPixel

この特性で画像のピクセル深さを無力に回復し、提供します。色の豊かさやグレイスケールの表現を理解するかどうかにかかわらず、振動的な写真またはモノクロムのイラストで、この特性は重要なものを提供します。画像の視覚的複雑さについての情報

public override int BitsPerPixel { get; }

不動産価値

int

CmykColorProfile

CMYKおよびYCCK JPEG画像に関連するCMYK色プロファイルは、正確性を保証します。色の変換と忠誠度. それはRGBColorProfileと共に動作します。さまざまなデバイスやアプリケーションで正確な色の表現を保証します。このカップリングは、色のレンダリングにおける一貫性を維持するために重要であり、最適な画像の質を達成する。

public StreamSource CmykColorProfile { get; set; }

不動産価値

StreamSource

Examples

下記の例では、CMYK JPEGをカスタマイズしてCMYK JPEGにロードして保存します。その後、CMYK JPEGをカスタマイズしてPNGに保存します。

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

                                                                                                                                                                                                                                                // Load PNG and save it to CMYK JPEG
                                                                                                                                                                                                                                                using (Aspose.Imaging.FileFormats.Png.PngImage image = (Aspose.Imaging.FileFormats.Png.PngImage)Image.Load(dir + "sample.png"))
                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                    using (System.IO.Stream rgbProfileStream = System.IO.File.OpenRead(dir + "eciRGB_v2.icc"))
                                                                                                                                                                                                                                                    using (System.IO.Stream cmykProfileStream = System.IO.File.OpenRead(dir + "ISOcoated_v2_FullGamut4.icc"))
                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                        Aspose.Imaging.ImageOptions.JpegOptions saveOptions = new Aspose.Imaging.ImageOptions.JpegOptions();
                                                                                                                                                                                                                                                        saveOptions.ColorType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionColorMode.Cmyk;

                                                                                                                                                                                                                                                        // Use custom ICC profiles
                                                                                                                                                                                                                                                        saveOptions.RgbColorProfile = new Aspose.Imaging.Sources.StreamSource(rgbProfileStream);
                                                                                                                                                                                                                                                        saveOptions.CmykColorProfile = new Aspose.Imaging.Sources.StreamSource(cmykProfileStream);

                                                                                                                                                                                                                                                        image.Save(dir + "output.cmyk.jpg", saveOptions);
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                // Load CMYK JPEG and save it to PNG
                                                                                                                                                                                                                                                using (Aspose.Imaging.FileFormats.Jpeg.JpegImage image = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)Image.Load(dir + "output.cmyk.jpg"))
                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                    using (System.IO.Stream rgbProfileStream = System.IO.File.OpenRead(dir + "eciRGB_v2.icc"))
                                                                                                                                                                                                                                                    using (System.IO.Stream cmykProfileStream = System.IO.File.OpenRead(dir + "ISOcoated_v2_FullGamut4.icc"))
                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                        // Use custom ICC profiles
                                                                                                                                                                                                                                                        image.RgbColorProfile = new Aspose.Imaging.Sources.StreamSource(rgbProfileStream);
                                                                                                                                                                                                                                                        image.CmykColorProfile = new Aspose.Imaging.Sources.StreamSource(cmykProfileStream);

                                                                                                                                                                                                                                                        Aspose.Imaging.ImageOptions.PngOptions saveOptions = new Aspose.Imaging.ImageOptions.PngOptions();
                                                                                                                                                                                                                                                        image.Save(dir + "output.rgb.png", saveOptions);
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }

Comment

この属性で JPEG ファイルのコメントを管理し、追加またはリリースできます。イメージに関連する記述的な記述. それが画像をタグしているかどうかメタデータまたは追加の文脈を示すことで、この特性は柔軟性を提供します。JPEGファイルの組織化とカテゴリ化

public string Comment { get; set; }

不動産価値

string

DestinationCmykColorProfile

CMYKの色プロファイルは、CMYKとYCCKの正確な色変換に不可欠です。節約プロセスの間に JPEG 画像. RGBColorProfile と共に動作します。色の正しい表現を確保し、一貫性と品質を維持するさまざまなデバイスやソフトウェア. この同期は、達成に不可欠です。最後の保存された画像で正確かつ信頼性の高い色の表示。

public StreamSource DestinationCmykColorProfile { get; set; }

不動産価値

StreamSource

DestinationRgbColorProfile

RGBColorProfileは、CMYKとYCCKの正確な色変換に不可欠です。保存プロセス中の JPEG 画像. CMYKColorProfile でパイアリングされた場合、色が正しく表示され、一貫性を維持することを保証します。さまざまなデバイスとアプリケーション. この組み合わせは、保存に不可欠です。目的の色の表現と高品質の画像の生産を達成する。

public StreamSource DestinationRgbColorProfile { get; set; }

不動産価値

StreamSource

ExifData

EXIF データをこの属性で管理し、メタデータを追加または取得することができます。画像に関連しているかどうかにかかわらず、カメラに関する情報を抽出しているか設定または既存のメタデータを変更する場合、この属性は柔軟性を提供します。EXIFデータコンテナの管理

public JpegExifData ExifData { get; set; }

不動産価値

JpegExifData

Examples

下記の例では、JPEG画像からEXIFタグを抽出する方法を示しています。

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

                                                                                  using (Aspose.Imaging.FileFormats.Jpeg.JpegImage image = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)Image.Load(dir + "original.jpg"))
                                                                                  {
                                                                                      Aspose.Imaging.Exif.ExifData exifData = image.ExifData;

                                                                                      System.Console.WriteLine("The general EXIF data");
                                                                                      System.Console.WriteLine("------------------------------------------");
                                                                                      if (exifData != null)
                                                                                      {
                                                                                          System.Console.WriteLine("The EXIF version: {0}", exifData.ExifVersion);
                                                                                          System.Console.WriteLine("The camera serial number: {0}", exifData.BodySerialNumber);
                                                                                          System.Console.WriteLine("The color space: {0}", exifData.ColorSpace);
                                                                                          System.Console.WriteLine("The brightness: {0}", exifData.BrightnessValue);
                                                                                          System.Console.WriteLine("The contrast: {0}", exifData.Contrast);
                                                                                          System.Console.WriteLine("The gamma: {0}", exifData.Gamma);
                                                                                          System.Console.WriteLine("The sharpness: {0}", exifData.Sharpness);
                                                                                          System.Console.WriteLine("The aperture: {0}", exifData.ApertureValue);
                                                                                          System.Console.WriteLine("The exposure mode: {0}", exifData.ExposureMode);
                                                                                          System.Console.WriteLine("The exposure bias: {0}", exifData.ExposureBiasValue);
                                                                                          System.Console.WriteLine("The exposure time: {0}", exifData.ExposureTime);
                                                                                          System.Console.WriteLine("The focal length: {0}", exifData.FocalLength);
                                                                                          System.Console.WriteLine("The focal plane resolution unit: {0}", exifData.FocalPlaneResolutionUnit);
                                                                                          System.Console.WriteLine("The lens model: {0}", exifData.LensModel);
                                                                                          System.Console.WriteLine("The shutter speed: {0}", exifData.ShutterSpeedValue);
                                                                                      }

                                                                                      System.Console.WriteLine("The JPEG EXIF data");
                                                                                      System.Console.WriteLine("------------------------------------------");
                                                                                      Aspose.Imaging.Exif.JpegExifData jpegExifData = image.ExifData as Aspose.Imaging.Exif.JpegExifData;
                                                                                      if (jpegExifData != null)
                                                                                      {
                                                                                          System.Console.WriteLine("The camera manufacturer: {0}", jpegExifData.Make);
                                                                                          System.Console.WriteLine("The camera model: {0}", jpegExifData.Model);
                                                                                          System.Console.WriteLine("The photometric interpretation: {0}", jpegExifData.PhotometricInterpretation);
                                                                                          System.Console.WriteLine("The artist: {0}", jpegExifData.Artist);
                                                                                          System.Console.WriteLine("The copyright: {0}", jpegExifData.Copyright);
                                                                                          System.Console.WriteLine("The image description: {0}", jpegExifData.ImageDescription);
                                                                                          System.Console.WriteLine("The orientation: {0}", jpegExifData.Orientation);
                                                                                          System.Console.WriteLine("The software: {0}", jpegExifData.Software);
                                                                                      }
                                                                                  }

                                                                                  //The output looks like this:
                                                                                  //The general EXIF data
                                                                                  //------------------------------------------
                                                                                  //The EXIF version: System.Byte[]
                                                                                  //The camera serial number: 7100536
                                                                                  //The color space: SRgb
                                                                                  //The brightness:
                                                                                  //The contrast: Normal
                                                                                  //The gamma:
                                                                                  //The sharpness: 0
                                                                                  //The aperture: 4.64(4643856 / 1000000)
                                                                                  //The exposure mode: Manual
                                                                                  //The exposure bias: 0.67(4 / 6)
                                                                                  //The exposure time: 0.01(1 / 160)
                                                                                  //The focal length: 145.00(1450 / 10)
                                                                                  //The focal plane resolution unit: Cm
                                                                                  //The lens model: 70.0 - 200.0 mm f/ 4.0
                                                                                  //The shutter speed: 7.32(7321928 / 1000000)
                                                                                  //The JPEG EXIF data
                                                                                  //------------------------------------------
                                                                                  //The camera manufacturer: NIKON CORPORATION
                                                                                  //The camera model: NIKON D5
                                                                                  //The photometric interpretation: 0
                                                                                  //The artist: 
                                                                                  //The copyright: 
                                                                                  //The image description:
                                                                                  //The orientation: TopLeft
                                                                                  //The software: Adobe Photoshop Camera Raw 9.9(Macintosh)

FileFormat

この特性で画像のフォーマットを無力に回復します。ファイル形式への貴重な洞察を提供し、無形の統合を支援し、さまざまなプラットフォームやアプリケーションで互換性をチェックします。

public override FileFormat FileFormat { get; }

不動産価値

FileFormat

Height

この特性で画像の高さを無力に回復します。画像の垂直サイズへのアクセスを可能にし、効率的にサイズと側面の比率を、複雑な計算の必要性なしに決定するか、または追加方法

public override int Height { get; }

不動産価値

int

HorizontalResolution

この財産は、あなたが地平線の解像度へのアクセスを提供します。Aspose.Imaging.RasterImage は、インチごとにピクセルで測定されます。この値では、画像の解像度を正確に制御し、それを確保することができます。あなたの特定の品質と明確性の要件を満たしています。

public override double HorizontalResolution { get; set; }

不動産価値

double

Examples

下記の例では、JPEG画像の水平/垂直解像度を設定する方法を示しています。

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

                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.jpg"))
                                                                                                 {
                                                                                                     Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)image;

                                                                                                     // Get horizontal and vertical resolution of the BmpImage
                                                                                                     double horizontalResolution = jpegImage.HorizontalResolution;
                                                                                                     double verticalResolution = jpegImage.VerticalResolution;
                                                                                                     System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", horizontalResolution);
                                                                                                     System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", verticalResolution);

                                                                                                     if (horizontalResolution != 96.0 || verticalResolution != 96.0)
                                                                                                     {
                                                                                                         // Use the SetResolution method for updating both resolution values in a single call.
                                                                                                         System.Console.WriteLine("Set resolution values to 96 dpi");
                                                                                                         jpegImage.SetResolution(96.0, 96.0);

                                                                                                         System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", jpegImage.HorizontalResolution);
                                                                                                         System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", jpegImage.VerticalResolution);
                                                                                                     }

                                                                                                     // The output may look like this:
                                                                                                     // The horizontal resolution, in pixels per inch: 300
                                                                                                     // The vertical resolution, in pixels per inch: 300
                                                                                                     // Set resolution values to 96 dpi
                                                                                                     // The horizontal resolution, in pixels per inch: 96
                                                                                                     // The vertical resolution, in pixels per inch: 96
                                                                                                 }

Remarks

デフォルトでこの値は、異なるプラットフォームがスクリーン解像度を返すことができないため、常に96です。

IgnoreEmbeddedColorProfile

フラッグをリトレートまたは変更し、組み込まれた色のプロファイルが表示されるかどうかを示す。このフラッグを設定することで、ユーザーはデフォルト色が表示されるかどうかを指定することができます。プロフィールは組み込まれた1の代わりに使用する必要があります. このオプションは、より大きな色管理のコントロール、一貫性の調整を促進し、さまざまなプラットフォームやアプリケーションで互換性があります。

public bool IgnoreEmbeddedColorProfile { get; set; }

不動産価値

bool

Jfif

この属性により、JFIF(JPEGファイル交換)にアクセスまたは変更できます。フォーマット) JPEG イメージに関連するデータ. JFIF は標準形式です。JPEGで圧縮された画像をコンピュータと他のデバイスの間で交換する。またはこの属性を設定すると、JFIFデータと相互作用することができます。例えば、画像の解像度、側面比率、および小さな点。

public JFIFData Jfif { get; set; }

不動産価値

JFIFData

JpegOptions

JPEG オプションの作成またはアップロード中に使用されたアクセスを得るAspose.Imaging.FileFormats.Jpeg.JpegImage 例を簡単に表示します. この施設は貴重な詳細を提供しています使用された特定の設定について、ユーザーが理解し、複製することを可能にする画像処理作業の流れは効果的に. それが圧縮レベルであるかどうか、品質設定、またはその他のパラメーター、この属性は、基本的な洞察を提供します。無形のイメージ操作

public JpegOptions JpegOptions { get; }

不動産価値

JpegOptions

Examples

下記の例では、JPEG画像からヘッダー情報を抽出する方法を示しています。

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

                                                                                               using (Aspose.Imaging.FileFormats.Jpeg.JpegImage image = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)Image.Load(dir + "original.jpg"))
                                                                                               {
                                                                                                   Aspose.Imaging.ImageOptions.JpegOptions jpegOptions = image.JpegOptions;

                                                                                                   System.Console.WriteLine("The number of bits per channel: {0}", jpegOptions.BitsPerChannel);
                                                                                                   System.Console.WriteLine("The max allowed size for all internal buffers: {0}", jpegOptions.BufferSizeHint);
                                                                                                   System.Console.WriteLine("The color type: {0}", jpegOptions.ColorType);
                                                                                                   System.Console.WriteLine("The compression type: {0}", jpegOptions.CompressionType);
                                                                                                   System.Console.WriteLine("The image quality: {0}", jpegOptions.Quality);

                                                                                                   if (jpegOptions.ResolutionSettings != null)
                                                                                                   {
                                                                                                       System.Console.WriteLine("The horizontal resolution: {0}", jpegOptions.ResolutionSettings.HorizontalResolution);
                                                                                                       System.Console.WriteLine("The vertical resolution: {0}", jpegOptions.ResolutionSettings.VerticalResolution);
                                                                                                   }

                                                                                                   for (int i = 0; i < jpegOptions.HorizontalSampling.Length; i++)
                                                                                                   {
                                                                                                       System.Console.WriteLine("The sampling for component {0}: {1}x{2}", i, jpegOptions.HorizontalSampling[i], jpegOptions.VerticalSampling[i]);
                                                                                                   }
                                                                                               }

                                                                                               //The output looks like this:
                                                                                               //The number of bits per channel: 8
                                                                                               //The max allowed size for all internal buffers: 0
                                                                                               //The color type: YCbCr
                                                                                               //The compression type: Baseline
                                                                                               //The image quality: 75
                                                                                               //The sampling for component 0: 1x1
                                                                                               //The sampling for component 1: 1x1
                                                                                               //The sampling for component 2: 1x1

RawDataFormat

この財産は、画像の原料データ形式を取得し、その結果、画像データは構造化され、暗号化されます。画像データを効率的に処理または操作するために不可欠です。イメージの基本的な表現を理解する、例えば、それが圧縮、特定の色のスペースに暗号化、または特定のファイルに保存この属性へのアクセスにより、貴重な情報を得ることができます。画像のデータ構造で、さまざまな操作や最適化を行うことができます。具体的なフォーマットに適応する。

public override PixelDataFormat RawDataFormat { get; }

不動産価値

PixelDataFormat

RgbColorProfile

CMYKおよびYCCK JPEG画像のRGB色プロファイルは、正確な色を保証します。変換および表現. それはCMYKColorProfileとパイロットされなければなりません色の表現における一貫性と忠誠を維持し、このカップリングは不可欠です。画像の正確な色管理と再生を必要とするアプリケーションRGBデータが適切に解釈され、表示されることを確保する。

public StreamSource RgbColorProfile { get; set; }

不動産価値

StreamSource

Examples

下記の例では、CMYK JPEGをカスタマイズしてCMYK JPEGにロードして保存します。その後、CMYK JPEGをカスタマイズしてPNGに保存します。

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

                                                                                                                                                                                                                                                // Load PNG and save it to CMYK JPEG
                                                                                                                                                                                                                                                using (Aspose.Imaging.FileFormats.Png.PngImage image = (Aspose.Imaging.FileFormats.Png.PngImage)Image.Load(dir + "sample.png"))
                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                    using (System.IO.Stream rgbProfileStream = System.IO.File.OpenRead(dir + "eciRGB_v2.icc"))
                                                                                                                                                                                                                                                    using (System.IO.Stream cmykProfileStream = System.IO.File.OpenRead(dir + "ISOcoated_v2_FullGamut4.icc"))
                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                        Aspose.Imaging.ImageOptions.JpegOptions saveOptions = new Aspose.Imaging.ImageOptions.JpegOptions();
                                                                                                                                                                                                                                                        saveOptions.ColorType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionColorMode.Cmyk;

                                                                                                                                                                                                                                                        // Use custom ICC profiles
                                                                                                                                                                                                                                                        saveOptions.RgbColorProfile = new Aspose.Imaging.Sources.StreamSource(rgbProfileStream);
                                                                                                                                                                                                                                                        saveOptions.CmykColorProfile = new Aspose.Imaging.Sources.StreamSource(cmykProfileStream);

                                                                                                                                                                                                                                                        image.Save(dir + "output.cmyk.jpg", saveOptions);
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                // Load CMYK JPEG and save it to PNG
                                                                                                                                                                                                                                                using (Aspose.Imaging.FileFormats.Jpeg.JpegImage image = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)Image.Load(dir + "output.cmyk.jpg"))
                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                    using (System.IO.Stream rgbProfileStream = System.IO.File.OpenRead(dir + "eciRGB_v2.icc"))
                                                                                                                                                                                                                                                    using (System.IO.Stream cmykProfileStream = System.IO.File.OpenRead(dir + "ISOcoated_v2_FullGamut4.icc"))
                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                        // Use custom ICC profiles
                                                                                                                                                                                                                                                        image.RgbColorProfile = new Aspose.Imaging.Sources.StreamSource(rgbProfileStream);
                                                                                                                                                                                                                                                        image.CmykColorProfile = new Aspose.Imaging.Sources.StreamSource(cmykProfileStream);

                                                                                                                                                                                                                                                        Aspose.Imaging.ImageOptions.PngOptions saveOptions = new Aspose.Imaging.ImageOptions.PngOptions();
                                                                                                                                                                                                                                                        image.Save(dir + "output.rgb.png", saveOptions);
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }

VerticalResolution

この特性は、ピクセル/インチで表現される垂直解像度を管理します。関連する Aspose.Imaging.RasterImage. この解像度を調整すると、画像のサイズと品質は、固定物理的なサイズで印刷または表示される場合。この属性を設定することで、画像のピクセルがどれほど密度で包装されているかを制御します。垂直に、その全体的な鋭さと明確さに影響を与える。

public override double VerticalResolution { get; set; }

不動産価値

double

Examples

下記の例では、JPEG画像の水平/垂直解像度を設定する方法を示しています。

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

                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.jpg"))
                                                                                                 {
                                                                                                     Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)image;

                                                                                                     // Get horizontal and vertical resolution of the BmpImage
                                                                                                     double horizontalResolution = jpegImage.HorizontalResolution;
                                                                                                     double verticalResolution = jpegImage.VerticalResolution;
                                                                                                     System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", horizontalResolution);
                                                                                                     System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", verticalResolution);

                                                                                                     if (horizontalResolution != 96.0 || verticalResolution != 96.0)
                                                                                                     {
                                                                                                         // Use the SetResolution method for updating both resolution values in a single call.
                                                                                                         System.Console.WriteLine("Set resolution values to 96 dpi");
                                                                                                         jpegImage.SetResolution(96.0, 96.0);

                                                                                                         System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", jpegImage.HorizontalResolution);
                                                                                                         System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", jpegImage.VerticalResolution);
                                                                                                     }

                                                                                                     // The output may look like this:
                                                                                                     // The horizontal resolution, in pixels per inch: 300
                                                                                                     // The vertical resolution, in pixels per inch: 300
                                                                                                     // Set resolution values to 96 dpi
                                                                                                     // The horizontal resolution, in pixels per inch: 96
                                                                                                     // The vertical resolution, in pixels per inch: 96
                                                                                                 }

Remarks

デフォルトでこの値は、異なるプラットフォームがスクリーン解像度を返すことができないため、常に72です。

Width

この属性は、画像の幅を、ピクセルで表現します。画像の次元に関する重要な情報、正確な rendering を可能にし、操作、または画像データの表示。

public override int Width { get; }

不動産価値

int

XmpData

XMP メタデータを取得またはセットし、無線の統合を可能にします。画像ファイルへの説明情報 既存のXMPを抽出しているかどうかメタデータまたは新しい情報で更新する場合、この特性は、拡張メタデータの管理、さまざまなアプリケーションとの互換性を確保するそして仕事の流れ。

public override XmpPacketWrapper XmpData { get; set; }

不動産価値

XmpPacketWrapper

Methods

AutoRotate()

Exif から抽出されたオリエンテーションデータに基づく画像を自動的に回転この方法は、画像が正しい方向に表示されることを保証します。ユーザー体験を向上させ、手動調整の必要性を排除する。エジフ情報を分析すると、画像はそれに応じて回転し、シームなしを提供します。さまざまなプラットフォームやデバイスを通じて視聴体験。この自動回転プロセスは画像処理を簡素化し、一般的な使用性を向上させます。さまざまな方向性を持つ画像の大きなバットを扱う。

public void AutoRotate()

Exceptions

ArgumentOutOfRangeException

「JpegExifData」の「オリエンテーション」値は許可範囲(1…8)から離れていますので、自動ローテーションは適用できません。

GetModifyDate(ボール)

リソースイメージが最新を経験した日付と時間を返します。この方法は貴重なメタデータを提供し、ユーザーが追跡し、画像ファイルの更新プログラムを効率的に管理します. この情報にアクセスすることによって、ユーザー彼らのイメージ資産の誠実さと通貨を確保し、情報提供を容易にすることができる。イメージの使用と維持に関する意思決定

public override DateTime GetModifyDate(bool useDefault)

Parameters

useDefault bool

「真実」に設定されている場合は、FileInfo の情報をデフォルト値として使用します。

Returns

DateTime

リソース画像の日付と時間が最後に変更されました。

ReleaseManagedResources()

管理されたリソースをリリースします. 管理されていないリソースがリリースされていないことを確認してください. リソースはすでにリリースされているかもしれません。

protected override void ReleaseManagedResources()

RemoveMetadata()

この画像の例のメタデータを削除して、これらの Aspose.Imaging.Xmp.IHasXMPData.xmp Data と __ WL15__ .Exif.IhasExivDat.ExIFDate 値を設定します。 ゼロ.

public override void RemoveMetadata()

SaveData(Stream)

データを保存します。

protected override void SaveData(Stream stream)

Parameters

stream Stream

データを保存するためのストリーム。

SetResolution(ダブル、ダブル)

指定された Aspose.Imaging.RasterImage の解像度を設定し、正確なスケールおよび印刷能力 この方法は、ユーザーが調整することを可能にします。画像解像度は、それらの特定の要件に合致するか、デジタルディスプレイまたは物理再生:解像度を設定することで、ユーザーは最適化することができます。画像の質を確保し、さまざまな出力デバイスやメディアとの互換性を確保し、全体的な視覚体験と画像の使用性を向上させる。

public override void SetResolution(double dpiX, double dpiY)

Parameters

dpiX double

Aspose.Imaging.RasterImage の垂直解像度は、インチあたりの点で、

dpiY double

Aspose.Imaging.RasterImage の垂直解像度は、インチあたりの点で表示されます。

Examples

下記の例では、JPEG画像の水平/垂直解像度を設定する方法を示しています。

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

                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.jpg"))
                                                                                                 {
                                                                                                     Aspose.Imaging.FileFormats.Jpeg.JpegImage jpegImage = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)image;

                                                                                                     // Get horizontal and vertical resolution of the BmpImage
                                                                                                     double horizontalResolution = jpegImage.HorizontalResolution;
                                                                                                     double verticalResolution = jpegImage.VerticalResolution;
                                                                                                     System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", horizontalResolution);
                                                                                                     System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", verticalResolution);

                                                                                                     if (horizontalResolution != 96.0 || verticalResolution != 96.0)
                                                                                                     {
                                                                                                         // Use the SetResolution method for updating both resolution values in a single call.
                                                                                                         System.Console.WriteLine("Set resolution values to 96 dpi");
                                                                                                         jpegImage.SetResolution(96.0, 96.0);

                                                                                                         System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", jpegImage.HorizontalResolution);
                                                                                                         System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", jpegImage.VerticalResolution);
                                                                                                     }

                                                                                                     // The output may look like this:
                                                                                                     // The horizontal resolution, in pixels per inch: 300
                                                                                                     // The vertical resolution, in pixels per inch: 300
                                                                                                     // Set resolution values to 96 dpi
                                                                                                     // The horizontal resolution, in pixels per inch: 96
                                                                                                     // The vertical resolution, in pixels per inch: 96
                                                                                                 }

UpdateDimensions(int、 int)

画像のサイズを更新します。

protected override void UpdateDimensions(int newWidth, int newHeight)

Parameters

newWidth int

新しい画像の幅。

newHeight int

新しい画像の高さ。

UpdateMetadata()

画像メタデータを更新します。

protected override void UpdateMetadata()
 日本語