Basic conversion

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
Jocke
Posts: 2
Joined: 2012-08-06T06:27:31-07:00
Authentication code: 67789

Basic conversion

Post by Jocke »

Im doing a little project here!
And i need to have 64K TGA files

Been searching and looking on google and imagemagick seems to be the only serius alternative.

But i just dont seem to get my head around it,

Code: Select all

 Format: TGA (Truevision Targa image)
 Class: DirectClass
 Geometry: 301x376+0+0
 Resolution: 72x72
 Print size: 4.18056x5.22222
 Units: Undefined
 Type: TrueColor
 Endianess: Undefined
 Colorspace: sRGB
 Depth: 5-bit
 Channel depth:
   red: 5-bit
   green: 5-bit
   blue: 5-bit
 Channel statistics:
   Red:
     min: 0 (0)
     max: 31 (1)
     mean: 11.7833 (0.380102)
     standard deviation: 8.30626 (0.26794)
     kurtosis: -0.653164
     skewness: 0.0759862
   Green:
     min: 0 (0)
     max: 31 (1)
     mean: 13.4629 (0.43428)
     standard deviation: 9.13267 (0.294598)
     kurtosis: -1.08513
     skewness: -0.2895
   Blue:
     min: 0 (0)
     max: 31 (1)
     mean: 14.2457 (0.459532)
     standard deviation: 9.90222 (0.319422)
     kurtosis: -1.3048
     skewness: -0.285258
 Image statistics:
   Overall:
     min: 0 (0)
     max: 31 (1)
     mean: 13.164 (0.424638)
     standard deviation: 9.13699 (0.294737)
     kurtosis: -1.05751
     skewness: -0.152095
 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)
 Interlace: None
 Background color: white
 Border color: srgb(223,223,223)
 Matte color: grey74
 Transparent color: black
 Compose: Over
 Page geometry: 301x376+0+0
 Dispose: Undefined
 Iterations: 0
 Compression: None
 Orientation: Undefined
 Properties:
   date:create: 2012-08-06T13:00:21+02:00
   date:modify: 2011-07-17T21:20:10+02:00
   signature: 4aa409a708bd418d7ed9a7410dad8c8d31aba995ef218ef5d7173ecbb1624139
 Artifacts:
   filename: balkans.tga
   verbose: true
 Tainted: False
 Filesize: 226KB
 Number pixels: 113K
 Pixels per second: 7.545MB
 User time: 0.016u
 Elapsed time: 0:01.014
 Version: ImageMagick 6.7.8-8 2012-08-04 Q16 http://www.imagemagick.org
Here is what i want my TGA file to be in the end (this is an exampel)

Trying a basic convert from a 64K bmp gives me a huge and unuseble TGA file..

Anyway, this is not my area of expertice, but im hoping to learn something =)
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Basic conversion

Post by Bonzo »

I have never tried this:

Code: Select all

convert input.bmp -resize 64000@ ouput.tga
Jocke
Posts: 2
Joined: 2012-08-06T06:27:31-07:00
Authentication code: 67789

Re: Basic conversion

Post by Jocke »

Bonzo wrote:I have never tried this:

Code: Select all

convert input.bmp -resize 64000@ ouput.tga
Hey, thx for helping!

Your input gave me a smaller image just,

Code: Select all

c:\_Falcon_\image> identify -verbose hej.tga
Image: hej.tga
  Format: TGA (Truevision Targa image)
  Class: DirectClass
  Geometry: 226x283+0+0
  Resolution: 72x72
  Print size: 3.13889x3.93056
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 96.9981 (0.380385)
      standard deviation: 67.6568 (0.265321)
      kurtosis: -0.652343
      skewness: 0.0646184
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 111.323 (0.436562)
      standard deviation: 74.9839 (0.294055)
      kurtosis: -1.10435
      skewness: -0.299851
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 117.284 (0.459938)
      standard deviation: 80.8448 (0.317039)
      kurtosis: -1.29777
      skewness: -0.289643
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 108.535 (0.425628)
      standard deviation: 74.6903 (0.292903)
      kurtosis: -1.0604
      skewness: -0.160119
  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)
  Interlace: None
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 226x283+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: None
  Orientation: Undefined
  Properties:
    date:create: 2012-08-06T16:56:50+02:00
    date:modify: 2012-08-06T16:58:58+02:00
    signature: 3b6ce2d8d712b127f946bcde1b9abb2870e9d6a1b46acc0c6c9a0ee636bdc320
  Artifacts:
    filename: hej.tga
    verbose: true
  Tainted: False
  Filesize: 192KB
  Number pixels: 64K
  Pixels per second: 12.79MB
  User time: 0.000u
  Elapsed time: 0:01.004
  Version: ImageMagick 6.7.8-8 2012-08-04 Q16 http://www.imagemagick.org
Bit depth and color depth is 5bit (on the original i wanna replace) here its 8bits

I am puzzeld
Post Reply