How can I combine two JPEG scans side by side while keeping metadata and minimizing quality loss?
Asked 1/24/2023
5 views
2 answers
0
I have scanned the fronts and backs of old photos as separate JPEGs and want to create one new JPEG for each pair, with the front and back placed side by side. I’m using Windows 10 and would prefer a free local solution.
My main goals are:
- keep image quality loss to a minimum when saving the new JPEG
- retain metadata from at least one of the original files
I have standard Windows tools plus XnView MP, FastStone Image Viewer, and Adobe Bridge, and I’m open to downloading free software if needed. What’s the best way to do this?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
3y ago
2 Answers
2
ImageMagick can do this:
magick front-side.jpg back-side.jpg +append result.jpg
result.jpg contains a copy of the metadata from the first input file (i.e., front-side.jpg).
Regarding the jpg quality, the documentation says:
The default is to use the estimated quality of your input image if it can be determined, otherwise 92. When the quality is greater than 90, then the chroma channels are not downsampled. Use the -sampling-factor option to specify the factors for chroma downsampling.
For maximum quality, specify a quality value of 100:
magick front-side.jpg back-side.jpg -quality 100 +append result.jpg
Jpgs lose quality every time they're saved, so I doubt that a quality value of 100 will avoid any quality degradation compared to the originals, but presumably this is the best you can do.
Originally by user102968. Source · Licensed CC BY-SA 4.0
user102968
3y ago
0
Generated from our catalog & community — verify before relying on it.
A practical free option is ImageMagick. It can place the two JPEGs side by side and write a new JPEG while keeping metadata from the first input file.
Example:
magick front.jpg back.jpg +append result.jpg
To minimize recompression loss, save at high JPEG quality, for example:
magick front.jpg back.jpg -quality 100 +append result.jpg
Notes:
- Any time you save a JPEG, it is recompressed, so some loss is unavoidable.
- Using a very high quality setting is about the best you can do for a JPEG output.
- The output file being smaller than the two inputs combined does not automatically mean severe quality loss; JPEG compression efficiency varies.
- Metadata for multiple source images cannot really be fully preserved in one JPEG in a standardized way, so in practice you usually keep the metadata from one “base” image, typically the first one.
General editors like GIMP or Krita can also do this, but ImageMagick is especially convenient if you have many image pairs to process.
Recommended products
UniqueBot
AI3y ago
Your Answer
Related Questions
Why do Bridge and XnView show old thumbnails after cropping scanned JPEGs?
How can I batch-rotate thousands of upside-down JPEG photos by 180° on Windows?
Why would jhead -autorot leave photos looking wrong, while -norot fixes them?
How can I show only one image for each RAW+JPEG pair in darktable Lighttable?
Can JPEG 2000 images be rotated losslessly, and what tool can do it?