Share this topic on AskShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: [Script-Fu] Halftone Pixel Effect  (Read 1926 times)

0 Members and 1 Guest are viewing this topic.

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
[Script-Fu] Halftone Pixel Effect
« on: March 10, 2009, 09:58:35 AM »
I came across this tutorial a long time ago (Halftone Pixel Effect) and really liked the effect, so I decided to script it before it got lost.  I've set the script to allow you to select the dither type, but the default is "Positioned Dithering" because that's what matches the tutorial. 
Download the script here: Halftone Pixel Effect Script Here's the image used in the tutorial and examples of all dither types (click on the image thumbnails to view in larger size):

Original Image



Positioned Dithering



No Dithering



Floyd-Steinberg Normal Dithering



Floyd-Steinberg Reduced Color Bleeding Dithering



Positioned Layer on Top of No Dithering Layer (Created by running script back-to-back)



Save it to your GIMP scripts folder (ie....C:\Program Files\GIMP-2.X\share\gimp\2.0\scripts) and then go to Filters > Script-Fu > Refresh Scripts.

On an open image, go to Filters > Decor > Halftone Pixel..."  and choose your dithering option.  This script works on RGB and Indexed images (with or without an alpha channel.)  Also, I decided not to merge the two layers together, which will give you the option to change the layer Blend Mode and Opacity if you so desire.

Let me know if you run into any problems with it.  Suggestions welcome.
« Last Edit: March 20, 2009, 06:31:52 AM by fencepost »
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline istarlome

  • Global Moderator
  • Posts: 954
  • Karma: 0
    • istarlome.deviantart.com
Re: [Script-Fu] Halftone Pixel Effect
« Reply #1 on: March 10, 2009, 10:16:50 AM »
that's really cool.  thanks for sharing this. :)


Offline HippieKender

  • Global Moderator
  • Posts: 1,104
  • Karma: 0
  • I seem to lick circular things...
    • hippiekender.deviantart.com
    • hippiekender: PhotoBucket
    • @HippieKender:twitter
    • HippieKender.com
Re: [Script-Fu] Halftone Pixel Effect
« Reply #2 on: March 10, 2009, 11:39:58 AM »
Ooh, this looks like it will be fun to play with!  Thanks Art!

GimpDome dA Group ||  GimpDome's CafePress || @GimpDome on Twitter
The most precious thing one can make is a friend.

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: [Script-Fu] Halftone Pixel Effect
« Reply #3 on: March 10, 2009, 11:43:11 AM »
Y'all are very welcome.  It's driving me nuts though that I can't figure out how to do this with an Indexed image!  :(" title="Angry" border="0" class="smiley"/>  GIMP just doesn't accept the steps.  MY OCD is kicking in now....
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline Darth_Gimp

  • Number One
  • *****
  • Posts: 2,892
  • Karma: 0
  • Faith, Folk, Family!
    • lds-jedi.deviantart.com
    • Odinic Rite
Re: [Script-Fu] Halftone Pixel Effect
« Reply #4 on: March 10, 2009, 02:48:45 PM »
Love it... I think I'll mess with this tonight!
GimpDome Group: http://gimpdome.deviantart.com/
My DeviantArt: http://lds-jedi.deviantart.com/

There's no worse feeling than that millisecond you're sure you are going to die after leaning your chair back a little too far.


Offline paladin169

  • Member
  • **
  • Posts: 1,601
  • Karma: 0
  • Cookies!
Re: [Script-Fu] Halftone Pixel Effect
« Reply #5 on: March 10, 2009, 03:48:02 PM »
Very nice job, Maybe you could make a tutorial on basics of programming this stuff.   
Formerly sponge!


Offline Darth_Gimp

  • Number One
  • *****
  • Posts: 2,892
  • Karma: 0
  • Faith, Folk, Family!
    • lds-jedi.deviantart.com
    • Odinic Rite
Re: [Script-Fu] Halftone Pixel Effect
« Reply #6 on: March 10, 2009, 04:12:57 PM »
« Last Edit: March 10, 2009, 04:19:38 PM by Darth_Gimp »
GimpDome Group: http://gimpdome.deviantart.com/
My DeviantArt: http://lds-jedi.deviantart.com/

There's no worse feeling than that millisecond you're sure you are going to die after leaning your chair back a little too far.

Offline z3matt

  • Member
  • **
  • Posts: 213
  • Karma: 0
Re: [Script-Fu] Halftone Pixel Effect
« Reply #7 on: March 10, 2009, 04:36:17 PM »
This is for Gimp 2.6.x, right?

I like the looks of this :)
Favorite:
Newest:

Offline paladin169

  • Member
  • **
  • Posts: 1,601
  • Karma: 0
  • Cookies!
Re: [Script-Fu] Halftone Pixel Effect
« Reply #8 on: March 10, 2009, 07:02:55 PM »
Ah, my bad.  Haven't been digging around in the tutorials section yet since i've been back.
Formerly sponge!


Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: [Script-Fu] Halftone Pixel Effect
« Reply #9 on: March 23, 2009, 02:14:37 PM »
Here's another scripting tutorial that might be of interest: GIMP Defaults Script - "Mad Lib" Style

This one is a "fill-in-the-blank" tutorial.  It doesn't go into the nuts and bolts of scripting, but maybe will give you a quick understanding.

Art

Posted on: March 11, 2009, 04:14:43 PM
Modified script to fix a flaw, which would not readily allow it to run back-to-back.  Here's an example of running the script back-to-back (Positioned layer on top of a no dithered layer):



Nothing fancy, just an additional effect.  If you downloaded the previous script, delete it and download the updated script.  You may have to refresh your browser window (typically F5 on the keyboard will do that) to make sure you've got the most recent version.  If you look at the bottom of the script and you see "March 12, 2009," you'll know it's the right one.

Art

Posted on: March 12, 2009, 10:10:09 AM
Script has been modified to work on Indexed images (those with/without alpha channels.)  If you want this functionality and you've already downloaded the previous version, please delete your other one first, click on the link, refresh your browser window (F5), and install the new version.

Posted on: March 19, 2009, 01:57:10 PM
Based on suggestions from saulgoode and Photocomix at gimptalk.com, an option to create a layer mask from the original layer has been added as well as the ability to change the blend mode/opacity.  You can then invert the colors of the layer mask and/or upper layer for some interesting effects.

If you have the previous version, please delete it to avoid conflicts within GIMP.  Install the new one, refresh your scripts and have fun!

Art

Posted on: March 20, 2009, 08:31:08 AM
The script has once again been updated!  The original worked on the existing image and, if you had multiple layers, everything would be impacted by that.  I felt that this should be able to work at the layer level and have modified the code accordingly.  I also added a couple of new features:

Working on visible layers...this way if you want the effect to work on everything you can see in the active GIMP window, a copy will be made of that and the halftone effect applied to everything visible.  If you only want to work on the active layer, leave this unchecked.

Inverting the colors of the halftone layer and/or the colors of the layer mask.  These are subtle, but nice features. 

Please delete your previous script to avoid conflicts.  Let me know if you have any problems or suggestions.
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.


Tags: