Category Archives: Composites

Trimming away the Excess (Photoshop)

I created a problem for myself twice and with the Total Lunar Eclipse coming in April, 2014 I suspect I’ll be creating the same problem again.  I wanted to record a time-lapse of the May 20, 2012 Annular Solar Eclipse as well as the June 5, 2012 Transit of Venus.  I used a solar filter and an Equatorial Mount to help me track the sun. Unfortunately getting a good polar alignment during daylight is beyond my skill set. Without good alignment I had to manually repoint the telescope rather frequently. It is not necessary to understand any of the gobbledygook you just read except to know that the sun was MOVING from frame to frame – see the image below.  With all that movement, a time-lapse looks like a jitterbug dance.  In fact, this artsy composite shows just how much the sun moved around in my frame – that is, all over!

Solar Art

Annular Solar Eclipse with un-centered and trimmed frames. AKA Solar Art the “dots” on the sun are large sunspots.

My friends suffered from similar problems and each of them undertook automated solutions to the problem using Photoshop or something similar.  My goal was to solve the problem in a generic way and along the way I learned some useful additional Photoshop tricks.

The Solution

I used the trim feature of Photoshop.  You can find Trim under Image -> Trim.

Trim makes note of the current value of the upper left (or lower right) pixel. It then creates a selection that includes all of the rows and columns that have the same value and inverts the selection. Finally it crops off all of the selected area into the smallest possible rectangle.

An easy way to think of this is: imagine a dark photo with a white frame around it.  By using “trim” the entire white frame will be cut away.  The same approach works if the frame border is black, blue, transparent, and so on.

But there is a catch!  There is no tolerance setting for the trim value so whatever needs to be trimmed must be an exact color match. Unfortunately this presents a problem because even in a photo of a black sky, the black areas are not uniformly black.  Some values may be 0,0,0 but others 1,2,1.  And then there is noise!  Even though you may not notice a difference between two adjacent pixels trim only operates on those pixels that have EXACTLY the same value as the upper left or lower right.

To get trim to work in a reasonable fashion, therefore, we must turn all of the almost black pixels into black (or some other color).  I feel a Photoshop trick coming on here. Our trick is to use a duplicate layer and adjust it to cause it to trim the way we want. We will discard the duplicated layer when we are done.


  1. Open the image.
  2. Duplicate the image as a new layer.
  3. If the duplicate layer is a smart object, convert it to a raster layer. (To convert a smart object to a Rasterized Layer, open the layer palette, right-click on the duplicate layer and select “Rasterize Layer”)
  4. On the duplicate layer use
    “Filter -> Noise -> Dust and Scratches” with Radius = 3 and Threshold = 3.
  5. Make sure your foreground color is black (x is the hot key).
  6. Use the “Fill” tool (paint bucket) with tolerance set to 40, Opacity 100%, Mode = Normal and no options checked.  Click the extreme upper left pixel. Fill will replace all of the outer area with black. You may want to click multiple times.
  7. If you have some areas that are brighter than the object, you may also want to apply a brightness and contrast adjustment.
  8. Use the trim function on the current layer with all boxes checked and “Top Left Pixel Color” selected.
  9. Trimming changes both the working layer and the original layer below it.
  10. Discard the working layer.

Here are the steps in illustrations.

Rasterizing a smart object

Rasterizing a smart object


Dust and Scratches settings


Filling with black

Filling with black (might need to repeat this)

Dust and Scratches + Fill may not be enough. Fortunately the duplicate layer can be severely adjusted if needed since it will be discarded.


Trimming Tool

Trimming Tool

Select Areas for Trimming

Select Areas for Trimming


After Trimming

After Trimming

Delete the Extra Layer

Delete the layer that was created for the sole purpose of trimming


What If It Crops Too Tightly or Inconsistently?

This set of steps written as an action can be used to automate the process of trimming. There are still a few remaining problems to work out. Sometimes after trimming the total horizontal or vertical pixels of the object the resulting image size will differ by one or two pixels. To solve the “dimension” problem, the simplest method is to use Image -> Canvas Size. Set the canvas to about 20 pixels larger in each direction. Select “center” (the dot in the middle next to anchor) and set the fill color to match the background.

