tags:

views:

5

answers:

0

I tried to use convert of imagemagick 6.5.6 to make a smaller version from original JPEG file in both file size and geometry. The command I used is:

convert tj/p1.jpg -resize 500x tj/456c2e75fe0faa57fd1cfd87117e0963/p1.jpg

The result is funny, the original is 1102x1542+0+0 in 164kb, the converted one is 500x700+0+0 in 174kb. The pixel count is almost the 20% of the original version, with much bigger file size. So I add -strip options to remove all the verbose information in JPEG profile.

convert tj/p1.jpg -strip -resize 500x tj/500_p1.jpg

The 500_p1.jpg is 500x700+0+0 in 173kb, only 1kb less.

Also I tried to use -thumbnail for it.

convert tj/p1.jpg -thumbnail 500x tj/th/p1.jpg

The thumbed jpeg is 500x700+0+0 in 173kb as well.

Finally I found the -quality can help to reduce images. But 75% quality takes 107kb, 25% quality takes only 50kb with visible loss of detail. But the original quality factor is unknown.

Does anyone have similar issues? Hereafter are the image profiles generated by identify. I found the major differences as following:

Geometry: 1102x1542->500x700
print size: 11x15->5x7
Units: Undefined->PixelsPerInch
Quality: unknown->92
Nr. of Pixels: 1.621mb->342kb

Detail of profiles:

Original:

Image: tj/p1.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 1102x1542+0+0
  Resolution: 100x100
  Print size: 11.02x15.42
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    red:
      min: 0 (0)
      max: 255 (1)
      mean: 218.106 (0.855319)
      standard deviation: 52.7336 (0.206798)
      kurtosis: 5.04278
      skewness: -2.24455
    green:
      min: 0 (0)
      max: 255 (1)
      mean: 158.476 (0.621473)
      standard deviation: 92.9844 (0.364645)
      kurtosis: -1.24112
      skewness: -0.535292
    blue:
      min: 0 (0)
      max: 255 (1)
      mean: 113.282 (0.444244)
      standard deviation: 99.7003 (0.390981)
      kurtosis: -1.59582
      skewness: 0.278377
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 122.466 (0.480259)
      standard deviation: 108.274 (0.424604)
      kurtosis: -1.78198
      skewness: 0.0115088
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 1102x1542+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Orientation: Undefined
  Properties:
    date:create: 2010-10-22T08:35:35+08:00
    date:modify: 2010-09-30T10:52:06+08:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x2,1x1,1x1
    signature: cdbd3f63986f0a7c4cd20aedcf9123d91df97e0cb7388f59059b4676fd36d481
  Profiles:
    Profile-APP12: 15 bytes
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 164kb
  Number pixels: 1.621mb
  Pixels per second: 20.51mb
  User time: 0.078u
  Elapsed time: 0:01
  Version: ImageMagick 6.5.6-5 2009-09-25 Q16 OpenMP http://www.imagemagick.org

Converted:

Image: tj/456c2e75fe0faa57fd1cfd87117e0963/p1.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 500x700+0+0
  Resolution: 100x100
  Print size: 5x7
  Units: PixelsPerInch
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    red:
      min: 0 (0)
      max: 255 (1)
      mean: 216.75 (0.849999)
      standard deviation: 50.1075 (0.1965)
      kurtosis: 4.066
      skewness: -2.03195
    green:
      min: 0 (0)
      max: 255 (1)
      mean: 158.316 (0.620846)
      standard deviation: 89.1433 (0.349582)
      kurtosis: -1.17694
      skewness: -0.52022
    blue:
      min: 0 (0)
      max: 255 (1)
      mean: 113.58 (0.445411)
      standard deviation: 96.3298 (0.377764)
      kurtosis: -1.53577
      skewness: 0.287937
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 122.161 (0.479064)
      standard deviation: 106.052 (0.415889)
      kurtosis: -1.7498
      skewness: 0.00808184
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 500x700+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 92
  Orientation: Undefined
  Properties:
    date:create: 2010-10-22T10:27:18+08:00
    date:modify: 2010-10-22T10:31:08+08:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x2,1x1,1x1
    signature: 63202ddf9106d3374fe3a396f5105ce8099051cf807ceb2ab5a19532957cec10
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 174kb
  Number pixels: 342kb
  Version: ImageMagick 6.5.6-5 2009-09-25 Q16 OpenMP http://www.imagemagick.org