Lots of miscellaneous layer plumbing (including the new pdLayer class)
Improve comments

I'm still not sure how best to handle Undo/Redo data for layered images.
It's a tricky problem.  To that end, I'm postponing my planned Undo/Redo
rewrite until later in the layers implementation process...
Add instability warning

Similarly, photodemon.org nightly builds will remain suspended until the
core PD back-end is once again functional.
Rework layer properties

...to how I should have done them in the first place.
Rewrite image loading code to be pdImage-agnostic

Messy work, but it has to be done.  Now that PD can't assume that
pdImage objects and image files have a 1:1 relationship, a lot of
changes to image load code have to be made.  This includes things like
moving ICC profile handling out of pdImage and into pdDIB, so that each
layer of an image (if created by loading an image file) will have its
color management handled independently.
Rework save/load code around layers

Also, misc clean-up of code while I'm revisiting.
Get PD compiling again

...this is a bigger deal than it may seem.  The old, publicly exposed
"mainDIB" object in each pdImage is gone.  This means the only way to
interact with any pdImage contents is via layers - a huge step forward.

Tons of shit is still broken, including everything in the Image menu,
but it's going to have to be dealt with on a case-by-case basis as I get
various layer bits implemented.
Implement canonical layer IDs and related get/set functions
When loading images, create a base layer and use it to hold the loaded image

Very exciting - PD can now load images using only layer-based functions!
Most edit functions still work as well!
Add top-level Layers menu
Update FreeImage with my ICO/PNG page patch

Rusty C++ skills aside, that wasn't too hard of a fix.  Here's hoping
FreeImage integrates the patch into their master build soon...
A lot more Layer plumbing
Add Layer toolbox to window manager

Ah, the joys of careful advance planning!

It was surprisingly easy to add another toolbox to the project, thanks
to the Window Manager automating all the messy stuff.  Docked/floating
works just fine, as does the visibility toggle in the Window menu.
Image position etc is all handled automatically, as is translucency on
mouse hover in docked mode.
Basic placeholder controls on the Layers dialog

I still haven't decided on how exactly the dialog is going to work/look,
but I need some basic controls for testing.
Add thumbnail requests to pdLayer objects

We need layer thumbnails for the layer toolbox.  Code is roughly
identical to the pdImage requestThumbnail function, except we don't have
to do compositing for layers.
Sync initial batch of layer plumbing

This sync includes 16 commits of varying importance.  Layer work is
progressing "full-steam ahead!" but there is a very, very long way to go
until layer stuff is actually usable.

As of this commit, PD's backend has been completely rewritten around
Layers.  The old "mainDIB" feature of pdImages is gone, and in its place
is a functional Layers array.

Currently I am working on the Layers toolbox and Layers menu, so I can
add and delete layers, which is a prerequisite to rewriting the central
viewport and compositor.  Once the viewport is functional, I can start
work on all the expected layer interactions.

Note that all Image-menu entries are broken, as they require much more
specialized code for Layer handling.  Images can be loaded and most
effects should still work, but beyond that I promise nothing.  Use 6.2
stable at photodemon.org for any actual editing.