ホーム › Graphics.Imaging › WICDdsParameters
WICDdsParameters
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Width | DWORD | 4 | +0 | +0 | 最大のミップサイズ (ミップレベル 0) におけるテクスチャの幅 (ピクセル単位)。 |
| Height | DWORD | 4 | +4 | +4 | 最大のミップサイズ (ミップレベル 0) におけるテクスチャの高さ (ピクセル単位)。DDS 画像が 1 次元テクスチャを含む場合、この値は 1 になります。 |
| Depth | DWORD | 4 | +8 | +8 | 3D テクスチャ内のスライス数。これは、最大のミップサイズ (ミップレベル 0) における 3D テクスチャの深さ (ピクセル単位) に相当します。DDS 画像が 1 次元または 2 次元のテクスチャを含む場合、この値は 1 になります。 |
| MipLevels | DWORD | 4 | +12 | +12 | DDS 画像に含まれるミップレベルの数。 |
| ArraySize | DWORD | 4 | +16 | +16 | DDS 画像内の配列に含まれるテクスチャの数。 |
| DxgiFormat | DXGI_FORMAT | 4 | +20 | +20 | DDS ピクセルデータの DXGI_FORMAT。 |
| Dimension | WICDdsDimension | 4 | +24 | +24 | DDS 画像に格納されているデータのディメンションの種類 (1D、2D、3D、またはキューブテクスチャ) を指定します。 |
| AlphaMode | WICDdsAlphaMode | 4 | +28 | +28 | DDS 画像のアルファの扱いを指定します。 |
公式ドキュメント
DDS 画像のディメンション、DXGI_FORMAT、および格納されているデータのアルファモードを指定します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// WICDdsParameters (x64 32 / x86 32 バイト)
typedef struct WICDdsParameters {
DWORD Width;
DWORD Height;
DWORD Depth;
DWORD MipLevels;
DWORD ArraySize;
DXGI_FORMAT DxgiFormat;
WICDdsDimension Dimension;
WICDdsAlphaMode AlphaMode;
} WICDdsParameters;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WICDdsParameters
{
public uint Width;
public uint Height;
public uint Depth;
public uint MipLevels;
public uint ArraySize;
public int DxgiFormat;
public int Dimension;
public int AlphaMode;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WICDdsParameters
Public Width As UInteger
Public Height As UInteger
Public Depth As UInteger
Public MipLevels As UInteger
Public ArraySize As UInteger
Public DxgiFormat As Integer
Public Dimension As Integer
Public AlphaMode As Integer
End Structureimport ctypes
from ctypes import wintypes
class WICDdsParameters(ctypes.Structure):
_fields_ = [
("Width", wintypes.DWORD),
("Height", wintypes.DWORD),
("Depth", wintypes.DWORD),
("MipLevels", wintypes.DWORD),
("ArraySize", wintypes.DWORD),
("DxgiFormat", ctypes.c_int),
("Dimension", ctypes.c_int),
("AlphaMode", ctypes.c_int),
]#[repr(C)]
pub struct WICDdsParameters {
pub Width: u32,
pub Height: u32,
pub Depth: u32,
pub MipLevels: u32,
pub ArraySize: u32,
pub DxgiFormat: i32,
pub Dimension: i32,
pub AlphaMode: i32,
}import "golang.org/x/sys/windows"
type WICDdsParameters struct {
Width uint32
Height uint32
Depth uint32
MipLevels uint32
ArraySize uint32
DxgiFormat int32
Dimension int32
AlphaMode int32
}type
WICDdsParameters = record
Width: DWORD;
Height: DWORD;
Depth: DWORD;
MipLevels: DWORD;
ArraySize: DWORD;
DxgiFormat: Integer;
Dimension: Integer;
AlphaMode: Integer;
end;const WICDdsParameters = extern struct {
Width: u32,
Height: u32,
Depth: u32,
MipLevels: u32,
ArraySize: u32,
DxgiFormat: i32,
Dimension: i32,
AlphaMode: i32,
};type
WICDdsParameters {.bycopy.} = object
Width: uint32
Height: uint32
Depth: uint32
MipLevels: uint32
ArraySize: uint32
DxgiFormat: int32
Dimension: int32
AlphaMode: int32struct WICDdsParameters
{
uint Width;
uint Height;
uint Depth;
uint MipLevels;
uint ArraySize;
int DxgiFormat;
int Dimension;
int AlphaMode;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WICDdsParameters サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Width : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Height : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Depth : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; MipLevels : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ArraySize : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; DxgiFormat : DXGI_FORMAT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Dimension : WICDdsDimension (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; AlphaMode : WICDdsAlphaMode (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WICDdsParameters
#field int Width
#field int Height
#field int Depth
#field int MipLevels
#field int ArraySize
#field int DxgiFormat
#field int Dimension
#field int AlphaMode
#endstruct
stdim st, WICDdsParameters ; NSTRUCT 変数を確保
st->Width = 100
mes "Width=" + st->Width