Merge pull request #65 from audioglider/89bb4acfcc1270a15c94e141fa54fa0409ac1c78

Added Channel mixer filter
Merge pull request #66 from audioglider/master

Added Channel mixer filter
Improve comments
Integrate channel mixer into full program

Menu icon, etc.  The Color menu layout was also modified slightly to
keep things clean.

In this commit, I have also modified the channel mixer to allow for
mixing all channels at once.  This is the behavior in Photoshop/GIMP and
it allows for pretty complex operations.

Monochrome has also been modified slightly to match the aforementioned
programs.  The monochrome checkbox now disables the channel combo, and I
have removed "gray" as a channel option.  I think this provides the most
understandable behavior.

Unfortunately, the complexity of modifying all channels simultaneously
means optimizations like look-up tables can no longer be used.  But
because the math involved is all simple multiplication I don't foresee
any problems.  Performance remains pleasantly good.
Finalize channel mixer (including new "preserve luminance" option)

Thanks again to audioglider for this fantastic addition!
Improved file extension parsing algorithm

The old one was pretty terrible.  This one is much better - and less
code.
Fix suggested filename of duplicated images when original image had no extension

Fixes #62
New AlphaBlend API support function for layers

Useful when rendering a layer directly to a DC with full alpha support.
Premultiplication is required, and layers do not currently offer a
premultiplication function, so the assumption is that the layer has been
directly created from an image in PD's resource section via GDI+ (so
premultiplied alpha is already in effect).
Non-functional formatting changes
New support function for loading PNG resources directly into pdLayer objects

Combined with ee33f60f71a36910a83d13bb9a08451983edf2c2, this provides a
very simple way to load 32bpp image resource and render it to any
interface element.
Improve messaging
Abandon dedicated Smart Resize tool; instead, merge features into current Resize tool

Changes are not yet implemented - I just wanted to push this commit so I
could get a number of other ones synched.

This commit also lays the framework for a Canvas Resize tool.
New user-friendly approach to image resample techniques

By default, the user will be provided with a list of user-friendly
presets, e.g. "best for photographs" or "best for illustrations".  The
software will then map these to actual resample algorithms (e.g.
Sinc-Lanczos).

Advanced users can toggle a "use technical names" option to see the
actual resample algorithms, if desired.
New module dedicated to math functions

I've accumulated a lot in recent months, so it makes sense to move them
out of the "Misc" module and into a dedicated math module.
Display current aspect ratio in resize screen

Very helpful for converting an image to a new size with a known aspect
ratio (e.g. 16:9 screens, etc).
Organize and rename a number of support code modules

The "Misc" prefix has been removed from a bunch of modules (it was a
dumb addition in the first place) and new functions from the past
release have been better organized, including the creation of a new,
dedicated "color function" module.
Use new master function for all color selection actions

At present, the new master function is just a thin wrapper to the
terrible default Windows color dialog.

In the future, it will be replaced by a custom PhotoDemon color
selection dialog.  By wrapping it now, I won't have to do any extra work
upon building the new color selector - I can just drop it into place.
This will also make it simple to provide a preference, if desired, for
using the stock Windows color selector.  (Photoshop has such a
preference, which is why I'd consider it.)
Add parameter to aspect ratio calculator for inclusive/exclusive calculations

By default, inclusive is preferred (e.g. fit the entire image to the new
aspect ratio), but in circumstances like the new resize tool, exclusive
is also a valid consideration.
Improve comments
Vastly improved resize dialog (Smart Resize integration)

This commit takes the changes previously destined for a separate Smart
Resize tool and instead integrates them into the main Resize tool.  By
default, the "smart" options are hidden if "preserve aspect ratio" is
checked.

If aspect ratio is not being preserved, the new options come into play.
Basically they provide the user with alternatives to traditional
"stretch to fit" behavior, which distorts images and generally makes
them ugly.

Fit Inclusive fits the image within the new dimensions with aspect ratio
preserved.  It then fills any empty borders with a color of the user's
choosing (or transparency, if the image is 32bpp).

Fit Exclusive resizes the image so that its smallest dimension fits
without distortion inside the new dimensions.  Any overhanging image
edges are cropped.

I frequently use both these options when converting photos to wallpaper
size.  My cameras do not have the same widescreen aspect ratio as my
monitor, so it is difficult to resize them to wallpaper size without
distortion.  These new fill options make it much easier.

In the next week or two, I will be integrating these options into a
dedicated "batch resize" option within the batch wizard.