Как определить размер изображения из командной строки?

Привет, у меня есть аналогичная проблема.

В моем случае (Ubuntu 12.04, используя gparted и pysdm) у меня возникла проблема загрузки при запуске, sdb2 was not able to mount at media/partitionName, где partitionName была папкой, которую я установил с pysdm. В моем случае я смог использовать и автомонтировать при запуске раньше, и внезапно эта проблема началась.

Тогда я тоже не смог установить его вручную, и я получил сообщение Unable to mount.... (см. рисунок в первом вопросе выше). Я обнаружил, что проблема была вызвана спящим окном. После того, как я перезапустил из окон и отключил его, вся проблема исчезла. Я смог увидеть, что проблема была в спящем режиме, когда я пытался установить вручную:

sudo mount -t /dev/sdb2 /media/partitonName

Надеюсь, это может помочь кому-то.

19
задан 23 June 2012 в 22:56

7 ответов

Используйте команду identify, которая является частью ImageMagick.

Примеры:

$ identify ZEAKR.jpg 
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

или

$ identify -verbose ZEAKR.jpg 
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  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: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
35
ответ дан 31 July 2018 в 10:36

Используйте команду identify, которая является частью ImageMagick.

Примеры:

$ identify ZEAKR.jpg 
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

или

$ identify -verbose ZEAKR.jpg 
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  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: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
35
ответ дан 2 August 2018 в 00:33

Используйте команду identify, которая является частью ImageMagick.

Примеры:

$ identify ZEAKR.jpg 
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

или

$ identify -verbose ZEAKR.jpg 
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  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: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
35
ответ дан 4 August 2018 в 16:03

Используйте команду identify, которая является частью ImageMagick.

Примеры:

$ identify ZEAKR.jpg 
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

или

$ identify -verbose ZEAKR.jpg 
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  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: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
35
ответ дан 6 August 2018 в 00:41

Используйте команду identify, которая является частью ImageMagick.

Примеры:

$ identify ZEAKR.jpg 
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

или

$ identify -verbose ZEAKR.jpg 
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  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: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
35
ответ дан 7 August 2018 в 18:06

Используйте команду identify, которая является частью ImageMagick.

Примеры:

$ identify ZEAKR.jpg 
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

или

$ identify -verbose ZEAKR.jpg 
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  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: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
35
ответ дан 10 August 2018 в 06:53

Используйте команду identify, которая является частью ImageMagick.

Примеры:

$ identify ZEAKR.jpg 
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

или

$ identify -verbose ZEAKR.jpg 
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  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: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
35
ответ дан 15 August 2018 в 18:50
  • 1
    Отлично. Я некоторое время знал о ImageMagick (в основном невероятно удивительная команда import), но она все еще меня удивляет. – fouric 23 June 2012 в 23:02

Другие вопросы по тегам:

Похожие вопросы: