Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2021年9月.
* Some parts of this feature may have varying levels of support.
メモ: この機能はウェブワーカー内でのみ利用可能です。
createImageBitmap() は WorkerGlobalScope インターフェイスのメソッドで、指定されたソースからビットマップを作成し、オプションでそのソースの一部のみを切り抜きます。 このメソッドは、さまざまな画像ソースを受け付け、 ImageBitmap に解決する Promise を返します。
画像ソースで、以下のうちの何れかです。
ImageBitmap が抽出される長方形の参照点の x 座標。
syImageBitmap が抽出される長方形の参照点の y 座標。
swImageBitmap が抽出される長方形の幅。 この値は負の値にすることができます。
shImageBitmap が抽出される長方形の高さ。この値は負の値にすることができます。
options 省略可画像の抽出のためのオプションを設定するオブジェクト。利用可能なオプションは以下の通りです。
imageOrientationSpecifies how the bitmap image should be oriented.
from-imageEXIF 方向メタデータが存在する場合、その方向に従って画像を表示します(既定値)。
flipYEXIF 方向メタデータが存在する場合、そのメタデータに従って画像の方向を調整し、垂直方向に反転します。
none画像のエンコード方式に従って画像の方向を調整し、方向に関するメタデータ(EXIF メタデータなど、画像を縦向きで撮影するためにカメラを横向きにしたことを示すために画像に追加される場合のあるメタデータ)は無視します。
premultiplyAlphaSpecifies whether the bitmap's color channels should be premultiplied by the alpha channel. One of none, premultiply, or default (default).
colorSpaceConversionSpecifies whether the image should be decoded using color space conversion. Either none or default (default). The value default indicates that implementation-specific behavior is used.
resizeWidthA long integer that indicates the output width.
resizeHeightA long integer that indicates the output height.
resizeQualitySpecifies the algorithm to be used for resizing the input to match the output dimensions. One of pixelated, low (default), medium, or high.
指定された長方形のビットマップデータを保持する ImageBitmap オブジェクトに解決する Promise を返します。
例については Window.createImageBitmap() を参照してください。
| HTML # dom-createimagebitmap-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年6月24日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.