Expand the canvas and center the image

Expand the canvas and center the trimmed image

After Trim and Canvas Size

After Trim and Canvas Size

The above procedure will work quite well for animating a sequence of sun or moon shots – except for eclipses.  Eclipses don’t work properly because an edge of the sun or moon disappears leaving no edge to properly orient with the others.

What can we do when we no longer have constant edges to align with?  Divide and conquer! Instead of trying to apply the same action to all of the images, we will can change edge we select when enlarging the canvas size. We can orient sets of images based on which part of the image remains constant.   Which edge or corner should you pick? Pick the edge that stays the same (if there is one!)  For an Annular solar eclipse, at least one of the directions will never be darkened – that’s the one to pick!  The annular eclipse sequence shows that the upper left limb and lower right limbs of the sun remain present in all of the shots.

Field Rotation

There may still be another problem: Field Rotation. If you’re thinking that perhaps this has something to do with improving crop yields on a farm, sorry to disappoint you. The Annular Solar Eclipse and the Transit of Venus were events that took place over a period of from 3 to 5 hours.  During that period the earths rotation causes the sun, moon and stars to move. It also causes them to “turn” as viewed from terra firma.  You can see this for yourself if you watch the full moon from moonrise to moonset. At moonrise make note of the orientation of the “man on the moon” and compare it with the orientation at moonset. Go ahead and watch. I’ll wait for you.

So what do you do if you have this field rotation?  Either live with it and accept that the animation won’t be entirely accurate, or you’ll have to do a much more complicated set of operations by progressively rotating the images.  That’s more than we want to tackle, so you’re on your own for that!

The Results

The Annular solar eclipse sequence. The Abstract Solar Art image at the top of this article was created from the un-centered and trimmed frames. Obviously this wasn’t perfect – in part due to clouds and shimmer in the atmosphere.

Flying Dust Monsters (and Venus, too)

Not seeing the above video? Click here to watch.

Obviously this one had some trimming errors… and nasty dust on the sensor but this is the once in a lifetime Transit of Venus.

Blobulous Revisited – Part 1

It’s pretty amazing what you can accomplish with just a little bit of effort.  Below you’ll see a star trail formed using the Blobulous technique that I described in an earlier column on Advanced Star Trail Tricks.  There are many ways to achieve this effect. The method I described in the prior article – adding the last frame using Screen or Add blending – works especially well if the skies are dark. But here, I used high ISO shots about an hour before moonrise. Because of the high ISO exposures with a soon to rise moon the sky was blue not completely dark.  Adding the last frame to the stack as described earlier will work but it makes the Milky Way blow out and the sky overbright. I wanted the Milky Way to remain noticeable.


Selecting Images to Work With

There are few important things to note here. The radio telescope tracks the sky and slews from location to location causing blur. Each 20 second exposure was shot at ISO 3200, f/2.8 using a 15mm fish-eye lens on a Canon 5D Mark II. I carefully picked a range of images where the start of the sequence through to the end of the sequence included only images where the dish did not move “too far”. The next four frames show how dramatically the dish moved in subsequent shots. Had I included them it would have made quite a mess.


The dish moves far in 80 seconds…

To say it clearly: looking at the individual frames is what allowed me to zero in on the specific images I planned to stack. After selecting the range of images (C_072887 to C_072935),  I stacked them using good ‘ol brightness mode stacking. You can stack using a ton of methods but our favorite, of course, is to use the Advanced Stacker+ from though the free TEST Stacker can do the job, as can a variety of free tools that we describe in this article and in our Star Trails Webinar.

To create the shot below on the RIGHT you’ll need Photoshop or some equally featured program that allows layering and masking like GIMP. Even the lowly, stunted Photoshop Elements will do the trick. After doing a normal brighten mode stack, the output looks like what you see on the left.  After some image manipulation magic, we achieve the result on the right.


Before (left) and After (right)


It would be tedious to show step by step what I did, so I will start with a “one shot” view. You’ll notice there are 9 layers that contribute to the final image.  The top – SLC-SCA – is obvious, it’s my watermark.

Results with all layers shown.

Results with all layers shown.

However you can also see the brighten mode stack (at the bottom), and a copy of that same stack with a layer mask.  If you look carefully it’s pretty obvious that the black on the mask corresponds to the upper part of the moving dish.  Sharp eyes will notice two additional blacked out parts corresponding to the other radio dishes.  Notice that above the stacked layer is a single frame: C_072934 – the next to last image from the set used in the stack. All the layers above the single frame are adjustments to correct color, white balance, hot pixels (the Heal layer), and to do some sharpening.


The single frame (934) is blended in Lighten mode with the stack. The stack is at 36% opacity.

The essential bit of magic here is that the Brighten layer is only used at 36% opacity. 36% was chosen by eye. I slowly reduced the opacity until the Milky Way became noticeable rather than a blur and yet the star trails remained noticeable.

The image was nearly complete by painting out (excluding) the blurred stack areas using a black brush at 100% opacity with a small amount of feathering – i.e. a brush that was not 100% hard.  It’s easy to paint on the mask and watch how the blurry dish from the stack is replaced by the non-blurry single image from C_072934.  If you’re wondering why I didn’t use the final image, C_072935, it’s because it was a tiny bit blurrier than the preceding image.

The rest of the adjustments are straight forward – they were all meant to fix contrast, darken the overbright areas and then correct for the color saturation increase that occurs when you darken an area with color.

We cover complete details in the PhotoManipulation webinar series.

Here is the image obtained from the next set of exposures after the dramatic dish move. This image used the “Streaks” stacking method available in the Advanced Stacker, but is otherwise identical in creation.


For yet one more take – using yet another Advanced Stacker Mode (long streaks), there is this.

Long Streak Runnin'

In the next column I’ll show all the steps I took to produce the first image on this page.


More Star Stacking Tricks: Use the Bridge

Red Rock Cometary [C_009865-76+79brC]
Perhaps the most popular thing we’ve done at StarCircleAcademy is to provide a stacking action for Photoshop.  What can you do with it? Alas, you can’t use it to end hunger, or create world peace. However, the action allows you to automate the task of creating star trails from individual images. You can create the trails from JPGs, TIFFs, or even RAW files in fact from any file that Photoshop is able to load.

You have to capture the images in the first place, so we humbly suggest you begin with understanding How to expose, how to shoot, what settings to use, and even what to consider to create a more compelling image. Or if this is all new, start at the beginning and learn about night exposures and the kinds of star shots that are possible.

Beacon [C_069244-92]

Curious about the circle? It is formed by shooting north in the Northern latitudes.

If you have already used the Stacking Action as we previously described you are all set to put on your big-boy pants and do more advanced stacking tricks using, of all things, the lowly Adobe Bridge. Bridge is a lighter weight version of Lightroom (sort of) and it comes with Photoshop and other Adobe products for no extra fee.

Why would you want to use Adobe Bridge as the front end?

  1. Bridge allows you to do mass corrections to raw files before they are used by Photoshop. Anything that Adobe Camera Raw can do, Bridge can do to a number of files all at once.
  2. Bridge has an operation called, uhm, “Stacking” which is a way to group images together in a nice memorable way.
  3. Bridge allows you to SEE and select specific files to operate upon – unlike the “folder” method you may have been using previously.
  4. Bridge is relatively lightweight and doesn’t need preloading as Lightroom does.

It is slightly more complicated to use Bridge for stacking, but do not worry. We will make it as simple as possible.

Suppose you have a number of files to stack and they are located in a single directory along with a number of files that you don’t want to stack. Below I’ve navigated to a big directory full of CR2 (Canon Raw Files) and I’ve used the Ctl Key to select the first four images of a star trail sequence.


