Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 5,746
» Latest member: MartinCex
» Forum threads: 7,239
» Forum posts: 39,494
Full Statistics
|
|
|
I want to achieve 2.10 posturize with color-erase blending mode effect in python |
Posted by: Error - 07-12-2023, 01:37 AM - Forum: Other graphics software
- Replies (5)
|
 |
Hello, I am attempting to make a script of mine more efficient. I am trying to replicate the output of using posterize with the color-erase blending option in python without leaning heavily on gimp. Below is showing how posterize can influence an image's appearance.
![[Image: bugging-Me.png]](https://i.postimg.cc/8PD76N3k/bugging-Me.png)
As you can see, this is what it looks like when I take the original photo, remove the alpha channel, and posterize. Below is one of the more interesting outcomes for the color-erase blending option when applied with the posterize tool.
![[Image: asdaaa.png]](https://i.postimg.cc/qvrnG25K/asdaaa.png)
The step, by step instructions to get this effect:
1. Open image
2. Remove alpha channel of image by right clicking in layer menu
3. Select posterize from the color dropdown menu in the main window
4. In the posterize menu, select the color-erase blending mode and put the slider anywhere between 3 and 254.
Here's how to programmatically achieve the effect with Python-fu for 2.10:
Code:
groupLayer = pdb.gimp_layer_group_new(image)
srcLayer = pdb.gimp_layer_copy(image.layers[0], False)
eraseLayer = pdb.gimp_layer_copy(image.layers[0], False)
#Insert layer group with two layers inside
pdb.gimp_image_insert_layer(image,groupLayer, None, -1)
pdb.gimp_image_insert_layer(image, srcLayer, image.layers[0], -1)
pdb.gimp_image_insert_layer(image, eraseLayer, image.layers[0], -1)
#Posterize erase layer, then set paint mode to Color Erase
pdb.gimp_layer_set_mode(eraseLayer, 57)
pdb.gimp_drawable_posterize(eraseLayer, amount)
#transfer grouplayer alpha to new mask, then fill alpha with white
mask = pdb.gimp_layer_create_mask(groupLayer, 3)
pdb.gimp_layer_add_mask(groupLayer, mask)
pdb.gimp_drawable_edit_fill(mask, 2)
# Apply mask and merge group
pdb.gimp_image_merge_layer_group(image, image.layers[0])
pdb.gimp_layer_remove_mask(image.layers[0], 0)
I'm interested in anything from theorizing, to gimp source-code that can explain how I could replicate this effect. I am curious how it works. If you've made it this far, thank you for reading my post!
|
|
|
Icon Shortcuts for predefined colors/tool/filter options |
Posted by: estatistics - 07-09-2023, 08:46 AM - Forum: General questions
- Replies (5)
|
 |
I manipulate a lot of images.
I find it time consuming to click eg.
filters-->blur-->Gaussian--> ok
then
Colors --> saturation --> Ok
then
filters-->enhance-->sharpen--> ok
then repeat the whole sequence for 1000+ images.
I prefer:
to be able to put Shortcut icons for predefined options in tools eg. Blur icon with predefined blurring.
to be able to group actions in new shortcut icons e.g blur-sharpen-saturation -> BSS shortcut icon.
In that way, the whole image processing will be speed up
I dont know if someone can make an addon for such thing.
It will be HUGE advantage of GIMP.
|
|
|
My Color to Alpha options have vanished! |
Posted by: HavingTooMuchFun - 07-08-2023, 04:04 AM - Forum: Older Gimp versions (2.8, 2.6....)
- Replies (3)
|
 |
Color to Alpha on this older Gimp had always had multiple options; foreground, background, black, white, and a thing to click to choose a specific color. Nothing has been updated or otherwise changed on my computer, and I haven't done anything to Gimp either, but suddenly, Color to Alpha ONLY gives me the thing to click to choose a specific color, the other options have just VANISHED! I use these options a lot in my art, and they appear to not exist in the current Gimp… the controls are so complex that I can't be sure, lol… so I really need my previous options back! Can anyone tell me how to do that… and/or, how my options vanished in the first place? Thanks!
|
|
|
macbook lag with 2.10.34 (version1) |
Posted by: labam003 - 07-08-2023, 12:40 AM - Forum: General questions
- Replies (2)
|
 |
Hi, I'm trying to improve the laggy performance, in particular lag related to my Wacom pen. I read previous threads about "hardware acceleration" in "playground" but was not able to find in system resources. Not sure what the best solve here is.
Thank you so much for any help or suggestions.
|
|
|
|