Download:
https://drive.google.com/file/d/11SLOfg ... drive_link
or Unpack to Command Modern Operations\Symbols\Directional
Here is backup icons default(without outline) https://drive.google.com/file/d/1yhGUeO ... drive_link
DIY chatgpt code:
Code: Select all
from PIL import Image, ImageDraw
import os
# Input and output folder paths
input_folder = r'C:\Users\DmitriyBlade\Desktop\SMALL'
output_folder = r'C:\Users\DmitriyBlade\Desktop\Stylized(outline)'
# Create the output folder if it doesn't exist
if not os.path.exists(output_folder):
os.makedirs(output_folder)
# Outline color (black)
outline_color = (0, 0, 0, 255) # RGBA
# Outline width in pixels
outline_width = 4
# Process each image in the input folder
for filename in os.listdir(input_folder):
if filename.endswith('.png'):
# Open the image
image_path = os.path.join(input_folder, filename)
image = Image.open(image_path).convert("RGBA")
# Create a new image with the same dimensions and a transparent background
new_image = Image.new("RGBA", image.size, (0, 0, 0, 0))
# Paste the original image onto the new image
new_image.paste(image, (0, 0), image)
# Create a draw object for the outline
draw = ImageDraw.Draw(new_image)
# Find the shape using the alpha channel
shape_pixels = set()
for x in range(image.width):
for y in range(image.height):
r, g, b, a = image.getpixel((x, y))
if a > 0:
shape_pixels.add((x, y))
# Draw the outline around the shape
for x, y in shape_pixels:
for dx in range(-outline_width, outline_width + 1):
for dy in range(-outline_width, outline_width + 1):
if (x + dx, y + dy) not in shape_pixels:
draw.point((x + dx, y + dy), outline_color)
# Save the result in the output folder
output_path = os.path.join(output_folder, filename)
new_image.save(output_path, format="PNG")