대화형 작업이 2023년 6월 13일에 지원 중단되었습니다. 자세한 내용은
대화 작업 지원 중단을 참고하세요.
ImageFill
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이미지 표시에 영향을 줄 수 있는 이미지 표시 옵션입니다. 이미지의 가로세로 비율이 이미지 컨테이너의 가로세로 비율과 일치하지 않는 경우에 사용해야 합니다.
열거형 |
UNSPECIFIED |
ImageFill이 지정되지 않았습니다. |
GRAY |
이미지와 이미지 컨테이너 사이의 간격을 회색 막대로 채웁니다. |
WHITE |
이미지와 이미지 컨테이너 사이의 간격을 흰색 막대로 채웁니다. |
CROPPED |
이미지의 너비와 높이가 컨테이너 크기와 일치하거나 이를 초과하도록 이미지가 조정됩니다. 조정된 이미지 높이가 컨테이너 높이보다 크면 이미지의 상단과 하단이 잘리고, 조정된 이미지 너비가 컨테이너 너비보다 크면 이미지의 왼쪽과 오른쪽이 잘릴 수 있습니다. 4:3 동영상을 재생할 때 와이드스크린 TV에 나오는 '확대/축소 모드'와 비슷합니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eImage display options control how an image is presented within its container, especially when aspect ratios differ.\u003c/p\u003e\n"],["\u003cp\u003eOptions include filling the surrounding space with gray or white bars or cropping the image to fit.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCROPPED\u003c/code\u003e scales the image to fill the container, potentially cropping parts that extend beyond its boundaries, similar to "Zoom Mode" on a widescreen TV.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can choose an option to optimize image presentation based on the specific needs of their website or application.\u003c/p\u003e\n"]]],["The provided information outlines image display options when an image's aspect ratio differs from its container. `GRAY` and `WHITE` options fill the resulting gaps with gray or white bars, respectively. `CROPPED` scales the image to match or exceed container dimensions, potentially cropping the top/bottom or left/right edges. An `UNSPECIFIED` option exists, but its behavior is undefined. These settings control how the image is presented within its designated container.\n"],null,["# ImageFill\n\nPossible image display options for affecting the presentation of the image. This should be used for when the image's aspect ratio does not match the image container's aspect ratio.\n\n| Enums ||\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `UNSPECIFIED` | ImageFill unspecified. |\n| `GRAY` | Fill the gaps between the image and the image container with gray bars. |\n| `WHITE` | Fill the gaps between the image and the image container with white bars. |\n| `CROPPED` | Image is scaled such that the image width and height match or exceed the container dimensions. This may crop the top and bottom of the image if the scaled image height is greater than the container height, or crop the left and right of the image if the scaled image width is greater than the container width. This is similar to \"Zoom Mode\" on a widescreen TV when playing a 4:3 video. |"]]