Combining two multipage TIFFs and several jpegs into one multipage TIFF

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hexxed
Posts: 4
Joined: 2017-09-20T23:27:28-07:00
Authentication code: 1151

Combining two multipage TIFFs and several jpegs into one multipage TIFF

Post by hexxed »

I have 6 things I want to combine into one multipage TIFF.

1) a 40-page TIFF (all are 6.5 inches by 9.5 inches)
2) a jpeg (2 square inches)
3) a second jpg (2 square inches)
4) a third jpeg (6.5 x 9.5 inches)
5) a fourth jpeg (6.5 x 9.5 inches)
6) a 60-page TIFF (all are 6.5 x 9.5 inches)


If it makes for a better reading/viewing experience, I'd like all the pages to be 6.5 x 9.5 inches.

Bonus question: Every time I use imagemagick on these jpegs and tiffs, do the images deteriorate in quality?

OS: Linux Mint Cinnamon 18.2 64-bit
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-31 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
Last edited by hexxed on 2017-09-20T23:40:22-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Combining two multipage TIFFs and several jpegs into one multipage TIFF

Post by fmw42 »

Convert inches to pixels using nominal density of 72 dpi. Then resize all the images to that pixel size and output as a new tif
hexxed
Posts: 4
Joined: 2017-09-20T23:27:28-07:00
Authentication code: 1151

Re: Combining two multipage TIFFs and several jpegs into one multipage TIFF

Post by hexxed »

fmw42 wrote: 2017-09-20T23:37:00-07:00 Convert inches to pixels using nominal density of 72 dpi. Then resize all the images to that pixel size and output as a new tif
How exactly do I do those 2 sentences?

Also, when I scanned the pages into Tiffs, I choose 400 DPI on the scanner. Will we lose image quality by going with 72 DPI?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Combining two multipage TIFFs and several jpegs into one multipage TIFF

Post by fmw42 »

Print size depend upon the density and number of pixels in each dimension. You can convert to pixels for any desired density. If you want density of 400 dpi and 6.5 inches, then 400*6.5=2560 pixels. Similarly, 400*9.5=3800 pixels. What are the pixel dimensions of your 6.5x9.5 in images and what are the densities.

You can use

Code: Select all

identify -verbose image.suffix
To find the image dimensions in pixels and resolution and units (density). Just resize all the smaller images to the same pixel dimension and assign a density and units that match your larger image.
hexxed
Posts: 4
Joined: 2017-09-20T23:27:28-07:00
Authentication code: 1151

Re: Combining two multipage TIFFs and several jpegs into one multipage TIFF

Post by hexxed »

Is the pixel dimensions 2600x3800+0+ ?
Is the density 400x400 pixels per inch?

Here's a bit of the printout from the command you helpfully provided. Let me know if I have not copy-pasted important stuff.

Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 2600x3800+0+0
Resolution: 400x400
Print size: 6.5x9.5
Units: PixelsPerInch
Type: TrueColor
Endianess: LSB
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Pixels: 9880000
Red:
min: 17 (0.0666667)
max: 255 (1)
mean: 247.405 (0.970216)
standard deviation: 25.3778 (0.0995207)
kurtosis: 13.1947
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Combining two multipage TIFFs and several jpegs into one multipage TIFF

Post by fmw42 »

Your image size is 2600x3800 pixels with no virtual pixel offsets (+0+0). Your density is 400 dpi (since units are pixels per inch).
Post Reply