0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ImageDataメモ

Posted at

概要

ImageDataインターフェースのメモ

ImageDataインターフェース

CanvasRenderingContext2D.getImageData()で取得したデータの形式

プロパティ

height

高さのピクセル数
型はunsigned longとのことだが、JavaScriptではnumber

width

幅のピクセル数
型はunsigned longとのことだが、JavaScriptではnumber

data

画像データの一次元配列。
RGBAの順番でデータ(Uint8ClampedArray)が格納されている。

  • R: Red
  • G: Green
  • B: Blue
  • A: Alpha ※ 透過度 (数が小さいほど透過度が高い)

イメージ画像(3x3の画像の場合)
9B2D2536-1C5D-489E-90E1-8498F630EBB1.jpg

参考

ImageData

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?