GIMP Chat http://gimpchat.com/ |
|
Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. http://gimpchat.com/viewtopic.php?f=9&t=14453 |
Page 1 of 2 |
Author: | trandoductin [ Wed Aug 24, 2016 12:18 pm ] |
Post subject: | Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
This is a G'MIC plugin script. In Linux, look for a file called .gmic in your $HOME/ folder On Windows, it's a filed called user.gmic in your %APPDATA%/ (on mine it's C:\Users\Tin Tran\AppData\Roaming\user.gmic If it's not there create it. If it's there paste this code in there at the appropriate place, i hope you're able to tell where the appropriate place is (I am guessing just end of file) I don't know because I previously don't have that file. Code: Select all #@gmic Alternately if you do not yet have the .gmic file or user.gmic file already just use this file. Attachment: And then you'll have an available filter in G'MIC that looks like this. You can control these 4 thresholds on the fly and preview the result (a little slow but i am just happy it works). Then after applying, you can run the Obama Posterize scheme script And the result will reflect the manual multi thresholds that you used. As an example here this result i have it reflects the thresholds that I used above. Warning: Threshold1 < Threshold2 < Threshold3 < Threshold4. Thresholds must be incrementally different. If a lower numbered threshold is higher than a higher numbered threshold, it'll poop out and give white areas. You've been warned. |
Author: | garagecoder [ Wed Aug 24, 2016 1:05 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
G'MIC part is working fine, pretty sure it took a lot longer for me to get something useful out of G'MIC. Nicely done |
Author: | trandoductin [ Wed Aug 24, 2016 1:15 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
heheeh I don't think it's possible to take longer. I already milked all the hours out of the day hunting around for what i needed. my goal was to make it work no matter how slow. |
Author: | mackenzieh [ Wed Aug 24, 2016 5:33 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
This seems like a nice filter, but the folder doesn't come up for me in C:/Users/Mackenzie. It only comes up in the search but the folder itself isn't visible. I have windows 7 64Bit |
Author: | trandoductin [ Wed Aug 24, 2016 6:20 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
The AppData folder is defaulted as hidden folder. Trying clicking on View when you're viewing your user's folder, and then tick the Hidden Items or something similar and it'll appear. |
Author: | mackenzieh [ Wed Aug 24, 2016 7:00 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
trandoductin wrote: The AppData folder is defaulted as hidden folder. Trying clicking on View when you're viewing your user's folder, and then tick the Hidden Items or something similar and it'll appear. [ Image ] I don't see anything like what your image showed. However, when I click properties, I see this: |
Author: | trandoductin [ Wed Aug 24, 2016 7:13 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
mackenzieh wrote: trandoductin wrote: The AppData folder is defaulted as hidden folder. Trying clicking on View when you're viewing your user's folder, and then tick the Hidden Items or something similar and it'll appear. [ Image ] I don't see anything like what your image showed. https://www.google.ca/search?q=how+to+show+hidden+files+on+windows+7&ie=utf-8&oe=utf-8&gws_rd=cr&ei=ETi-V8v9GoLhjAPcy4aoCA |
Author: | mackenzieh [ Wed Aug 24, 2016 7:22 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
trandoductin wrote: mackenzieh wrote: trandoductin wrote: The AppData folder is defaulted as hidden folder. Trying clicking on View when you're viewing your user's folder, and then tick the Hidden Items or something similar and it'll appear. [ Image ] I don't see anything like what your image showed. https://www.google.ca/search?q=how+to+show+hidden+files+on+windows+7&ie=utf-8&oe=utf-8&gws_rd=cr&ei=ETi-V8v9GoLhjAPcy4aoCA I edited my previous post. |
Author: | trandoductin [ Wed Aug 24, 2016 7:27 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
go to the link i posted it tells you how to do it on Windows 7 there are minor differences on different windows. |
Author: | mackenzieh [ Wed Aug 24, 2016 7:37 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
trandoductin wrote: go to the link i posted it tells you how to do it on Windows 7 there are minor differences on different windows. I've changed my mind. I'll wait to see if the new version of GMIC gets this plugin installed. |
Author: | trandoductin [ Wed Aug 24, 2016 8:41 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
i don't know what the process is for it to get into the next build. |
Author: | mackenzieh [ Wed Aug 24, 2016 9:11 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
trandoductin wrote: i don't know what the process is for it to get into the next build. Me neither but I'm okay with waiting to see if it gets into the next build. |
Author: | MareroQ [ Thu Aug 25, 2016 1:11 am ] | ||
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. | ||
It works great in Vista 32 Bit (for GIMP 2.8.18 i 2.9.5) I changed a location in the menu GMIC. Thanks Tin.
|
Author: | trandoductin [ Thu Aug 25, 2016 10:56 am ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
MareroQ, do you know what the process is (in order to get it into the next G'Mic build)? |
Author: | Rod [ Thu Aug 25, 2016 11:07 am ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
I just opened notepad ++ and created the file and saved as "user.gmic" in the roaming folder in windows 10. Thanks, this works nicely for preview before executing the script. |
Author: | trandoductin [ Thu Aug 25, 2016 11:12 am ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
but it is still slow...at least i think so for each threshold color i had to blend 2 layers using subtract mode so 10 layers + 5 result layers, then blend all 5 layers using addition at the end. If i only knew what blending mode to use to get normal like what how Gimp treats layers I think it'd be much faster. |
Author: | garagecoder [ Thu Aug 25, 2016 11:26 am ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
Hopefully when David's back he will add a new gmic community file for you (so it appears on filter list after refresh). Perhaps the blending mode you're after is "blend alpha" ? I may have time at the weekend to look more closely and help speed things up... |
Author: | trandoductin [ Thu Aug 25, 2016 1:01 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
I have looked that this page https://sourceforge.net/p/gmic/wiki/Blending%20modes/ And none of the modes does a normal gimp layer over top of layer result. Correction: Alpha seems like what i want to do according to the above page...but when i try it it doesn't seem to want to work i keep getting a whole layer filled with one color. |
Author: | garagecoder [ Thu Aug 25, 2016 2:13 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
OK I couldn't resist Here's another way of doing it: Code: Select all #@gimp Multi Thresholds : multi_threshold, multi_threshold There are even shorter ways but then it becomes hard to read. Some explanation: --rgb2ycbr -channels. 0 = another way of getting luminance --fc[0] r,g,b = take a copy of image [0] and fill with rgb color --ge[-2] x = create a new image from luminance, any value greater than or equal to x will be 1 -j[0] [-2],0,0,0,0,1,[-1] = draw image [-2] onto image [0] using [-1] as a mask |
Author: | trandoductin [ Thu Aug 25, 2016 2:18 pm ] |
Post subject: | Re: Multi Threshold G'MIC plugin AKA "Pre Obama Posterize" Script. |
I have no idea how you do it..but this version is awesome it doesn't bug out when threshold is out of whack either and seems super fast. Great...now how do we get this into the next build? |
Page 1 of 2 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |