Page 1 of 1

convert pict to pict only does top 20% of image

Posted: 2012-01-18T15:09:58-07:00
by jeffATwork
Pretty simple. Don't know why it isn't working.

convert ../test_convert/los_vegas/A_CAR/in//998969.pct -brightness-contrast 10x5 ../test_convert/los_vegas/A_CAR/out_b10c5//998969.pct

input image:
maitreya:~/Documents/Projects/Grossman/breeze_docs/carillon/src$ identify ../test_convert/los_vegas/A_CAR/in/998969.pct ../test_convert/los_vegas/A_CAR/in/998969.pct PICT 1920x1080 1920x1080+0+0 8-bit DirectClass 115KB 0.010u 0:00.009

Using:
Version: ImageMagick 6.7.1-1 2011-07-29 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

on Mac OS 10.7.2
2.4 GHz intel core 2 duo & on 2 x 3 GHz Quad-core intel xeon

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T15:19:51-07:00
by jeffATwork
Forgot to explain that the top 20% or so of the image appears. The bottom 80% is white.

maitreya:~/Documents/Projects/Grossman/breeze_docs/carillon/src$ identify ../test_convert/los_vegas/A_CAR/out_b10c5/998969.pct
../test_convert/los_vegas/A_CAR/out_b10c5/998969.pct PICT 1920x1080 1920x1080+0+0 8-bit DirectClass 1.091MB 0.220u 0:00.180

The output file is also M U C H larger than the input file.

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T18:00:13-07:00
by fmw42
Probably need to post your command and/or image. The following works fine for me on IM 6.7.4.7 Q16 Mac OSX Snow Leopard. Also what tool are you trying to view it in and how was the original created? Mac PREVIEW does not seem to support PICT format any longer (at least not in 64-bit mode --- note you can change to 32-bit mode in the PREVIEW getinfo panel).

convert logo: logo.pict
convert logo.pict logo2.pict
display logo.pict

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T19:14:40-07:00
by jeffATwork
Thanks fmw42.

The command is in the 1st post in this thread. It's just
convert input.pct -brightness-contrast 10x5 output.pct

I get the same top 20% only result using -auto-gamma or no options at all. Also, trying to convert to JPG (which is the format I want to end up with) produces the same 20% there image.

So there seems to be something about the input file that's causing the problem.

Preview works in Lion for PICTs without constraining it to 32 bit mode. And I can view input.pct in Preview, Graphic Converter and PhotoShop just fine.

The input PICTs are frame grabs from an .m4v movie. We have grabbed 31K frames at specific time codes from about 40 such movies. I used Automator and QT Pro to grab the frames. I'm not happy with the fact that I haven't been able to figure out how to grab the frames in anything but PICT format using QT Pro.

The input PICT is 115KB. Can you tell me how to upload it?

thanks again!
-J

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T19:24:48-07:00
by fmw42
You have to post it to some free image hosting web site, such as dropbox or others (that will support pct). You can search google for such web sites. Then put a link in you post on this forum to where you posted the image. There is no direct upload of images in this forum.

What do you get from

identify -verbose yourimage.pct

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T19:47:36-07:00
by jeffATwork
Here's the image:

http://www.mediafire.com/?72n6duac2t9s2q1

and the verbose output:


Image: ../test_convert/los_vegas/A_CAR/in//998969.pct
Format: PICT (Apple Macintosh QuickDraw/PICT)
Class: DirectClass
Geometry: 1920x1080+0+0
Resolution: 72x72
Print size: 26.6667x15
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: 202.242 (0.793107)
standard deviation: 91.9649 (0.360647)
kurtosis: -0.508863
skewness: -1.19629
Green:
min: 0 (0)
max: 255 (1)
mean: 196.953 (0.772365)
standard deviation: 100.721 (0.394985)
kurtosis: -0.623872
skewness: -1.16619
Blue:
min: 0 (0)
max: 255 (1)
mean: 192.327 (0.754225)
standard deviation: 108.575 (0.425783)
kurtosis: -0.662042
skewness: -1.15599
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 197.174 (0.773232)
standard deviation: 100.649 (0.394703)
kurtosis: -0.526588
skewness: -1.19367
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 1920x1080+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Orientation: Undefined
Properties:
date:create: 2012-01-18T14:53:45-06:00
date:modify: 2012-01-15T07:04:56-06:00
signature: 3baa4882d45fd88d331a4674411a52559a65ac275df7a417ced19c6ae27986ba
Artifacts:
verbose: true
Tainted: False
Filesize: 115KBB
Number pixels: 2.074MB
Pixels per second: 51.84MB
User time: 0.060u
Elapsed time: 0:01.039
Version: ImageMagick 6.7.1-1 2011-07-29 Q16 http://www.imagemagick.org

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T19:57:05-07:00
by fmw42
Your file opens fine for me in GraphicConverter and Photoshop and Mac Preview (set to 32-bit mode) on my Mac OSX Snow Leopard. However, I only get some of the top and the rest white when displayed in X11 view IM's display (IM 6.7.4.7 Q16). So I would say it seems to be a limitation of X11 display.

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T20:00:44-07:00
by jeffATwork
Sorry, should have made clear that was the INPUT file as produced by QT Pro. I have no problems with it either.

Try running convert on it to see what you get.

Thanks!

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T20:39:12-07:00
by fmw42
Yes, I can duplicate your results.

convert 998969.pct 998969_b.pct

998969_b.pct shows only the top part and the rest white. Same if I save to png.

However, if I open 998969.pct in GraphicConverter and then save it as 998969_gc.pct

Then

convert 998969_gc.pct 998969_gc_im.pct

998969_gc_im.pct opens fine without the white bottom part.

So it seems that whatever tool is creating your original file is not quite creating a fully valid pict format in some way.


If I look at the verbose info of each, there are differences in graylevel and other stats and in compression. Your file has jpeg compression and the GraphicConverter one has undefined compression.

Your file:

Code: Select all

Image: 998969.pct
  Format: PICT (Apple Macintosh QuickDraw/PICT)
  Class: DirectClass
  Geometry: 1920x1080+0+0
  Resolution: 72x72
  Print size: 26.6667x15
  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: 202.242 (0.793107)
      standard deviation: 91.9649 (0.360647)
      kurtosis: -0.508863
      skewness: -1.19629
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 196.953 (0.772365)
      standard deviation: 100.721 (0.394985)
      kurtosis: -0.623872
      skewness: -1.16619
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 192.327 (0.754225)
      standard deviation: 108.575 (0.425783)
      kurtosis: -0.662042
      skewness: -1.15599
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 197.174 (0.773232)
      standard deviation: 100.649 (0.394703)
      kurtosis: -0.526588
      skewness: -1.19367
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 1920x1080+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Orientation: Undefined
  Properties:
    date:create: 2012-01-18T18:51:31-08:00
    date:modify: 2012-01-18T18:51:31-08:00
    signature: 3baa4882d45fd88d331a4674411a52559a65ac275df7a417ced19c6ae27986ba
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 115KB
  Number pixels: 2.074M
  Pixels per second: 34.56MB
  User time: 0.060u
  Elapsed time: 0:01.059
  Version: ImageMagick 6.7.4-7 2012-01-16 Q16 http://www.imagemagick.org

GraphicConverter File:

Code: Select all

Image: 998969_gc.pct
  Format: PICT (Apple Macintosh QuickDraw/PICT)
  Class: DirectClass
  Geometry: 1920x1080+0+0
  Resolution: 72x72
  Print size: 26.6667x15
  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: 56.1352 (0.220138)
      standard deviation: 21.7194 (0.0851741)
      kurtosis: 1.08113
      skewness: 0.312846
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 29.5203 (0.115766)
      standard deviation: 12.6115 (0.049457)
      kurtosis: 6.70357
      skewness: 0.880705
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 5.07946 (0.0199195)
      standard deviation: 4.76331 (0.0186797)
      kurtosis: 135.252
      skewness: 5.88044
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 30.245 (0.118608)
      standard deviation: 14.7589 (0.0578779)
      kurtosis: 27.3635
      skewness: 4.31385
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 1920x1080+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Undefined
  Orientation: Undefined
  Properties:
    date:create: 2012-01-18T19:17:32-08:00
    date:modify: 2012-01-18T19:17:32-08:00
    signature: d8877ffb94630e17a104d20c72432fd238c5c0bc0a108f68d7a922578974f879
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 3.754MB
  Number pixels: 2.074M
  Pixels per second: 11.52MB
  User time: 0.210u
  Elapsed time: 0:01.180
  Version: ImageMagick 6.7.4-7 2012-01-16 Q16 http://www.imagemagick.org

I note in GraphicConverter one can use QuickTime or not to create the file. If using QT, then one can specify jpeg compression. But when I do that, IM gives an error when using the file either in convert or in identify -verbose (though I do get verbose info from it).

Bottom line, I think there may be something odd about your created files. IM may not have up to date PICT processing and may only support certain PICT formats or versions.

If you have any options when saving your PICT, such as with or without QuickTime and with jpeg compression or other types or no compression, then I would suggest you try some variations.

I am at a loss to suggest anything further other than to suggest you forward this on to the Bugs forum and see what the IM developers say.

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T20:58:10-07:00
by jeffATwork
Thanks!! I'll forward the issue.

What is creating the PICT image is Apple's Quicktime 7 Pro.

I'll look into using Graphic Converter instead of IM.

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-18T21:56:12-07:00
by fmw42
It is possible that there is something new about Quicktime 7 Pro PICT format that IM is not aware of? Was this extracted as a frame from some .mov file? Can you save it in some other format other than pict?

I converted logo: to logo.png in IM, then opened logo.png in GraphicConverter and saved as normal rle compressed pict and as quicktime jpeg compressed pict. Then converted them to a new image in IM and there does not seem to be any problems with either. So it does not look to be an issue of quicktime jpeg compression vs rle compression in creating the PICT format images.

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-19T07:09:43-07:00
by jeffATwork
As far as I know (which is not far at all) PICT is essentially an Apple legacy format. Grabbing frames from video doesn't seem to be a high traffic area for QT 7 Pro. The feature has been around for a long time, but has not been carried into the standard QT Player. As far as I can tell, QT 7 Pro only affords export to PICT format.

Some changes may have accidentally been introduced in Apple's effort to maintain this old stuff.

The original video was shot in AVHDC, a relatively new, high definition format. Editing support has been slow in coming. iMovie and FCP can handle AVHDC, but neither QT Player nor QT 7 Pro can.

In order to get something usable, I converted from AVHDC to m4v (mpeg 4 video) with Handbrake.

I don't know what effect jumping through all these hoops might have had.

Thanks for your help.

Re: convert pict to pict only does top 20% of image

Posted: 2012-01-19T07:54:13-07:00
by jeffATwork
"AVHDC" + caffein deficit = AVCHD + caffein normal