ImageAttributes.SetOutputChannel メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ImageAttributes.SetOutputChannel メソッドの意味・解説 

ImageAttributes.SetOutputChannel メソッド (ColorChannelFlag, ColorAdjustType)

指定されカテゴリCMYK (水色マゼンタ、黄、黒) 出力チャネル設定します

名前空間: System.Drawing.Imaging
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub SetOutputChannel ( _
    flags As ColorChannelFlag, _
    type As ColorAdjustType _
)
Dim instance As ImageAttributes
Dim flags As ColorChannelFlag
Dim type As ColorAdjustType

instance.SetOutputChannel(flags, type)
public void SetOutputChannel (
    ColorChannelFlag flags,
    ColorAdjustType type
)
public:
void SetOutputChannel (
    ColorChannelFlag flags, 
    ColorAdjustType type
)
public void SetOutputChannel (
    ColorChannelFlag flags, 
    ColorAdjustType type
)
public function SetOutputChannel (
    flags : ColorChannelFlag, 
    type : ColorAdjustType
)

パラメータ

flags

出力チャネル指定する ColorChannelFlag の要素

type

出力チャネル設定する対象カテゴリ指定する ColorAdjustType の要素

戻り値
このメソッドは値を返しません。

解説解説

SetOutputChannel メソッド使用してイメージCMYK カラー領域変換しCMYK カラー チャネル1 つ輝度調べることができます。たとえば、ImageAttributes オブジェクト作成しビットマップ出力チャネルを ColorChannelC に設定したとしますImageAttributes オブジェクトパスを DrawImage メソッド渡した場合ピクセルごとに水色要素計算されイメージの各ピクセル水色チャネル輝度を示す灰色網かけ表現されます。同様にマゼンダ、黄、黒の輝度を示すイメージ表示できます

ImageAttributes オブジェクトは、5 つ調整カテゴリ (既定ビットマップブラシペンテキスト) に関して色とグレースケール設定保持します。たとえば、既定カテゴリにある出力チャネル指定しビットマップ カテゴリには別の出力チャネル指定できます

既定カラー調整設定値およびグレースケール調整設定値は、調整設定値設定されていないすべてのカテゴリに対して適用されます。たとえば、ビットマップ カテゴリ調整設定一切指定してない場合ビットマップ カテゴリには既定設定適用されます。

特定のカテゴリに対してカラー調整設定値またはグレースケール調整設定値指定すると、そのカテゴリ適用されていた既定調整設定値解除されます。たとえば、既定カテゴリに対して調整設定値コレクション指定するとしますBitmapSetOutputChannel メソッド渡してビットマップ カテゴリ出力チャネル設定すると、ビットマップには既定調整設定一切適用されません。

使用例使用例

SetOutputChannel メソッド使用する方法次のコード例示します。この例を実行するには、次のコードWindows フォーム貼り付けます。フォームPaint イベント処理しShowOutputChannels呼び出しePaintEventArgs 値として渡します

Private Sub ShowOutputChannels(ByVal
 e As PaintEventArgs)

    'Create a bitmap from a file.
    Dim bmp1 As New Bitmap("c:\fakePhoto.jpg")

    ' Create a new bitmap from the original, resizing it for this example.
    Dim bmp2 As New Bitmap(bmp1,
 New Size(80, 80))

    bmp1.Dispose()

    ' Create an ImageAttributes object.
    Dim imgAttributes As New
 System.Drawing.Imaging.ImageAttributes()

    ' Draw the image unaltered.
    e.Graphics.DrawImage(bmp2, 10, 10)

    ' Draw the image, showing the intensity of the cyan channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelC, ColorAdjustType.Bitmap)

    e.Graphics.DrawImage(bmp2, New Rectangle(100, 10, bmp2.Width,
 bmp2.Height), _
        0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes)

    ' Draw the image, showing the intensity of the magenta channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelM, ColorAdjustType.Bitmap)

    e.Graphics.DrawImage(bmp2, New Rectangle(10, 100, bmp2.Width,
 bmp2.Height), _
        0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes)

    ' Draw the image, showing the intensity of the yellow channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelY, _
        ColorAdjustType.Bitmap)

    e.Graphics.DrawImage(bmp2, New Rectangle(100, 100, bmp2.Width,
 bmp2.Height), _
        0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes)

    ' Draw the image, showing the intensity of the black channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelK, _
        ColorAdjustType.Bitmap)

    e.Graphics.DrawImage(bmp2, New Rectangle(10, 190, bmp2.Width,
 bmp2.Height), _
        0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes)

    'Dispose of the bitmap.
    bmp2.Dispose()

End Sub

private void ShowOutputChannels(PaintEventArgs
 e)
{
    //Create a bitmap from a file.
    Bitmap bmp1 = new Bitmap("c:\\fakePhoto.jpg");

    // Create a new bitmap from the original, resizing it for this example.
    Bitmap bmp2 = new Bitmap(bmp1, new Size(80,
 80));

    bmp1.Dispose();

    // Create an ImageAttributes object.
    ImageAttributes imgAttributes = new ImageAttributes();

    // Draw the image unaltered.
    e.Graphics.DrawImage(bmp2, 10, 10);

    // Draw the image, showing the intensity of the cyan channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelC,
        System.Drawing.Imaging.ColorAdjustType.Bitmap);

    e.Graphics.DrawImage(bmp2, new Rectangle(100, 10, bmp2.Width,
 bmp2.Height),
        0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes);

    // Draw the image, showing the intensity of the magenta channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelM,
        ColorAdjustType.Bitmap);

    e.Graphics.DrawImage(bmp2, new Rectangle(10, 100, bmp2.Width,
 bmp2.Height),
        0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes);

    // Draw the image, showing the intensity of the yellow channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelY,
        ColorAdjustType.Bitmap);

    e.Graphics.DrawImage(bmp2, new Rectangle(100, 100, bmp2.Width,
 bmp2.Height), 0, 0,
        bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes);

    // Draw the image, showing the intensity of the black channel.
    imgAttributes.SetOutputChannel(ColorChannelFlag.ColorChannelK,

        System.Drawing.Imaging.ColorAdjustType.Bitmap);
    e.Graphics.DrawImage(bmp2, new Rectangle(10, 190, bmp2.Width,
 bmp2.Height),
        0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel, imgAttributes);

    //Dispose of the bitmap.
    bmp2.Dispose();

}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ImageAttributes クラス
ImageAttributes メンバ
System.Drawing.Imaging 名前空間

ImageAttributes.SetOutputChannel メソッド (ColorChannelFlag)

既定カテゴリCMYK (水色マゼンタ、黄、黒) 出力チャネル設定します

名前空間: System.Drawing.Imaging
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub SetOutputChannel ( _
    flags As ColorChannelFlag _
)
Dim instance As ImageAttributes
Dim flags As ColorChannelFlag

instance.SetOutputChannel(flags)
public void SetOutputChannel (
    ColorChannelFlag flags
)
public:
void SetOutputChannel (
    ColorChannelFlag flags
)
public void SetOutputChannel (
    ColorChannelFlag flags
)
public function SetOutputChannel (
    flags : ColorChannelFlag
)

パラメータ

flags

出力チャネル指定する ColorChannelFlag の要素

戻り値
このメソッドは値を返しません。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ImageAttributes クラス
ImageAttributes メンバ
System.Drawing.Imaging 名前空間

ImageAttributes.SetOutputChannel メソッド

CMYK (水色マゼンタ、黄、黒) 出力チャネル設定します
オーバーロードの一覧オーバーロードの一覧

名前 説明
ImageAttributes.SetOutputChannel (ColorChannelFlag) 既定カテゴリCMYK (水色マゼンタ、黄、黒) 出力チャネル設定します
ImageAttributes.SetOutputChannel (ColorChannelFlag, ColorAdjustType) 指定されカテゴリCMYK (水色マゼンタ、黄、黒) 出力チャネル設定します
参照参照

関連項目

ImageAttributes クラス
ImageAttributes メンバ
System.Drawing.Imaging 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ImageAttributes.SetOutputChannel メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ImageAttributes.SetOutputChannel メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS