Dear graphicsmagick users and developers,
I have a grayscale image
(http://www.pic-upload.de/view-15038554/rect.png.html).
Using the Magick++ API, the image is of type "Magick::BilevelType",
depth=8bit.
When accessing the pixel with getConstPixels, the graylevel is stored in
the "opacity channel".
In contrast, the grayvalues are accessible with method "red" when
type==GrayscaleType;
Is this behaviour intended? Furthermore I haven't found any hint in the
API documentation which describes this.
BTW, when trying to convert the image with "gm convert rect.png
rect.jpg", the resulting image is black.
The behaviour described belongs also to the octave bug report
https://savannah.gnu.org/bugs/?36820
gm identify -verbose rect.png
Image: rect.png
Format: PNG (Portable Network Graphics)
Geometry: 800x600
Class: DirectClass
Type: bilevel
Depth: 1 bits-per-pixel component
Channel Depths:
Gray: 1 bits
Opacity: 8 bits
Channel Statistics:
Gray:
Minimum: 0.00 (0.0000)
Maximum: 0.00 (0.0000)
Mean: 0.00 (0.0000)
Standard Deviation: 0.00 (0.0000)
Opacity:
Minimum: 0.00 (0.0000)
Maximum: 255.00 (1.0000)
Mean: 249.34 (0.9778)
Standard Deviation: 35.38 (0.1387)
Opacity: ( 0, 0, 0,255) #000000FF
Rendering-Intent: saturation
Gamma: 0.45455
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)
Resolution: 35.43x35.43 pixels/centimeter
Filesize: 8.8K
Interlace: No
Orientation: Unknown
Background Color: white
Border Color: #DFDFDF00
Matte Color: #BDBDBD00
Compose: Over
Dispose: Undefined
Iterations: 0
Compression: Zip
Signature:
6422d6dcabe7fa53d34bc218ea7abea0f6ee62573a18b8d3c11dc35264908fce
Tainted: False
User Time: 0.040u
Elapsed Time: 0:01
Pixels Per Second: 15.3M
gm version
GraphicsMagick 1.3.16 2012-06-23 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2012 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP yes
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG yes
JPEG-2000 yes
JPEG yes
Little CMS yes
Loadable Modules yes
OpenMP yes (201107)
PNG yes
TIFF yes
TRIO no
UMEM no
WMF yes
X11 yes
XML yes
ZLIB yes
Host type: x86_64-pc-linux-gnu
Configured using the command:
./configure '--build' 'x86_64-linux-gnu' '--enable-shared'
'--enable-static' '--enable-libtool-verbose' '--prefix=/usr'
'--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info'
'--docdir=${prefix}/share/doc/graphicsmagick'
'--with-gs-font-dir=/usr/share/fonts/type1/gsfonts' '--with-x'
'--x-includes=/usr/include/X11' '--x-libraries=/usr/lib/X11'
'--without-dps' '--without-modules' '--without-frozenpaths'
'--with-perl' '--with-perl-options=INSTALLDIRS=vendor'
'build_alias=x86_64-linux-gnu' 'CFLAGS=-Wall -g -fno-strict-aliasing
-fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
-Wformat -Wformat-security -Werror=format-security -O2' 'LDFLAGS=
-fPIE -pie -Wl,-z,relro -Wl,-z,now ' 'CXXFLAGS=-Wall -g
-fno-strict-aliasing -fPIE -fstack-protector --param
ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
-Werror=format-security -O2'
Final Build Parameters:
CC = gcc -std=gnu99
CFLAGS = -fopenmp -Wall -g -fno-strict-aliasing -fPIE
-fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -O2 -Wall -pthread
CPPFLAGS = -I/usr/include/X11 -I/usr/include/freetype2
-I/usr/include/libxml2
CXX = g++
CXXFLAGS = -Wall -g -fno-strict-aliasing -fPIE -fstack-protector
--param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
-Werror=format-security -O2 -pthread
LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now -L/usr/lib/X11
-L/usr/lib -L/usr/lib
LIBS = -ljbig -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng12
-lwmflite -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread
Best regards, Andy
|