Does editing a multipage TIFF with jpeg compression result in image deterioration?

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

Does editing a multipage TIFF with jpeg compression result in image deterioration?

Post by hexxed »

I have a multipage TIFF that, based on "identify -verbose" below, is a TIFF container of TIFF images with JPEG compression.


Dees jpeg compression mean that if I do stuff like move pages around, or add a page into the middle of this multipage TIFF, the image quality will deteriorate? I ask not just about editing with imagemagick, but just in general.

Code: Select all

 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
      skewness: -3.70382
    Green:
      min: 46 (0.180392)
      max: 255 (1)
      mean: 249.221 (0.977335)
      standard deviation: 20.7877 (0.0815204)
      kurtosis: 21.221
      skewness: -4.41976
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 249.844 (0.979782)
      standard deviation: 24.7883 (0.0972088)
      kurtosis: 48.4695
      skewness: -6.77737
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 248.823 (0.975778)
      standard deviation: 23.739 (0.0930941)
      kurtosis: 29.059
      skewness: -5.07833
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 2600x3800+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 0 of 66
  Compression: JPEG
  Orientation: TopLeft
  Properties:
    date:create: 2017-09-20T23:18:30-07:00
    date:modify: 2017-09-20T16:08:06-07:00
    jpeg:sampling-factor: 1x1
    signature: 6d86ed79ae65f8
    tiff:alpha: unspecified
    tiff:endian: lsb
    tiff:photometric: YCBCR
    tiff:rows-per-strip: 3800
    tiff:software: MX-M363N                       
  Artifacts:
    filename: greenjournal.tif
    verbose: true
  Tainted: False
  Filesize: 141.8MB
  Number pixels: 9.88M
  Pixels per second: 741KB
  User time: 11.420u
Elapsed time: 0:14.339
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Does editing a multipage TIFF with jpeg compression result in image deterioration?

Post by fmw42 »

I think it depends upon the software you use to do the editing. If it has to decompress the file to rearrange the pages and then recompress, then it would lose quality since JPG compression is lossy.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Does editing a multipage TIFF with jpeg compression result in image deterioration?

Post by snibgo »

As Fred says.

ImageMagick reads the file, decompresses the pixel, processes pixels, compresses them, and writes the file. If the compression is lossy (such as JPEG), this loses data.

Other software is available for manipulating TIFF files, including copying the image from one file to another, without the decompress/recompress cycle.
snibgo's IM pages: im.snibgo.com
Post Reply