/* * Copyright (c) 2025 LG Electronics Inc. * SPDX-License-Identifier: LicenseRef-LGE-Proprietary */ using Aurora.Api.DataType; using System.Drawing; namespace VisionCommon { /// /// 패턴 썸네일 유틸 틀래스 /// public static class ThumbnailUtil { /// 썸네일 이미지 폭(가로) public static int ImageWidth = 50; /// 썸네일 이미지 높이(세로) public static int ImageHeight = 50; /// /// 썸네일의 이미지 사이즈 정보를 얻어온다. /// /// 이미지 사이즈 정보 public static ImageSize GetImageSize() { return new ImageSize() { Width = ImageWidth, Height = ImageHeight, BitDepth = 8, Channel = 3 }; } /// /// 기본 썸네일 이미지 /// /// 썸네일 비트맵 public static System.Drawing.Bitmap GetDefaultImage() { // Theme 에 따라서 달라지는 것을 표기. var bitmap = new System.Drawing.Bitmap(ImageWidth, ImageHeight); Color fillColor = VisionEnv.GetMainTheme() == Aurora.View.eMainTheme.Light ? Color.LightGray : Color.Black; using (Graphics g = Graphics.FromImage(bitmap)) { // 비트맵을 원하는 색상으로 채우기 g.Clear(fillColor); } return bitmap; } } }