As is my customary practice I used a number of colors and lighting methods to begin my star trail and I can tell I don’t like C_066715 or C_066716 (which is too green).  So instead I’ll start with image C_066717.CR2.  Scanning forward, the clouds start to become a problem by image C_066739 so I have picked images 717 through 738.  I won’t be describing how to use it here, but if you look on the lower left side of the Adobe Bridge screen there is a “Filter” window where you can choose images based on ISO, exposure time, keywords, etc.  That may come in handy if you want to only select the 24 second exposures in a sequence.

Getting back to my quest… Though I don’t have to, I will mark the images I’ve selected as a stack.  NOTE: Images can only be in one stack.


And then I will select ONE of the images to decide what “develop settings” to apply. That is, what to do with the image before stacking it.

AdobeStackSelect.bmpHere is where I’ll give you a hint to keep you from banging your head on the wall. If you click the “image” of the stack you will only select the first image.  However if you click on the count of images (where the yellow arrow points) it will select the whole stack. Here I’m selecting only the first image by double clicking it. My primary interest is getting the color balance about right.  There are lots of ways to adjust the white balance including using the white balance tool or adjusting the color temperature. This is also a potential departure point because there are two ways I might want to address my set of images:

  • I may want a nice clean star trail with gaps as small as possible, OR
  • I may want to produce individual frames for an animation or timelapse.


If my goal is a star trail, then I will set all of the sliders to zero, set noise reduction to zero, and set the curve to “linear”. About the only thing I’m likely to do is vignette correction – leave lens correction for later, it may cause bad things. In fact, I have created an ACR preset to do exactly that I call it “linear”.  If, however, my goal is a timelapse, I’ll try to beautify the image as much as possible including sharpening, noise reduction, and exposure corrections.

For this example, I am taking the beauty route. I made the adjustments I want and saved the settings as a preset called “TronaStack”.  Next I will apply those settings to all of the images in my stack.  What really happens is that Adobe Bridge creates sidecar (XMP) files for each of the images and re-renders the file in Bridge to approximate the changes.

Mass Applying Settings


With all the raw settings applied, I want to do the stacking operations exactly as described here – but we will be using “Bridge” as the source.


NOTE: Your menu might look a little different especially if you haven’t installed Dr. Brown’s Services.  As you might have guessed, using “Photoshop -> Batch” invokes Photoshop.  The next screen you see will look familiar except you’ll notice the Source is Bridge.


As the instructions state, you should run the “Do This First” operation. It creates a properly sized black background using the dimensions of the first photo in the stack.  You then re-run it with the operation you want. Here I’m using the comet stacking option of the Advanced Stacker.  It is important to make note of the output options. If you don’t override them, the intermediate result will be written over itself repeatedly.


The Advanced StarCircleAcademy Stacking actions will create “Comet_” documents but you’ll need to add a unique number as shown above. If you don’t like the base name, you can substitute whatever you like instead of “Document Name” above. E.g. “MySequence”. I often set the starting serial number to the first image number in the stack since I try to make sure I uniquely number every image I capture.

After stacking the output appears in the “C:\tmp\StackTest” folder like this:


What is especially cool is that I’ve directly stacked the RAW files into “comets” for an animated sequence.  I could then create a timelapse out of those images if I wish.  Of course there is one hitch. The huge files are too large to easily create a meaningful timelapse. It would be so much nicer if all the images were straightened, downsized and cropped to a specific format like 1920 x 1080 (HD) or 800 x 600. That is a topic for another column, but Adobe Camera Raw can do the trick. And it’s also possible to do the deed with the Advanced Stacking action.

If you’re wondering how you can get your hands on the Advanced Stacking Action with comets and more see the Store.

Can I Use Mini Bridge?

Well, yes, you can, though Mini Bridge only works if Bridge is open so it’s not really very mini!


Advanced Star Trail Tricks

Published: Oct 11, 2012
Last Update: February 14, 2018 (remove Flash)

I have been playing with Star Trail processing for quite a while.  Ever since I wrote the StarCircleAcademy Stacking Action I’ve been tweaking processing to try different things. Sometimes failure is inevitable, sometimes… well, you’ll see.

First, you may want to look back through my earlier columns on shooting and processing star trails because this is not a primer on star trails – it builds on what I’ve previously written and this is not a good place to try to understand what stacking is.

Second, please understand that I use a variety of tools but almost all of my more successful endeavors end up as layers that are combined in Photoshop (CS5 at the moment).  You could combine your layers in GIMP if you don’t have Photoshop, but you’ll be out of luck if you try to use Lightroom.

Here are my star trail effects:

  1. Smoothee – Averaged sky and/or foreground to reduce the grittiness that sometimes results from brighten stacks. I’ve been espousing this for quite a while. See the Simple Astrophotography Processing Technique.
  2. Blobulous – stars at the beginning (or end) of a trail are made to stand out from the rest of the trail.
  3. Comets – star trails appear to grow brighter and the end of the trail looks like the nucleus of a comet.
  4. Streakers – Like comet only the trails are longer
  5. Blackened – A clever trick removes sky glow from light pollution, the moon, or twilight.

And of course you can make “Blobulous Comets” and “Blobulous Streakers” and “Blackened Smoothee Comets” and more.

Building Blocks

To creatively combine exposures, I usually create the following stacked frames.

  • Dark (Darken in Image Stacker/StarStax)
    The darkest elements emerge – especially the hot pixels
  • Brighten (aka lighten) stack
    The Brightest of everything is present, including hot pixel and more noticeable noise
  • Average
    Contrast is reduced, smoothness increased.
  • Additive (called “Stack” in Image Stacker)
    Hot pixels become really bright.
  • Scaled (called Stack/Average in Image Stacker)
    Allows some increase in brightness but more smoothness, too. Experiment with different divisors.

Normally I create all of these combinations using Image Stacker against my JPG files because it is really easy to do.  I end up with a set of frames something like these although I’ve significantly brightened them so that they are easier to see.


In a Nutshell: Combine the Average stack over the Brighten stack using Normal mode at 45% opacity.

I’ll start with the Smoothee technique since it’s probably the easiest to do and perhaps the easiest to understand.  The problem with “Brightness” (or lighten as it’s called in Photoshop) is that it will also pick up all the hot pixels, and the brightest bits of noise.  Averaging on the other hand tends to smooth out everything except for truly hot pixels since most noise is random. By putting an averaged stack as a layer over the brighten stack and then adjusting the blending modes and opacity you get a smoother sky and foreground.  Exactly what settings to use depend on the images, but surprisingly many of the blending modes for the Average layer work here including Darken, Multiply, Overlay, and Normal. The starting place for Opacity is about 45%.

Hint: You can also use an Additive stack instead of the average stack but usually only the Normal blend mode will work.  For even more fun combine the Additive stack and the Average stack.

For additional smoothness you can also subtract the “Darken Stack” while adjusting the opacity to prevent halos and weirdness.


In a Nutshell: Add one of the single frames more than once.

What do “Blobs” look like? Like this…

“Fat Star” processing.

There are two ways to produce “Blobs”. One way is to add “Comets” to a smoothed star trail. The other is to simply pick an image (usually the last one in the set) and add it in using “Add” or “Screen” mode. To make the blob more pronounced duplicate the last frame so it’s added twice. BUT remember when you add in any single image the hot pixels are going to come out… and even more so if you add an image twice.

Comets and Streakers

These two techniques require some fancy stacking techniques. Fortunately I’ve created an action to do all the fancy stuff.  I’ll be rolling out the action and the explanation to my Photo Manipulation Webinar participants first <NOTE: The Advanced Stacker PLUS action has been released and is available for purchase in our store>.

Oh, here is a peak at what the Comet action looks like:

What's The Point?

And here is what an animation of comets might look like:

Star Rise



I know you’re going to ask so let me save you some typing. Except for the “Comet” image above, all images used in these illustrations were taken during the Ancient Bristlecone Pine Workshop in the Patriarch Grove on White Mountain, East of Bishop, California.

The 34 or so images that I’ve combined in the examples above were all taken with the following settings: Canon 50D, ISO 400, f/3.5, 79 seconds, 10-22mm lens at 15mm.