-4

gm convert +profile "*" -resize 800x800 -quality 90.0 -background white -flatten test.jpg test01.jpg

the test01.jpg file size is 140262, but the test.jpg file size is 114698, I think the test01.jpg file is less than test.jpg, why?

gm identify -verbose test.jpg command info:
Image: test.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Geometry: 960x1280
  Class: DirectClass
  Type: true color
  Depth: 8 bits-per-pixel component
  Channel Depths:
    Red:      8 bits
    Green:    8 bits
    Blue:     8 bits
  Channel Statistics:
    Red:
      Minimum:                     0.00 (0.0000)
      Maximum:                   255.00 (1.0000)
      Mean:                      158.69 (0.6223)
      Standard Deviation:         74.34 (0.2915)
    Green:
      Minimum:                     0.00 (0.0000)
      Maximum:                   255.00 (1.0000)
      Mean:                      142.36 (0.5583)
      Standard Deviation:         72.48 (0.2842)
    Blue:
      Minimum:                     0.00 (0.0000)
      Maximum:                   255.00 (1.0000)
      Mean:                      105.80 (0.4149)
      Standard Deviation:         73.05 (0.2865)
  Resolution: 72x72 pixels
  Filesize: 112.0Ki
  Interlace: No
  Orientation: TopLeft
  Background Color: white
  Border Color: #DFDFDF
  Matte Color: #BDBDBD
  Page geometry: 960x1280+0+0
  Compose: Over
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  JPEG-Quality: 64
  JPEG-Colorspace: 2
  JPEG-Colorspace-Name: RGB
  JPEG-Sampling-factors: 2x2,1x1,1x1
  Signature: ea09bde85095c8c8b2345e5301d581a8002490ecfefa63ae81c0cb14b8c2fbf8
  Profile-iptc: 40 bytes
  Profile-EXIF: 86 bytes
    Orientation: 1
    Exif Offset: 38
    Color Space: 1
    Exif Image Width: 960
    Exif Image Length: 1280
  Tainted: False
  User Time: 0.020u
  Elapsed Time: 0:01
  Pixels Per Second: 39.1Mi

enter image description here

BlackHawk
  • 1
  • 1

1 Answers1

0

According to the "identify" output that you presented for the input image "test.jpg", the JPEG quality was estimated to be 64. You requested quality 90 for your output image.

Higher quality means bigger filesize. The increase in quality from 64 to 90 doesn't actually improve the visual quality of the image; it only forces the compressor to faithfully reproduce the compression artifacts in the input image.

Glenn Randers-Pehrson
  • 11,940
  • 3
  • 37
  • 61