備忘録的プログラミングリファレンス

image-renderingプロパティ

 image-renderingプロパティは、画像を縮小または拡大表示する際の見栄えを調整するプロパティです。

平滑化の処理を行う
image-rendering: pixelated;

詳しくは Example を参照してください

 エレメントを拡大/縮小するファンクションに scale があります。
 また、resizebackground プロパティの組み合わせによってもユーザーによってサイズを変更することができます。

ページ内 Index

構文(Syntax)

CSS

image-rendering: auto | crisp-edges | pixelated | initial | inherit;

DOM ( JavaScript )

値の取得
String = object.style.image-rendering;
値の設定
object.style.image-rendering="auto | crisp-edges | pixelated | initial | inherit";

値(Values)

Value摘要
auto初期値(default値)
crisp-edges平滑化を行わない
pixelated平滑化(アンチエイリアス処理、ぼかし処理など)を行う
initial初期値に戻す
inherit親エレメントのプロパティを継承

備考(Remarks)

初期値(Default value)auto
継承(Inherited)Yes
CSS AnimationNo

Example

 image-rendering の例です。

 画像は、background プロパティで背景として表示し、resize で大きさが変更できるようにしています。
 auto(デフォルト)、crisp-edges(平滑化しない)、pixelated(平滑化を指定)を比較できるようにしています。