Code archives/Graphics/Image Filter Functions

This code has been declared by its author to be Public Domain code.

Download source code

Image Filter Functions by _PJ_2011
(UPDATE 15th March 2017)
Since the Code Archives limit the length of code that could be printed, these functions have been deprecated and removed pending a more versatile and efficient solution in the future.
; Sorry  

; The limitations on the code-box here truncate the function
; code leaving it incomplete.

Comments

_PJ_2011
.


_PJ_2011
Updated:

Added parameters to most functions
Improved pixel similarity detection
Improved some alogrithms
Added "Washed-Out" filter


_PJ_2011
Updated

Increased Blur effect
Improved pixel similarity detection
Improved emboss


RifRaf2011
nice,

seems not all the code made in in the code block :)


_PJ_2011
Wow, sorry RifRaf, I didn't notice that!

I'l figure something out here and re-post.

So look there if you really need them! :)

____________________________________________
_______________________________________



Edit sorted. Please see post below!


_PJ_2011
Added:
PencilImage - Approximation of pencil lines
OutlineImage - Approximation of pen & ink drawing
InkImage - Full colour realisation of OutlineImage

Fixed:
Removed some Whitespace and Comment lines preventing full function text to be displayed.

(I should be adding more functionality soon.
Extra functions will be added in separate posats below due to limited space above :)


MCP2011
I haven't tried your code out yet Malice but it does have an impressive set of features. Well done :)


_PJ_2011
Thank you, MCP
I'm not sure how much of them will really be particularly useful, unless in some drawing app, or perhaps making some loading-screen variant of a buffer capture ???

Some More addiitons/fixes:

Added:
=======================================================
NormaliseImage: Probably the most useless feature.
MosaicImage: Degrades resolution of image into defined squares

Also included are StampColour, StampPixel, RandomisePixel and RandomiseColour functions.


Fixed:
=======================================================
General cleanup and efficiency improvements.
If tolerance=100% or intensities are 0, a handle for a copy of the original instead of the original itslef's handle is now passed back.
Some minor bug fixes where few individual colour effects were ignored.
Some minor bugfixes relating to Definition checking
Blending pixel saturation fixed. No longer wraps-around
Emboss: Incorporates multiple passes for less degradation
InkImage: No longer restricted to basic colours
CharcoalImage: Should now be more accurate.
CrayonImage: Now has Greater colour definition, but a grainier finish.
PencilImage: Smoother definition.
WashoutImage: Fixed incorrect colouration.


Ross C2011
Nice work man. I'll probably find these useful!


_PJ_2011
Cheers, Ross - I hope you do.


_PJ_2011
Huge Update.

New functionality added including:

AgeImage
EdgeImage
CropImage
False-Lighting
NightVision filter

Fixes and Improvements including:

Oultine detection improved
Inking Colour resolution improved
Contour Algorithm efficienvcy
Charcoal & Chalk Dithering improvements
Brighten/Darken now operates correctly according to relative pixel brightness
Pencil strokelines

There's more, too :)


Krischan2012
Hmm looks like the code is broken as it could be too large for the code archive? It suddenly ends in the function "ColourContourCheck%":



Could you please split it up or post a Download link for the functions file?


Guy Fawkes2012
Awe! No transparency? :3


_PJ_2012
Krishcan - Sorry - the restrictions on post-size truncated the code.

Thundros - For the most part, alpha channels are preserved, what in particular were ytou referring to? It may be something I can add in!


Guy Fawkes2012
allowing transparency in a png image


_PJ_2012
PNG images contain alpha channels by default. There's nothing 'Dissallowing' them either in the code posted here or within Blitz itself.
Can you be more specific at all???


Code Archives Forum