Search Results for

    Show / Hide Table of Contents

    Class OTZImageUtils

    イメージ関連の機能を提供します。

    Inheritance
    System.Object
    OTZImageUtils
    名前空間: OTZControls.Utilities
    アセンブリ: OTZControls.dll
    Syntax
    public class OTZImageUtils

    コンストラクタ

    OTZImageUtils()

    宣言
    public OTZImageUtils()

    メソッド

    FromFile(String)

    指定したファイルから Image を作成します。

    宣言
    public static Image FromFile(string fileName)
    パラメーター
    型 名前 説明
    System.String fileName

    ファイルパス

    戻り値
    型 説明
    System.Drawing.Image

    イメージ。失敗した場合は null を返します。

    GetDrawImageRectangle(Control, OTZForm)

    コントロールに表示される背景イメージの領域を取得します。

    宣言
    public static (float ScaleX, float ScaleY, Rectangle Rectangle) GetDrawImageRectangle(Control toControl, OTZForm parentForm)
    パラメーター
    型 名前 説明
    Control toControl

    描画先コントロール。

    OTZForm parentForm

    描画元コントロール。

    戻り値
    型 説明
    System.ValueTuple<System.Single, System.Single, System.Drawing.Rectangle>

    GetIcon(String, Int32)

    アイコンを取得します。

    宣言
    public static Icon GetIcon(string filePath, int dpi)
    パラメーター
    型 名前 説明
    System.String filePath

    ファイルパス。

    System.Int32 dpi

    DPI。

    戻り値
    型 説明
    System.Drawing.Icon

    アイコン

    GetImage(String)

    アイコンを取得します。

    宣言
    public static Image GetImage(string filePath)
    パラメーター
    型 名前 説明
    System.String filePath

    ファイルパス

    戻り値
    型 説明
    System.Drawing.Image

    アイコン

    ImageToIcon(Image)

    イメージからアイコンを返します。

    宣言
    public static Icon ImageToIcon(Image image)
    パラメーター
    型 名前 説明
    System.Drawing.Image image

    変換イメージ

    戻り値
    型 説明
    System.Drawing.Icon

    アイコン

    Resize(Image, Size)

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

    宣言
    public static Bitmap Resize(Image image, Size size)
    パラメーター
    型 名前 説明
    System.Drawing.Image image
    System.Drawing.Size size
    戻り値
    型 説明
    System.Drawing.Bitmap

    ResizeImage(String, String, ImageFormat, Int32, Int32)

    画像ファイルのアスペクト比を維持してサイズを変更します

    宣言
    public void ResizeImage(string sourceFile, string destinationFile, ImageFormat imageFormat, int width, int height)
    パラメーター
    型 名前 説明
    System.String sourceFile

    サイズ変更する画像ファイル

    System.String destinationFile

    サイズ変更した画像ファイル

    System.Drawing.Imaging.ImageFormat imageFormat

    画像ファイル形式

    System.Int32 width

    変更する幅

    System.Int32 height

    変更する高さ

    In This Article
    Back to top Generated by DocFX