SkiaEncoder.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.IO;
  5. using BlurHashSharp.SkiaSharp;
  6. using MediaBrowser.Common.Configuration;
  7. using MediaBrowser.Controller.Drawing;
  8. using MediaBrowser.Controller.Extensions;
  9. using MediaBrowser.Model.Drawing;
  10. using Microsoft.Extensions.Logging;
  11. using SkiaSharp;
  12. using static Jellyfin.Drawing.Skia.SkiaHelper;
  13. namespace Jellyfin.Drawing.Skia
  14. {
  15. /// <summary>
  16. /// Image encoder that uses <see cref="SkiaSharp"/> to manipulate images.
  17. /// </summary>
  18. public class SkiaEncoder : IImageEncoder
  19. {
  20. private static readonly HashSet<string> _transparentImageTypes
  21. = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".gif", ".webp" };
  22. private readonly ILogger<SkiaEncoder> _logger;
  23. private readonly IApplicationPaths _appPaths;
  24. /// <summary>
  25. /// Initializes a new instance of the <see cref="SkiaEncoder"/> class.
  26. /// </summary>
  27. /// <param name="logger">The application logger.</param>
  28. /// <param name="appPaths">The application paths.</param>
  29. public SkiaEncoder(
  30. ILogger<SkiaEncoder> logger,
  31. IApplicationPaths appPaths)
  32. {
  33. _logger = logger;
  34. _appPaths = appPaths;
  35. }
  36. /// <inheritdoc/>
  37. public string Name => "Skia";
  38. /// <inheritdoc/>
  39. public bool SupportsImageCollageCreation => true;
  40. /// <inheritdoc/>
  41. public bool SupportsImageEncoding => true;
  42. /// <inheritdoc/>
  43. public IReadOnlyCollection<string> SupportedInputFormats =>
  44. new HashSet<string>(StringComparer.OrdinalIgnoreCase)
  45. {
  46. "jpeg",
  47. "jpg",
  48. "png",
  49. "dng",
  50. "webp",
  51. "gif",
  52. "bmp",
  53. "ico",
  54. "astc",
  55. "ktx",
  56. "pkm",
  57. "wbmp",
  58. // TODO: check if these are supported on multiple platforms
  59. // https://github.com/google/skia/blob/master/infra/bots/recipes/test.py#L454
  60. // working on windows at least
  61. "cr2",
  62. "nef",
  63. "arw"
  64. };
  65. /// <inheritdoc/>
  66. public IReadOnlyCollection<ImageFormat> SupportedOutputFormats
  67. => new HashSet<ImageFormat>() { ImageFormat.Webp, ImageFormat.Jpg, ImageFormat.Png };
  68. /// <summary>
  69. /// Check if the native lib is available.
  70. /// </summary>
  71. /// <returns>True if the native lib is available, otherwise false.</returns>
  72. public static bool IsNativeLibAvailable()
  73. {
  74. try
  75. {
  76. // test an operation that requires the native library
  77. SKPMColor.PreMultiply(SKColors.Black);
  78. return true;
  79. }
  80. catch (Exception)
  81. {
  82. return false;
  83. }
  84. }
  85. private static bool IsTransparent(SKColor color)
  86. => (color.Red == 255 && color.Green == 255 && color.Blue == 255) || color.Alpha == 0;
  87. /// <summary>
  88. /// Convert a <see cref="ImageFormat"/> to a <see cref="SKEncodedImageFormat"/>.
  89. /// </summary>
  90. /// <param name="selectedFormat">The format to convert.</param>
  91. /// <returns>The converted format.</returns>
  92. public static SKEncodedImageFormat GetImageFormat(ImageFormat selectedFormat)
  93. {
  94. switch (selectedFormat)
  95. {
  96. case ImageFormat.Bmp:
  97. return SKEncodedImageFormat.Bmp;
  98. case ImageFormat.Jpg:
  99. return SKEncodedImageFormat.Jpeg;
  100. case ImageFormat.Gif:
  101. return SKEncodedImageFormat.Gif;
  102. case ImageFormat.Webp:
  103. return SKEncodedImageFormat.Webp;
  104. default:
  105. return SKEncodedImageFormat.Png;
  106. }
  107. }
  108. private static bool IsTransparentRow(SKBitmap bmp, int row)
  109. {
  110. for (var i = 0; i < bmp.Width; ++i)
  111. {
  112. if (!IsTransparent(bmp.GetPixel(i, row)))
  113. {
  114. return false;
  115. }
  116. }
  117. return true;
  118. }
  119. private static bool IsTransparentColumn(SKBitmap bmp, int col)
  120. {
  121. for (var i = 0; i < bmp.Height; ++i)
  122. {
  123. if (!IsTransparent(bmp.GetPixel(col, i)))
  124. {
  125. return false;
  126. }
  127. }
  128. return true;
  129. }
  130. private SKBitmap CropWhiteSpace(SKBitmap bitmap)
  131. {
  132. var topmost = 0;
  133. for (int row = 0; row < bitmap.Height; ++row)
  134. {
  135. if (IsTransparentRow(bitmap, row))
  136. {
  137. topmost = row + 1;
  138. }
  139. else
  140. {
  141. break;
  142. }
  143. }
  144. int bottommost = bitmap.Height;
  145. for (int row = bitmap.Height - 1; row >= 0; --row)
  146. {
  147. if (IsTransparentRow(bitmap, row))
  148. {
  149. bottommost = row;
  150. }
  151. else
  152. {
  153. break;
  154. }
  155. }
  156. int leftmost = 0, rightmost = bitmap.Width;
  157. for (int col = 0; col < bitmap.Width; ++col)
  158. {
  159. if (IsTransparentColumn(bitmap, col))
  160. {
  161. leftmost = col + 1;
  162. }
  163. else
  164. {
  165. break;
  166. }
  167. }
  168. for (int col = bitmap.Width - 1; col >= 0; --col)
  169. {
  170. if (IsTransparentColumn(bitmap, col))
  171. {
  172. rightmost = col;
  173. }
  174. else
  175. {
  176. break;
  177. }
  178. }
  179. var newRect = SKRectI.Create(leftmost, topmost, rightmost - leftmost, bottommost - topmost);
  180. using (var image = SKImage.FromBitmap(bitmap))
  181. using (var subset = image.Subset(newRect))
  182. {
  183. return SKBitmap.FromImage(subset);
  184. }
  185. }
  186. /// <inheritdoc />
  187. /// <exception cref="ArgumentNullException">The path is null.</exception>
  188. /// <exception cref="FileNotFoundException">The path is not valid.</exception>
  189. /// <exception cref="SkiaCodecException">The file at the specified path could not be used to generate a codec.</exception>
  190. public ImageDimensions GetImageSize(string path)
  191. {
  192. if (!File.Exists(path))
  193. {
  194. throw new FileNotFoundException("File not found", path);
  195. }
  196. using (var codec = SKCodec.Create(path, out SKCodecResult result))
  197. {
  198. EnsureSuccess(result);
  199. var info = codec.Info;
  200. return new ImageDimensions(info.Width, info.Height);
  201. }
  202. }
  203. /// <inheritdoc />
  204. /// <exception cref="ArgumentNullException">The path is null.</exception>
  205. /// <exception cref="FileNotFoundException">The path is not valid.</exception>
  206. /// <exception cref="SkiaCodecException">The file at the specified path could not be used to generate a codec.</exception>
  207. public string GetImageBlurHash(int xComp, int yComp, string path)
  208. {
  209. if (path == null)
  210. {
  211. throw new ArgumentNullException(nameof(path));
  212. }
  213. return BlurHashEncoder.Encode(xComp, yComp, path);
  214. }
  215. private static bool HasDiacritics(string text)
  216. => !string.Equals(text, text.RemoveDiacritics(), StringComparison.Ordinal);
  217. private bool RequiresSpecialCharacterHack(string path)
  218. {
  219. for (int i = 0; i < path.Length; i++)
  220. {
  221. if (char.GetUnicodeCategory(path[i]) == UnicodeCategory.OtherLetter)
  222. {
  223. return true;
  224. }
  225. }
  226. if (HasDiacritics(path))
  227. {
  228. return true;
  229. }
  230. return false;
  231. }
  232. private string NormalizePath(string path)
  233. {
  234. if (!RequiresSpecialCharacterHack(path))
  235. {
  236. return path;
  237. }
  238. var tempPath = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid() + Path.GetExtension(path));
  239. Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
  240. File.Copy(path, tempPath, true);
  241. return tempPath;
  242. }
  243. private static SKEncodedOrigin GetSKEncodedOrigin(ImageOrientation? orientation)
  244. {
  245. if (!orientation.HasValue)
  246. {
  247. return SKEncodedOrigin.TopLeft;
  248. }
  249. switch (orientation.Value)
  250. {
  251. case ImageOrientation.TopRight:
  252. return SKEncodedOrigin.TopRight;
  253. case ImageOrientation.RightTop:
  254. return SKEncodedOrigin.RightTop;
  255. case ImageOrientation.RightBottom:
  256. return SKEncodedOrigin.RightBottom;
  257. case ImageOrientation.LeftTop:
  258. return SKEncodedOrigin.LeftTop;
  259. case ImageOrientation.LeftBottom:
  260. return SKEncodedOrigin.LeftBottom;
  261. case ImageOrientation.BottomRight:
  262. return SKEncodedOrigin.BottomRight;
  263. case ImageOrientation.BottomLeft:
  264. return SKEncodedOrigin.BottomLeft;
  265. default:
  266. return SKEncodedOrigin.TopLeft;
  267. }
  268. }
  269. /// <summary>
  270. /// Decode an image.
  271. /// </summary>
  272. /// <param name="path">The filepath of the image to decode.</param>
  273. /// <param name="forceCleanBitmap">Whether to force clean the bitmap.</param>
  274. /// <param name="orientation">The orientation of the image.</param>
  275. /// <param name="origin">The detected origin of the image.</param>
  276. /// <returns>The resulting bitmap of the image.</returns>
  277. internal SKBitmap? Decode(string path, bool forceCleanBitmap, ImageOrientation? orientation, out SKEncodedOrigin origin)
  278. {
  279. if (!File.Exists(path))
  280. {
  281. throw new FileNotFoundException("File not found", path);
  282. }
  283. var requiresTransparencyHack = _transparentImageTypes.Contains(Path.GetExtension(path));
  284. if (requiresTransparencyHack || forceCleanBitmap)
  285. {
  286. using (var codec = SKCodec.Create(NormalizePath(path)))
  287. {
  288. if (codec == null)
  289. {
  290. origin = GetSKEncodedOrigin(orientation);
  291. return null;
  292. }
  293. // create the bitmap
  294. var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height, !requiresTransparencyHack);
  295. // decode
  296. _ = codec.GetPixels(bitmap.Info, bitmap.GetPixels());
  297. origin = codec.EncodedOrigin;
  298. return bitmap;
  299. }
  300. }
  301. var resultBitmap = SKBitmap.Decode(NormalizePath(path));
  302. if (resultBitmap == null)
  303. {
  304. return Decode(path, true, orientation, out origin);
  305. }
  306. // If we have to resize these they often end up distorted
  307. if (resultBitmap.ColorType == SKColorType.Gray8)
  308. {
  309. using (resultBitmap)
  310. {
  311. return Decode(path, true, orientation, out origin);
  312. }
  313. }
  314. origin = SKEncodedOrigin.TopLeft;
  315. return resultBitmap;
  316. }
  317. private SKBitmap? GetBitmap(string path, bool cropWhitespace, bool forceAnalyzeBitmap, ImageOrientation? orientation, out SKEncodedOrigin origin)
  318. {
  319. if (cropWhitespace)
  320. {
  321. using (var bitmap = Decode(path, forceAnalyzeBitmap, orientation, out origin))
  322. {
  323. if (bitmap == null)
  324. {
  325. return null;
  326. }
  327. return CropWhiteSpace(bitmap);
  328. }
  329. }
  330. return Decode(path, forceAnalyzeBitmap, orientation, out origin);
  331. }
  332. private SKBitmap? GetBitmap(string path, bool cropWhitespace, bool autoOrient, ImageOrientation? orientation)
  333. {
  334. if (autoOrient)
  335. {
  336. var bitmap = GetBitmap(path, cropWhitespace, true, orientation, out var origin);
  337. if (bitmap != null && origin != SKEncodedOrigin.TopLeft)
  338. {
  339. using (bitmap)
  340. {
  341. return OrientImage(bitmap, origin);
  342. }
  343. }
  344. return bitmap;
  345. }
  346. return GetBitmap(path, cropWhitespace, false, orientation, out _);
  347. }
  348. private SKBitmap OrientImage(SKBitmap bitmap, SKEncodedOrigin origin)
  349. {
  350. switch (origin)
  351. {
  352. case SKEncodedOrigin.TopRight:
  353. {
  354. var rotated = new SKBitmap(bitmap.Width, bitmap.Height);
  355. using (var surface = new SKCanvas(rotated))
  356. {
  357. surface.Translate(rotated.Width, 0);
  358. surface.Scale(-1, 1);
  359. surface.DrawBitmap(bitmap, 0, 0);
  360. }
  361. return rotated;
  362. }
  363. case SKEncodedOrigin.BottomRight:
  364. {
  365. var rotated = new SKBitmap(bitmap.Width, bitmap.Height);
  366. using (var surface = new SKCanvas(rotated))
  367. {
  368. float px = (float)bitmap.Width / 2;
  369. float py = (float)bitmap.Height / 2;
  370. surface.RotateDegrees(180, px, py);
  371. surface.DrawBitmap(bitmap, 0, 0);
  372. }
  373. return rotated;
  374. }
  375. case SKEncodedOrigin.BottomLeft:
  376. {
  377. var rotated = new SKBitmap(bitmap.Width, bitmap.Height);
  378. using (var surface = new SKCanvas(rotated))
  379. {
  380. float px = (float)bitmap.Width / 2;
  381. float py = (float)bitmap.Height / 2;
  382. surface.Translate(rotated.Width, 0);
  383. surface.Scale(-1, 1);
  384. surface.RotateDegrees(180, px, py);
  385. surface.DrawBitmap(bitmap, 0, 0);
  386. }
  387. return rotated;
  388. }
  389. case SKEncodedOrigin.LeftTop:
  390. {
  391. // TODO: Remove dual canvases, had trouble with flipping
  392. using (var rotated = new SKBitmap(bitmap.Height, bitmap.Width))
  393. {
  394. using (var surface = new SKCanvas(rotated))
  395. {
  396. surface.Translate(rotated.Width, 0);
  397. surface.RotateDegrees(90);
  398. surface.DrawBitmap(bitmap, 0, 0);
  399. }
  400. var flippedBitmap = new SKBitmap(rotated.Width, rotated.Height);
  401. using (var flippedCanvas = new SKCanvas(flippedBitmap))
  402. {
  403. flippedCanvas.Translate(flippedBitmap.Width, 0);
  404. flippedCanvas.Scale(-1, 1);
  405. flippedCanvas.DrawBitmap(rotated, 0, 0);
  406. }
  407. return flippedBitmap;
  408. }
  409. }
  410. case SKEncodedOrigin.RightTop:
  411. {
  412. var rotated = new SKBitmap(bitmap.Height, bitmap.Width);
  413. using (var surface = new SKCanvas(rotated))
  414. {
  415. surface.Translate(rotated.Width, 0);
  416. surface.RotateDegrees(90);
  417. surface.DrawBitmap(bitmap, 0, 0);
  418. }
  419. return rotated;
  420. }
  421. case SKEncodedOrigin.RightBottom:
  422. {
  423. // TODO: Remove dual canvases, had trouble with flipping
  424. using (var rotated = new SKBitmap(bitmap.Height, bitmap.Width))
  425. {
  426. using (var surface = new SKCanvas(rotated))
  427. {
  428. surface.Translate(0, rotated.Height);
  429. surface.RotateDegrees(270);
  430. surface.DrawBitmap(bitmap, 0, 0);
  431. }
  432. var flippedBitmap = new SKBitmap(rotated.Width, rotated.Height);
  433. using (var flippedCanvas = new SKCanvas(flippedBitmap))
  434. {
  435. flippedCanvas.Translate(flippedBitmap.Width, 0);
  436. flippedCanvas.Scale(-1, 1);
  437. flippedCanvas.DrawBitmap(rotated, 0, 0);
  438. }
  439. return flippedBitmap;
  440. }
  441. }
  442. case SKEncodedOrigin.LeftBottom:
  443. {
  444. var rotated = new SKBitmap(bitmap.Height, bitmap.Width);
  445. using (var surface = new SKCanvas(rotated))
  446. {
  447. surface.Translate(0, rotated.Height);
  448. surface.RotateDegrees(270);
  449. surface.DrawBitmap(bitmap, 0, 0);
  450. }
  451. return rotated;
  452. }
  453. default: return bitmap;
  454. }
  455. }
  456. /// <inheritdoc/>
  457. public string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)
  458. {
  459. if (inputPath.Length == 0)
  460. {
  461. throw new ArgumentException("String can't be empty.", nameof(inputPath));
  462. }
  463. if (outputPath.Length == 0)
  464. {
  465. throw new ArgumentException("String can't be empty.", nameof(outputPath));
  466. }
  467. var skiaOutputFormat = GetImageFormat(selectedOutputFormat);
  468. var hasBackgroundColor = !string.IsNullOrWhiteSpace(options.BackgroundColor);
  469. var hasForegroundColor = !string.IsNullOrWhiteSpace(options.ForegroundLayer);
  470. var blur = options.Blur ?? 0;
  471. var hasIndicator = options.AddPlayedIndicator || options.UnplayedCount.HasValue || !options.PercentPlayed.Equals(0);
  472. using (var bitmap = GetBitmap(inputPath, options.CropWhiteSpace, autoOrient, orientation))
  473. {
  474. if (bitmap == null)
  475. {
  476. throw new InvalidDataException($"Skia unable to read image {inputPath}");
  477. }
  478. var originalImageSize = new ImageDimensions(bitmap.Width, bitmap.Height);
  479. if (!options.CropWhiteSpace
  480. && options.HasDefaultOptions(inputPath, originalImageSize)
  481. && !autoOrient)
  482. {
  483. // Just spit out the original file if all the options are default
  484. return inputPath;
  485. }
  486. var newImageSize = ImageHelper.GetNewImageSize(options, originalImageSize);
  487. var width = newImageSize.Width;
  488. var height = newImageSize.Height;
  489. using (var resizedBitmap = new SKBitmap(width, height, bitmap.ColorType, bitmap.AlphaType))
  490. {
  491. // scale image
  492. bitmap.ScalePixels(resizedBitmap, SKFilterQuality.High);
  493. // If all we're doing is resizing then we can stop now
  494. if (!hasBackgroundColor && !hasForegroundColor && blur == 0 && !hasIndicator)
  495. {
  496. Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
  497. using (var outputStream = new SKFileWStream(outputPath))
  498. using (var pixmap = new SKPixmap(new SKImageInfo(width, height), resizedBitmap.GetPixels()))
  499. {
  500. pixmap.Encode(outputStream, skiaOutputFormat, quality);
  501. return outputPath;
  502. }
  503. }
  504. // create bitmap to use for canvas drawing used to draw into bitmap
  505. using (var saveBitmap = new SKBitmap(width, height)) // , bitmap.ColorType, bitmap.AlphaType))
  506. using (var canvas = new SKCanvas(saveBitmap))
  507. {
  508. // set background color if present
  509. if (hasBackgroundColor)
  510. {
  511. canvas.Clear(SKColor.Parse(options.BackgroundColor));
  512. }
  513. // Add blur if option is present
  514. if (blur > 0)
  515. {
  516. // create image from resized bitmap to apply blur
  517. using (var paint = new SKPaint())
  518. using (var filter = SKImageFilter.CreateBlur(blur, blur))
  519. {
  520. paint.ImageFilter = filter;
  521. canvas.DrawBitmap(resizedBitmap, SKRect.Create(width, height), paint);
  522. }
  523. }
  524. else
  525. {
  526. // draw resized bitmap onto canvas
  527. canvas.DrawBitmap(resizedBitmap, SKRect.Create(width, height));
  528. }
  529. // If foreground layer present then draw
  530. if (hasForegroundColor)
  531. {
  532. if (!double.TryParse(options.ForegroundLayer, out double opacity))
  533. {
  534. opacity = .4;
  535. }
  536. canvas.DrawColor(new SKColor(0, 0, 0, (byte)((1 - opacity) * 0xFF)), SKBlendMode.SrcOver);
  537. }
  538. if (hasIndicator)
  539. {
  540. DrawIndicator(canvas, width, height, options);
  541. }
  542. Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
  543. using (var outputStream = new SKFileWStream(outputPath))
  544. {
  545. using (var pixmap = new SKPixmap(new SKImageInfo(width, height), saveBitmap.GetPixels()))
  546. {
  547. pixmap.Encode(outputStream, skiaOutputFormat, quality);
  548. }
  549. }
  550. }
  551. }
  552. }
  553. return outputPath;
  554. }
  555. /// <inheritdoc/>
  556. public void CreateImageCollage(ImageCollageOptions options)
  557. {
  558. double ratio = (double)options.Width / options.Height;
  559. if (ratio >= 1.4)
  560. {
  561. new StripCollageBuilder(this).BuildThumbCollage(options.InputPaths, options.OutputPath, options.Width, options.Height);
  562. }
  563. else if (ratio >= .9)
  564. {
  565. new StripCollageBuilder(this).BuildSquareCollage(options.InputPaths, options.OutputPath, options.Width, options.Height);
  566. }
  567. else
  568. {
  569. // TODO: Create Poster collage capability
  570. new StripCollageBuilder(this).BuildSquareCollage(options.InputPaths, options.OutputPath, options.Width, options.Height);
  571. }
  572. }
  573. private void DrawIndicator(SKCanvas canvas, int imageWidth, int imageHeight, ImageProcessingOptions options)
  574. {
  575. try
  576. {
  577. var currentImageSize = new ImageDimensions(imageWidth, imageHeight);
  578. if (options.AddPlayedIndicator)
  579. {
  580. PlayedIndicatorDrawer.DrawPlayedIndicator(canvas, currentImageSize);
  581. }
  582. else if (options.UnplayedCount.HasValue)
  583. {
  584. UnplayedCountIndicator.DrawUnplayedCountIndicator(canvas, currentImageSize, options.UnplayedCount.Value);
  585. }
  586. if (options.PercentPlayed > 0)
  587. {
  588. PercentPlayedDrawer.Process(canvas, currentImageSize, options.PercentPlayed);
  589. }
  590. }
  591. catch (Exception ex)
  592. {
  593. _logger.LogError(ex, "Error drawing indicator overlay");
  594. }
  595. }
  596. }
  597. }