Bogdan
Members-
Posts
79 -
Joined
-
Last visited
Everything posted by Bogdan
-
Hi, As the title is saying, is it possible to turn selections into strokes? For example if I use Polygonal Free Hand selection, or the Flood Select tool with zero tolerance, can I get a Vector Stroke out of it? Or, to get vector Strokes and Fills from a raster image can I use Affinity Designer maybe? This is also known as Convert Selection to Vector Path and as far as I see from searching the web, can be done in other editing software. Thanks!
-
@lacerto, thanks for looking into it. interesting study. I wander how Photoshop is doing it...? Reduce color pallet to a user defined set of colors. I don't remember. I played a little bit more with my stuff. Starts to become similar to the Instagram filters. One certain advantage is the speed. in 7 minutes I can have around 25 variations. And since there's no interpolation between pixels, each color can be selected with Select Sampled Color and readjusted.
-
@iconoclast, This is not a question of preference. The reason why I do this is because I want to create stencils. So when you do graffiti stenciling you need to use the colors provided in the spray cans. You need to choose from their palette. So every layer of color needs to be CNC milled based on the colors that you chose, in some plywood. The more layers you have, the more expensive the artwork becomes to produce. SO it's like tailoring the end result according to budget and time.
-
Thank you both @iconoclast, @lacerto, Honestly, at this point the best is to use my own Python script 😅 Here's one based on yayoi kusama , untitled painting from 1967. And btw, on a 640x854, it takes around 10-15 seconds to recompute the image on a custom palette. And I am a very bad computer programmer. I placed a request under Affinity Photo for Desktop. Maybe it will get implemented at some point.
-
import numpy as np from PIL import Image #color palette from image https://colordesigner.io/color-palette-from-image list_of_colors = [[229,219,212],[56,46,56],[137,110,109],[112,110,119],[169,166,171],[48,93,152]] def closest(colors,color): colors = np.array(colors) color = np.array(color) distances = np.sqrt(np.sum((colors-color)**2,axis=1)) index_of_smallest = np.where(distances==np.amin(distances)) smallest_distance = colors[index_of_smallest] return smallest_distance im = Image.open('dune-2021.jpg') # Can be many different formats. pix = im.load() print ("images size = " + str(im.size)) # Get the width and hight of the image for iterating over nr_of_pixels=im.size[0]*im.size[1] current_pixel=0 array_colors = [] for y in range(0,im.size[1]): for x in range(0,im.size[0]): current_color = pix[x,y] # Get the RGBA Value of the a pixel of an image closest_color= closest(list_of_colors, current_color) array_colors.append(closest_color[0][0]) array_colors.append(closest_color[0][1]) array_colors.append(closest_color[0][2]) np_array = np.asarray(array_colors, np.uint8) np_array = np_array.reshape((im.size[1], im.size[0], 3)) print (np_array.shape) print (np_array) data = Image.fromarray(np_array) data.save('gfg_dummy_pic.png')
-
Hi! Custom color palette conversion, similar to PNG export options, already available, or similar to Indexed Color Mode in Photoshop, or similar to GMIC-QT filter in GIMP. For each pixel in an image or layer: Calculate the the most similar color from a user-defined custom color palette. Replace the color of that pixel with that similar color. Thank you! P.S. initial discussion available here:
-
Every color from the initial image gets assigned one from the custom color palette, all pixels have to be computed. If the image has several layers, this color-palette transition could be applied to every layer. But blend modes (darken, multiply, etc.) should not be taken into account. The layer is computed as it is in the Normal state. Multi-thread is possible. Here is a Python code using numpy: https://stackoverflow.com/questions/54242194/python-find-the-closest-color-to-a-color-from-giving-list-of-colors?answertab=trending#tab-top
-
You should definitely design and sell cool gift-cards. Best way to drag your friends into new software on Christmas! ;D