image-rendering
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2020ë 1ì.
* Some parts of this feature may have varying levels of support.
image-rendering CSS íë¡í¼í°ë ë¸ë¼ì°ì ì ì´ë¯¸ì§ ì¤ì¼ì¼ë§ ë°©ìì ëí íí¸ë¥¼ ì ê³µí©ëë¤. ì´ íë¡í¼í°ë ìë¦¬ë¨¼í¸ ìì ìê² ì ì©ìíµëë¤. ì¤ì¼ì¼ë§(í¬ê¸°ë³ê²½)ì´ ì ë ì´ë¯¸ì§ìê²ë ì ì©ëì§ ììµëë¤.
ì를ë¤ì´, 100x100 í½ì ì ì´ë¯¸ì§ê° ìëë° íì´ì§ìì ì구íë ì´ë¯¸ì§ë 200x200í½ì (í¹ì 50x50px)ì´ë¼ë©´, ì´ë¯¸ì§ë ìë¡ì´ ë©´ì ë§í¼ì í¹ì ìê³ ë¦¬ì¦ì¼ë¡ ì¸í´ íë(í¹ì ì¶ì)ë©ëë¤. ì¤ì¼ì¼ë§ì ì¬ì©ìì ìí¸ìì©(ì¤ê¸°ë¥) ì¼ë¡ ì¸í´ ì¼ì´ë ê²ëë¤.
| ì´ê¸°ê° | auto |
|---|---|
| ì ì©ëì | all elements |
| ìì | yes |
| ê³ì° ê° | as specified |
| Animation type | discrete |
구문
/* í¤ìë ê° */
image-rendering: auto;
image-rendering: crisp-edges;
image-rendering: pixelated;
/* ì ì ê° */
image-rendering: inherit;
image-rendering: initial;
image-rendering: unset;
Values
auto-
기본ê°ì ëë¤. ì´ë¯¸ì§ì ì¤ì¼ì¼ë§ ìê³ ë¦¬ì¦ì ì´ë¯¸ì§ë¥¼ ìµëì¹ë¡ íì©í´ì ëíë ëë¤. í¹í, ì¤ì¼ì¼ë§ ìê³ ë¦¬ì¦ì ì´ì¤ì íë³´ê°ë²ê°ì ìê³ ë¦¬ì¦ì´ 보기ì ê´ì°®ì "ë¶ëë¬ì´"ììì ëíë ëë¤. ì¬ì§ê°ì ì¢ ë¥ì ê²ë¤ì ìí´ GEckoìì§ 1.9ë²ì (Firefox 3.0) ììë ì´ì¤ì í 리ìíë§(ê³ íì§) ì ì¬ì©í´ììµëë¤.
crisp-edges-
ì´ë¯¸ì§ ì¤ì¼ì¼ë§ ìê³ ë¦¬ì¦ì ë°ëì ììëì¡°ì ì´ë¯¸ì§ì íì¤ì ë§ê² ë³´ì¡´í´ì¼ í©ëë¤. ê·¸ë¦¬ê³ smooth íì§ ëª»í ìì í¹ì ì´ë¯¸ì§ì í림í¨ê³¼ ëí ìê³ ë¦¬ì¦ ê³µì ì ìì´ì¼í©ëë¤. ì´ ìì±ì í½ì ìí¸ê°ì ìëëì´ ë§ë¤ì´ì§ ì´ë¯¸ì§ë¤ìê² íìí©ëë¤.
pixelated-
ì´ë¯¸ì§ ì¤ì¼ì¼ë§ì í¬ê² íëí ëë "nearest neighbor" í¹ì ë¹ì·í ìê³ ë¦¬ì¦ì ë°ëì ì¬ì©í´ì¼ í©ëë¤. ê·¸ëì ì´ë¯¸ì§ì í° í½ì ë¡ êµ¬ì±í´ì ëíë¼ ì ììµëë¤. ì´ë¯¸ì§ë¥¼ ìê² ì¶ìí ëë "auto" ìì±ê³¼ ê°ìµëë¤.
ì°¸ê³ :
The values optimizeQuality and optimizeSpeed present in early draft (and coming from its SVG counterpart) are defined as synonyms for the auto value.
ê³µì 문ë²
image-rendering =
auto |
smooth |
high-quality |
pixelated |
crisp-edges
ìì
/* applies to GIF and PNG images; avoids blurry edges */
img[src$=".gif"],
img[src$=".png"] {
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
div {
background: url(chessboard.gif) no-repeat 50% 50%;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
Live Examples
image-rendering: auto
78%
100%
138%
downsized
upsized 
image-rendering: pixelated; (-ms-interpolation-mode: nearest-neighbor)
78%
100%
138%
downsized
upsized 
image-rendering: crisp-edges; (-webkit-optimize-contrast)
78%
100%
138%
downsized
upsized 
ëª ì¸
| Specification |
|---|
| CSS Images Module Level 3 > # the-image-rendering > |
| Scalable Vector Graphics (SVG) 2 > # ImageRendering > |
ì°¸ê³ :
Though initially close from the SVG image-rendering property, the values are quite different now.