(EN) The present disclosure provides a text shadow effect processing method and apparatus, a device, and a storage medium. The method comprises: after offsetting the positions of pixel points in a signed distance field image of a target text, obtaining a first distance field image, which comprises original pixel points and offset pixel points corresponding to the original pixel points; on the basis of the first distance field image, drawing an initial inner shadow effect image corresponding to the target text; determining a target area composed of offset pixel points in the first distance field image of which distance field values are greater than a preset value; and removing the target area from the initial inner shadow effect image to obtain an inner shadow effect image of the target text. The present disclosure utilizes the feature that pixel points in the signed distance field image of the target text of which distance field values are greater than a preset value are located outside of the target text, and removes the target area composed of pixel points located outside of the target text, thereby drawing the inner shadow effect of the target text.
(FR) La présente divulgation concerne un procédé et un appareil de traitement d'effet d'ombre de texte, ainsi qu'un dispositif et un support de stockage. Le procédé consiste à : après le décalage des positions des points de pixel dans une image de champ de distance signée d'un texte cible, obtenir une première image de champ de distance, qui comprend des points de pixel d'origine et des points de pixel décalés correspondant aux points de pixel d'origine ; d’après la première image de champ de distance, tracer une image d'effet d'ombre interne initiale correspondant au texte cible ; déterminer une zone cible composée de points de pixel décalés dans la première image de champ de distance dont les valeurs de champ de distance sont supérieures à une valeur prédéfinie ; et supprimer la zone cible de l'image d'effet d'ombre interne initiale afin d’obtenir une image d'effet d'ombre interne du texte cible. La présente divulgation utilise la caractéristique selon laquelle des points de pixel dans l'image de champ de distance signée du texte cible, dont les valeurs de champ de distance sont supérieures à une valeur prédéfinie, se situent à l'extérieur du texte cible, et supprime la zone cible composée de points de pixel situés à l'extérieur du texte cible, ce qui permet de dessiner l'effet d'ombre interne du texte cible.
(ZH) 本公开提供了一种文字的阴影效果处理方法、装置、设备及存储介质,所述方法包括:对目标文字的有向距离场图像中的像素点进行位置偏移后,得到第一距离场图像,第一距离场图像中包括原像素点以及原像素点对应的偏移后像素点。然后,基于第一距离场图像,绘制目标文字对应的初始内阴影效果图像,确定由第一距离场图像中距离场值大于预设数值的偏移后像素点构成的目标区域,将目标区域从初始内阴影效果图像中去除,得到目标文字的内阴影效果图。本公开利用目标文字的有向距离场图像中距离场值大于预设数值的像素点处于目标文字的外部区域的特征,将处于目标文字的外部区域的像素点构成的目标区域去除,实现了目标文字的内阴影效果的绘制。