Merge pull request #134 from audioglider/master

Effects -> Added Sunshine filter effect
Effects -> Natural -> Sunshine is now integrated

Many thanks to @audioglider for another excellent filter.  Really lovely
work, as always.
Keyboard accelerators: prevent them from eating keystrokes in common dialogs
Various minor UI improvements

- Clean up layer toolbox buttons and add tooltips.
- When deleting a layer, activate the layer that appears at the same
position on-screen (rather than activating the layer with the same index
number).
- Much faster viewport refreshes when just changing the active layer.
(We don't need to recomposite the image, so skip that step entirely.)
- Faster restoration of the default cursor after an action has
completed.  Amazing how something as small as this makes the program
feel snappier.
prep/finalizeImageData: add support for caller overriding automatic premultiplication handling

If alpha handling is unnecessary, functions can gain some speed by
overriding automatic handling of premultiplication reversal.  However,
any function that changes image alpha (e.g. Blur, etc) should never use
this, or invalid alpha values will result!

This feature is primarily for effects and adjustments that only affect
RGB values.
pdSelection: reduce debug messaging
Pixelate effect: fix to process the alpha channel, if one exists

Without this, the resulting effect is uuugly on 32bpp images.
Adjustments > Levels: UI overhaul

This should *finally* bring the Levels dialog into line with other photo
editors.  Apologies that it took me so long to fix this.

Still to-do on this dialog:

- "Auto levels" button
- Color selectors for input shadow/highlight tones
- Toggle for logarithmic vs regular histogram
- Possibly separate channel handling.  I have already included code for
generating and rendering individual RGB histograms.  However, some deep
changes would be required to the Levels mapping itself, so I'm holding
off until I've gotten a better handle on how extensive the code changes
would need to be.
Adjustments > Levels: add support for per-channel levels

Uuuugh, changes like this are a headache.  When a dialog doesn't have a
1:1 correlation between on-screen controls and affected data, a lot of
custom handling is required to make sure presets and last-used settings
behavior persists properly.  This Levels tool is particularly messy
because the text up/down limits are codependent, because the input
shadow level cannot exceed the input highlight level (and vice-versa).

I think I've sorted everything out, but it's always hard to know until a
few days have passed and the dust has settled...
Adjustments > Levels: implement Randomize option
GDI+ interface: new "fill rect" function

Helpful for rapidly setting new RGBA data to a DIB
pdDIB: finally implement "set alpha at creation time"
Command bar: fix various parsing issues
"Add new layer" dialog

Helpful for setting a base color layer when working with 32bpp images
Rewrite central convolution filter code

PD now provides a standalone "ConvolveDIB" function, which will apply an
arbitrary 5x5 convolution filter to any source and destination DIB.
This makes it much easier to utilize convolution filters internally,
without having to reproduce the full convolution filter function over
and over again.

Existing functions that make direct use of arbitrary convolution filters
have been rewritten to account for this update
Effects > Find Edges: overhaul dialog and underlying code

One of the recurring requests I get for PD is more/better artistic
effects, specifically ones that recreate a "hand-painted" sort of look.
There are a lot of ways to create such filters, but many rely on
edge-processing algorithms to find image edges, which the filters than
further process to mimic a "hand-painted" look in varying styles.

To that end, I have overhauled PD's edge detection code (and
corresponding dialog) to make it more amenable to internal use by other
functions.  Directionality is now explicitly supported, with capable
filters updated to process edge detection in horizontal, vertical, or
both directions simultaneously.  PD's (awesome!) layer compositor allows
us to blend results from multiple blend directions quickly and
accurately, and of course all previous edge-detection features are
unchanged by the overhaul.

This new structure will also make it much easier to add more advanced
edge detectors (Canny, etc) in the future, should I feel so inclined.
pdCanvas: new status bar features

- Dedicated "fit image on screen" button at the far left
- Instead of allowing Image Resize by double-clicking the image size
(which is a UI paradigm never used elsewhere in the program), convert
the Image Size icon to a clickable button.  This mirrors the clickable
zoom buttons to the left, and is a much more consistent interaction
expectation.
- Minor layout adjustments
Rendering engine: make some calculations floating-point to avoid checkerboard show-through

This fixes a rare edge case where GDI's PatBlt and GDI+ calculate render
bounds differently, potentially leaving a thin strip of checkerboarding
around non-transparent images (despite GDI+ tile wrap mode being used).
Drag/drop: fix save state calculation for downloaded images

Same fix as 435cb4631457cd651f9af7d3c773dfa39f4bd89c, but I forgot to
mirror those changes across the drag/drop variant of the code.
Adjustments > Levels: implement color selection UI

- Color selector boxes now reflect the relative colors of the current
shadow/highlight settings
- When the shadow or highlight color is directly changed (by clicking on
a color box), all on-screen elements are automatically synced to the new
color
- Separate color picker buttons allow the user to assign
shadow/highlight colors by right-clicking the preview box