Page 1 of 1

tif(big files) convert and reduce size to gif problem

Posted: 2013-12-14T11:40:47-07:00
by ylard
Hello
I have the following problem: I have uncompressed tif files from 2 different color scanners: one A0 from I2s and one A2 SCAMAX.
I convert both with the same parameters to gif files(64x64): one has a reasonable size (3KB)(from the A0) and the other one is 278Kb for an image of 64x64
if I look in the files the second one is 'coded' with ascii values' while the first one is coded in hexa as 'usual'. I do not understand why this append
The beginning of the second file is

Code: Select all

IF89a@ followed by some hexa caracters then

CREATED	"9/2/2009"  # Time: 16:03
KEYWORD	"SampleID"
KEYWORD	"SAMPLE_NAME"
NUMBER_OF_FIELDS	5
BEGIN_DATA_FORMAT
SampleID	SAMPLE_NAME	RGB_R	RGB_G	RGB_B
END_DATA_FORMAT
NUMBER_OF_SETS	140
BEGIN_DATA
1	A1	238.11	235.50	239.40
2	A2	18ΓΏ.47	22.81	21.60
3	A3	96.55	96.22	97.66
4	A4	240.22	237.60	242.73
5	A5	17.14	23.69	21.73
6	A6	96.52	96.77	98.59

I have 2 questions:
_ does anyone know why this append? I think I can consider this as a 'bug'
is it any solution in the command line of 'convert' to force the gif format to be non ascii?

(sorry for my poor english)
thanks for any answer
regards


ylard

Re: tif(big files) convert and reduce size to gif problem

Posted: 2013-12-14T13:50:47-07:00
by fmw42
As a guess, I would think that you have some large profile data included in the meta data. Try adding -strip to your command. If that fails, then post a link to your images (you can host them at any free hosting site such as dropbox). Or show the results of identify -verbose yourimage

Also please identify your version of IM and platform

Re: tif(big files) convert and reduce size to gif problem

Posted: 2013-12-18T03:07:42-07:00
by ylard
hello,
this solution (append -strip) is great.
thanks for your help
and sorry for the delay
I will also try to undestand for the metadata

regards
Ylard

Re: tif(big files) convert and reduce size to gif problem

Posted: 2013-12-18T03:19:34-07:00
by ylard
Hello again,

here the result of identify -verbose

this image gives 'too big' gif

Code: Select all

Image: 510_0002_000_02014_000_A_0023.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 12592x8992+0+0
  Resolution: 400x400
  Print size: 31.48x22.48
  Units: PixelsPerInch
  Type: TrueColor
  Base type: TrueColor
  Endianess: MSB
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 197 (0.772549)
      mean: 137.841 (0.540552)
      standard deviation: 58.6107 (0.229846)
      kurtosis: 1.23007
      skewness: -1.72683
    Green:
      min: 0 (0)
      max: 189 (0.741176)
      mean: 131.193 (0.514481)
      standard deviation: 56.9361 (0.223279)
      kurtosis: 1.07597
      skewness: -1.68545
    Blue:
      min: 0 (0)
      max: 174 (0.682353)
      mean: 106.86 (0.41906)
      standard deviation: 48.4399 (0.18996)
      kurtosis: 0.768258
      skewness: -1.59067
  Image statistics:
    Overall:
      min: 0 (0)
      max: 197 (0.772549)
      mean: 93.9734 (0.368523)
      standard deviation: 73.0241 (0.286369)
      kurtosis: -1.68617
      skewness: -0.402264
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 12592x8992+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: None
  Orientation: TopLeft
  Properties:
    date:create: 2013-12-17T11:30:45+01:00
    date:modify: 2011-02-04T14:30:48+01:00
    signature: d579f8e5022ff250e7665223a31ccc80ad40745e1327fc3f4ed0e29f8e530310
    tiff:hostcomputer: C211413210003
    tiff:make: i2s Digibook Scanner
    tiff:model: Suprascan A0 14000 RGB
    tiff:photometric: RGB
    tiff:rows-per-strip: 1
    tiff:software: Digibook Version :5, 6, 2, 7
    tiff:timestamp: 2011:02:04 14:30:38
  Profiles:
    Profile-icc: 272432 bytes
      digibook-020909
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 340MB
  Number pixels: 113.2M
  Pixels per second: 173.4M
  User time: 0.655u
  Elapsed time: 0:01.652
  Version: ImageMagick 6.6.0-10 2010-03-24 Q16 http://www.imagemagick.org
this image gives 'short' gif

Code: Select all

Image: 510_0002_000_01681_000_0_0001.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 12198x8969+0+0
  Resolution: 400x400
  Print size: 30.495x22.4225
  Units: PixelsPerInch
  Type: TrueColor
  Base type: TrueColor
  Endianess: MSB
  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: 174.601 (0.684712)
      standard deviation: 59.533 (0.233463)
      kurtosis: 1.14338
      skewness: -1.61915
    Green:
      min: 0 (0)
      max: 227 (0.890196)
      mean: 154.288 (0.60505)
      standard deviation: 52.8233 (0.20715)
      kurtosis: 1.1755
      skewness: -1.6032
    Blue:
      min: 0 (0)
      max: 194 (0.760784)
      mean: 111.945 (0.439002)
      standard deviation: 36.2755 (0.142257)
      kurtosis: 0.699862
      skewness: -1.33841
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 110.209 (0.432191)
      standard deviation: 80.4499 (0.31549)
      kurtosis: -1.5075
      skewness: -0.272365
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 12198x8969+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 11
  Compression: None
  Orientation: TopLeft
  Properties:
    comment: 11 - Main frame
    date:create: 2013-12-17T11:29:55+01:00
    date:modify: 2013-01-04T13:19:49+01:00
    label: 11
    signature: 4ccc9a81b2baf2dd662b8a210113dbb0475a53c2891422fc4f57ae4736453c23
    tiff:artist: Anonymous
    tiff:hostcomputer: PC-QUARTZ
    tiff:make: i2S, Corp.
    tiff:model: SupraScanQuartzHDA0 [SN: 320701] - CamQuartzHD [SN: 320701]
    tiff:photometric: RGB
    tiff:rows-per-strip: 1
    tiff:software: YooScan v1.2.0
    tiff:timestamp: 2013:01:04 13:19:48
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 328.3MB
  Number pixels: 109.4M
  Pixels per second: 170.7M
  User time: 0.640u
  Elapsed time: 0:01.641
  Version: ImageMagick 6.6.0-10 2010-03-24 Q16 http://www.imagemagick.org
and this is the command line which gives strange result

Code: Select all

convert 510_0002_000_02014_000_A_0023.tif -resize 64x64 -limit memory 2GB -background white -gravity center -extent 64x64 -format gif 510_0002_000_02014_000_A_0023.gif
Thanks for advices

Ylard

Re: tif(big files) convert and reduce size to gif problem

Posted: 2013-12-18T10:33:35-07:00
by fmw42

Code: Select all

  Profiles:
    Profile-icc: 272432 bytes
      digibook-020909
You have a very large 2.7 Mbyte profile that needs to be removed by -strip

Re: tif(big files) convert and reduce size to gif problem

Posted: 2013-12-19T01:56:53-07:00
by ylard
really thanks for your answers
this subject may be closed (Can I do this?)

regards


Just edit the title of your very first post.