Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This approach has these advantages over aligning images in adobe illustrator or other vector
package:
2. Ability to make image brightness, contrast and other adjustments live (and reversibly)
3. Ability to make granular image adjustments (i.e. at the edges of aligned images to make them
match better).
If your original images are large or there are many originals you may want to resample before you
put them into Photoshop to align.
3. Adjust the image size using % (so that each image is reduced by the same amount) to match
your output.
4. Stop recording.
5. Go to File>automate>Batch
TIP: I recommend processing all your images through two folders you create: One called script
in and one called script out. This makes it easier to keep track of what you are doing to your
images and saves time selecting folders etc.
2. If these images are scans you should only need to reposition them to get them in the right place.
So check the Reposition option.
3. Uncheck Blend Images Together. If we need to manually align and adjust colours this makes it
more difficult.
4. Click OK and wait for a bit
7. You can also use the Move tool in auto select mode to click on the image and see which layer
that part of the image is in.
8. In our case three of the four images have aligned correctly and 292-317.jpg has not aligned
properly.
1. You will probably need to make space for putting in the manually aligned images.
2. Go to Image>Canvas Size
4. Set the anchor to top left (or wherever your correctly aligned images start from)
5. Add enough pixels to the height and/or width for your manually aligned images.
6. It’s probably a good idea to add some pixels to one side for putting your unaligned images while
you move them all about.
7. Click OK
9. Make the Move tool active and turn off Auto select (so that you can select just the layer to
move)
TIP: If you have a few images to move you can switch the Move tool to Auto Selectmode once you
have all the images out from behind each other.
3.3 Complete manual alignment (alternative to auto alignment)
Sometimes the auto alignment is so bad that it actually makes it harder to align manually after. In
which case you can completely align the images manually.
4. Go to Image>Canvas Size
7. Add enough pixels to the height and/or width for your manually aligned images.
8. Add some pixels to one side for putting your unaligned images while you move them all about.
9. Click OK
10. Use the move tool with or without Auto-Select checked to get your images aligned. Use the
extra space to put un-aligned images while you work on the rest.
11. Crop the extra space away at the end (don’t crop any of the image – you can always crop it for
export, or if you must use a non-destructive crop).
1. Click on the topmost layer (so that the adjustment layer is created above this).
2. Click on Create fill or Adjustment layer in the bottom of the layer panel
5. Adjust the settings on levels (e.g. the sliders) to set the output to what you want. This is
completely reversible and adjustable.
We can correct for this by targeting an adjustment to the image above using and masked adjustment
layer. The mask we want will focus the change on the top image with a gradual reduction in change
above so that we don’t just create a new sharp change. To achieve this we make a mask with a
gradient over the area of interest.
Have a look online for more in depth discussion of how masking works.
1. Create a new Levels adjustment layer underneath the one you just made.
2. Double click and rename the layer e.g. to match the individual image you are working on
7. Click the Paint Bucket tool anywhere on the Canvas. It should go red (it’s actually black but the
mask previews as translucent red).
12. Select>Deselect
13. Zoom in on the area and adjust the levels until you match between the images.
DONE!
TIP: Turn visibility on/off the adjustment layers to see what you have done
Aligning multiple images in photoshop
We want images stacked
Sometimes we capture images of the same area (e.g. a particular part of a thin section) using
different conditions (reflected light, PPL, XPL, Cathodoluminescence) . We may then want to stack
the images together so that we can see how each different mineral, for instance, appears under the
different conditions.
THE PROBLEM
We can align objects manually because we see recognisable features in each image. It can be a
little tedious and difficult trying to add, manually align, resize and rotate the images in software like:
Adobe Illustrator, photoshop, the gimp, image j or other software.
There is a semi-automated way to speed up this process in photoshop. I’m not sure of the exact
conditions under which this will actually work. But it’s fairly easy to try and could save you a load of
time.
How to do it
The first thing we need to do is to load all the images as layers in a photoshop document.
o Open photoshop
o Go to file>Scripts>Load files into Stack
You should now see all your images as layers in photoshop with names corresponding to file names
(handy eh?).
o Select all the layers by clicking on the top layer and then shift clicking on the bottom layer. They
should all have a blue background in the layers panel indicating they are all selected.
o Now go to edit>auto-align layers
o I recommend trying collage first which will not distort the image.
You will notice there is also a checkbox to try to auto-align layers when you load them into the stack.
You are welcome to have a go with this too.
Macro-photography setup is now ready
The macro-photography setup comprises: a copy stand, a DSLR camera with a macro-lens and a
computer for controlling the camera and capture.
DEMONSTRATION
I will be giving a demonstration of the setup tomorrow (Wed 8/2/2012) at 10:40 am in the graphics
lab. If you wish to use the setup but cannot make this time then you will need to contact me to get
the training at a later date.
What is it for?
Taking photos of samples, specimens etc. close up. The setup has a maximum field of slightly
smaller than an A4 sheet of paper. The smallest field of view is the size of the sensor: 22.2*14.7mm.
Because you can capture 4272 x 2848 (L) pixels on this 22.2*14.7mm sensor your pixel density is
4888 ppi. This is much more than the 300ppi needed for print, so digital zooming and cropping will
get you a lot closer with good results (see sample images in poster below).
Guidelines for use of the macro-photography setup. This poster is beside the equipment.
How to compress powerpoint
presentations
These instructions are applicable to Powerpoint 2011 on MacOS and Powerpoint 2013 on
PC (and probably versions on either side of these).
The size of your Powerpoint presentation is mostly going to be based to the number of images you
have in your presentation, image size (especially if you are using MacOS), and your default
compression settings (only applicable if you are using a windows PC).
Note: If any of the options are greyed out it usually means you have already had that compression
level applied by default (see note on checking default options below).
Note: “Delete cropped areas of pictures” will lock in any crops you have made.
If you’re interested in having a bit more control over image resolution check out the instructions
below covering how to check/change the default compression in your power point presentation.
TIP: When you are finished preparing your presentation I recommend first saving your working copy.
Then save an export version that is compressed. This is so that you still have a version with high
quality images to work on if need be.
1. To compress your presentation go to File>Reduce File Size
2. Then choose the compression level. Try 150ppi and then save. If it still isn’t small enough
try 96ppi.
Note: “Delete cropped areas of pictures” will lock in any crops you have made.
1. Go to File>options.
4. From here you can change the amount of downsampling (compression) applied.
5. Most systems seem to have 220ppi set as the default. I would leave this set at 220ppi (or even
check “Do not compress images in this file”) so that images aren’t compressed very much for
your working copy.
NOTE: 220ppi applies to the smallest size the image has been when the document is saved and
closed. So if you decide to enlarge an image you have previously shrunk (with a save and close in
between) it will have 220ppi resolution at the smaller size.
If you find one image that is problematic you can swap it out by right clicking and choose change
picture in powerpoint.
Handling images using MS word PC (2013)
These are detailed instructions for different approaches to handling images in MS word 2013 and
producing PDF export at the end. These instructions also apply generally to versions from 2010
onwards…
Introduction
It is typical to have images embedded in MS word documents (linking images is possible, but
problematic). This document describes how MS word handles images and which methods/settings
should be used to get the best results.
An alternative approach is to drag and drop. But this approach will sometimes produce locked
images (see note below).
MS word has settings for how much images are downsampled (reducing resolution). This is a setting
that is stored for each document but can also be set as a default for all new documents. Usually this
is 220ppi resolution by default. But to make sure we can set it explicitly.
1. Go to File>Options>Advanced
3. Using the drop down set this option for all new documents
Images will be downsampled as soon as you save the document. In some cases PNG and TIFF will
not be downsampled (I have no idea why this happens).
TIFFs and PNGs will not be compressed, so you could use these formats if you want no JPEG
compression applied. If the images are JPEGs they will be compressed to level 8 (high quality). This
is usually not noticeable for photos but will have a minor effect on graphics type images with high
contrast areas (as a consequence of JPEG compression). But in these cases you should be using
PNG instead of JPEG because PNG is for graphics and JPEG is for photos.
If you want to change downsampling settings for individual documents choose the document you are
working on from the drop down list instead.
1. Go to File>Options>Advanced
1. Choose File>Print and then pick Adobe PDF from the printer list
2. Go to Printer properties. I recommend setting Default settings to High Quality Print (300ppi for
images above 450ppi). This will set images that are larger than 450ppi to 300ppi and set
compression level to 9 (slightly less than max quality). It will not change images or their file types
if they are less than 450ppi.
3. Be Sure to also set PDF page size to A4
4. You can edit/check the “High Quality Print” settings by clicking on Edit.
Note: Even though it says PDF page size is A4 it will still deal with A3 pages
This will produce pretty good results. But I did notice some spurious colours for PNG and TIFF files
when CUTEPDF resampled the image. Setting the PDF output to 1200ppi (as noted above) should
fix the problem for PNG files.
There are options for how much downsampling is applied at export (but no way to change the JPEG
compression). To set these: go to Tools>Compress pictures
So basically the best you can get using this method is 220ppi images at high JPEG compression (0=
bad quality).
Left: Uncompressed PNG | Right: Low quality (highest compression) JPEG created when saving to
PDF in ms word
Note: if you use PNG for images then PNG lossless compression will be retained (i.e no lossy JPEG
compression).
Preparing illustrations for use in theses,
reports and publications
Considerations
What software are you making your thesis in? The two main ones are ms word and latex. Please
note that due to the variation in versions of ms-word on pc and mac, it is difficult to write consistent
instructions for it.
Figure Length:Make your figure length to suit the figure up to a maximum that leaves room for the
caption to appear on the same page (see figure below).
Why not just scale each figure as necessary to fit in the word doc or
LaTeX?
There are various reasons why using a template is the best approach:
o Image sizes won’t get bloated. You can set resolution of output (e.g. 300ppi) and know that the
image will be 300ppi.
o Font size, stroke width etc. will be consistent
o Easier to make figures.
File formats
MS-word
For ms-word use EMF format to get vector graphics. Or use PNG/JPEG depending on whether the
format is graphics like or photo like (refer to the poster in the graphics lab for this).
LaTeX
Best to just use PDF format. Occasionally there are issues with transparency, gradients and nested
hidden objects.
Journals
Journals are sometimes restrictive in what format they accept. They usually focus on people
submitting a particular file format at a particular resolution rather than assessing the quality (e.g.
optical resolution of rasters) or file size issues. Ideally you would just submit PDF for vector figures.
Sometimes they won’t accept PDF but will accept EPS which is a similar format. For rasters they
tend to prefer .tiff at 600ppi or 1200ppi, even though PNG is much better at lossless compression of
some rasters.
You might also find the post on optimising pdfs in acrobat pro useful.
Optimising PDFs in acrobat pro (including
downsampling and compressing rasters)
Sometimes we are required to reduce the file size of a pdf so that it can be uploaded, emailed etc.
When we are printing something we always want to use an uncompressed version though.
Some concepts
There are a couple of key concepts that are useful to understand when reducing the file size of a
pdf. Usually vector text graphics etc. take up a small proportion of the pdf file size and the thing that
makes pdfs large are embedded rasters (aka bitmaps, images) such as photos. To make these
rasters smaller we can do two things to them.
1 Downsampling
This is the process of reducing the number of pixels in an image. Typically downsampling will be
achieved by choosing a lower pixel density (PPI) such as 150ppi rather than 300ppi. This will result
in a squared reduction in file size. For example if you downsample from 300 to 100ppi the new file
will be ¼ the size of the original. You might choose to downsample an image if you don’t expect
someone to view it at a high pixel density (i.e. for images that will only be viewed on screen).
2 Raster compression
This is the process of storing the information about an image more efficiently. Compression falls into
two categories: lossy and lossless and there are a variety of file types that utilize different
compression algorithms. Jpeg compression is lossy and stores information about how the colours
change from one corner of an 8×8 pixel square to the other corner (if you look closely at highly
compressed JPEGs you can see this effect . Sometimes compression is used generally to refer to
any kind of activity that will reduce the file size, I will use raster compression to explicitly refer to the
compression to a raster image not including downsampling.
More concepts
For a bit of background check out the blog post I did about pixel count resolution etc.
Pdf optimiser options. Each of the boxes on the left hand side are submenus.
Clicking on audit space usage will bring up a box listing the size and percentage for each element in
your pdf. In the example below there are three main contributors to the large file size:
1. Images
3. Piece information: In the case of this document this turns out to be information created by the
program that made the pdf (LaTeX) and we don’t actually need it.
Audit space usage dialog box
We can do stuff to make 1 and 3 Smaller but there’s not much we can do about 2 (in some rare
cases rasterising the really complex vector graphics may help).
Below are the settings he recommends for each tab (for more detail read his post).
I recommend saving these settings so you can use them again. In the example above where piece
information contributed ~50MB the file size was reduce by approximately 50MB.
Do not do any compression to the version you want to print. Print is much higher resolution than on
screen and any compression is much more noticeable.