This is a follow up to viewtopic.php?f=2&t=24801
IM 6.8.8.2 Q16 Mac OSX Snow Leopard
I did a test with -colorspace grayscale -type truecolor for jpg and png. It seems that Exiftool does not recognize the 3 channels.
Perhaps other format specific tools will know the difference.
Do I misunderstand what to expect or have I made an error in this?
convert rose: -colorspace gray -type truecolor rose_gray.jpg
Fred-Weinhauss-Mac-mini:desktop fred$ exiftool -s -ee -g1 -u -n -D rose_gray.jpg---- ExifTool ----
- ExifToolVersion : 8.71
---- System ----
- FileName : rose_gray.jpg
- BitsPerSample : 8
- ColorComponents : 1
---- Composite ----
- ImageSize : 70x46
convert rose: -colorspace gray -type truecolor rose_gray.png
Fred-Weinhauss-Mac-mini:desktop fred$ exiftool -s -ee -g1 -u -n -D rose_gray.png---- ExifTool ----
- ExifToolVersion : 8.71
---- System ----
- FileName : rose_gray.png
0 ImageWidth : 70
4 ImageHeight : 46
8 BitDepth : 8
9 ColorType : 0
Also for PNG, the png data from identify -verbose still shows grayscale.
png:IHDR.bit-depth-orig: 8
png:IHDR.bit_depth: 8
png:IHDR.color-type-orig: 0
png:IHDR.color_type: 0 (Grayscale)
possible bug JPG,PNG type=truecolor grayscale IM 6.8.8.2 Q16
Re: possible bug JPG,PNG type=truecolor grayscale IM 6.8.8.2
If you must have an RGB 8-bit-per-sample PNG, then use png24:output.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug JPG,PNG type=truecolor grayscale IM 6.8.8.2
glennrp wrote:If you must have an RGB 8-bit-per-sample PNG, then use png24:output.png
Thanks, Glenn. That gets around it for PNG. Exiftool reports:
ColorType : 2
But magick said to report this also if jpg did not work (according to http://www.imagemagick.org/Usage/formats/#jpg_write)
Snibgo, can you report with your jpgdump tool what you get for the following:
convert rose: -colorspace gray -type truecolor rose_gray.jpg
Re: possible bug JPG,PNG type=truecolor grayscale IM 6.8.8.2
I believe I've tracked this down to a change between 6.7.6-10 and 6.7.7-10. Running
with 6.7.6-10 results in a file that opens in RGB mode in GIMP 2.8.6, but 6.7.7-10 outputs a file that opens in Grayscale mode.
I built my binaries in fresh Debian GNU/Linux sid chroots with only libjpeg8-dev available as an extra dependency.
Another test case for this bug can be found in this other forum thread: viewtopic.php?f=1&t=23421&start=15#p106918
Code: Select all
convert rose: -colorspace gray -type truecolor rose_gray.jpg
I built my binaries in fresh Debian GNU/Linux sid chroots with only libjpeg8-dev available as an extra dependency.
Another test case for this bug can be found in this other forum thread: viewtopic.php?f=1&t=23421&start=15#p106918
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: possible bug JPG,PNG type=truecolor grayscale IM 6.8.8.2
IM v6.8.8-0 on Windows 8.1.
So "-type truecolor" does not work afer "-colorspace gray".
Weirdly "-type truecolor" does work afer "-monochrome":
Code: Select all
F:\web\im>%IM%convert rose: r.jpg
F:\web\im>dumpjpeg /ir.jpg
Input: /i r.jpg
r.jpg: JPEG image is 70w * 46h, 3 color components, 8 bits per sample
JPEG process: Baseline
width 70, height 46
F:\web\im>%IM%convert rose: -colorspace gray r.jpg
F:\web\im>dumpjpeg /ir.jpg
Input: /i r.jpg
r.jpg: JPEG image is 70w * 46h, 1 color components, 8 bits per sample
JPEG process: Baseline
width 70, height 46
F:\web\im>%IM%convert rose: -colorspace gray -type truecolor r.jpg
F:\web\im>dumpjpeg /ir.jpg
Input: /i r.jpg
r.jpg: JPEG image is 70w * 46h, 1 color components, 8 bits per sample
JPEG process: Baseline
width 70, height 46
Weirdly "-type truecolor" does work afer "-monochrome":
Code: Select all
F:\web\im>%IM%convert rose: -monochrome r.jpg
F:\web\im>dumpjpeg /ir.jpg
Input: /i r.jpg
r.jpg: JPEG image is 70w * 46h, 1 color components, 8 bits per sample
JPEG process: Baseline
width 70, height 46
F:\web\im>%IM%convert rose: -monochrome -type truecolor r.jpg
F:\web\im>dumpjpeg /ir.jpg
Input: /i r.jpg
r.jpg: JPEG image is 70w * 46h, 3 color components, 8 bits per sample
JPEG process: Baseline
width 70, height 46
snibgo's IM pages: im.snibgo.com
Re: possible bug JPG,PNG type=truecolor grayscale IM 6.8.8.2
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.8-3 Beta, available by sometime tomorrow. Thanks.