Mailing List Archive

Ghostscript Problem - Need Verification
I have noticed a severe problem with ghostscript. A bug report was filed
with the ghostscript upstream maintainers, but, surprisingly (to me at least)
no one could reproduce the problem. This may indicate that the problem is
unique to Gentoo ghostscript or that something strange is happening in my
system. What I need is verification from other Gentoo users.

The problem concerns the ghostscript raster drivers such as PGM, TIFF, PNG,
etc. Whenever a certain resolution (the exact value depends on the driver)
is exceeded, the output for any embedded images in the PostScript file is all
black. Text is rendered without problem, but if an image is inserted into
the document, say with OpenOffice, the image is rendered all black (above certain
resolutions).

Why do I use these raster drivers?

There can be a need to use them on occasion, but, more significantly, I print
documents with the ghostscript IJS driver from Hewlett-Packard. Ghostscript must
supply some kind of raster to the IJS driver because any embedded images are printed
all black. The problem therefore probably extends beyond the raster drivers
themselves.

Attached is a sample PostScript file, image-test.ps. With a PostScript viewer
such as gv or gsview, the image is clearly visible. If some Gentoo user could
render this file into a PGM format using the following command and then report the
results, it would be very helpful to me.

gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pgm -r380 -sOutputFile=image-test.pgm image.ps

Viewing the resulting image file with an image viewer such as display from ImageMagick
(display -resize 25% image-test.pgm) should show an all white page with an all black
rectangle in place of the central image.

Interestingly, if the resolution in the above command is changed to 300dpi (-r300)
the raster driver renders the image correctly. I found the exact cut-off value
to be 326.

The same behavior applies to the TIFF and PNG drivers although at different
cut-off resolution values for each driver. However, the fax drivers, tiffg3,
and the pbm driver seem unaffected.

If someone can verify this problem, then Gentoo ghostscript must be the fault.
If no one else can reproduce the issue then I am somehow in possession of a
jinxed system (although the same problem exists on both of my Gentoo machines).

Frank Peters
Re: Ghostscript Problem - Need Verification [ In reply to ]
On Mon, Dec 13, 2010 at 2:16 PM, Frank Peters <frank.peters@comcast.net> wrote:
<SNIP>
>
> Attached is a sample PostScript file, image-test.ps.  With a PostScript viewer
> such as gv or gsview, the image is clearly visible.  If some Gentoo user could
> render this file into a PGM format using the following command and then report the
> results, it would be very helpful to me.
>
> gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pgm -r380 -sOutputFile=image-test.pgm image.ps
>
<SNIP>

OK, I tried it. I see an all white page with a smaller black
rectangle, but that rectangle is just a border. Inside it the page is
white with the word 'Image' in some script-ish font.

My system chose Eye of Gnome as the default viewer. I tried Ocular and
see the same thing.

- Mark
Re: Ghostscript Problem - Need Verification [ In reply to ]
On 12/13/2010 05:16 PM, Frank Peters wrote:
> If someone can verify this problem, then Gentoo ghostscript must be the fault.
> If no one else can reproduce the issue then I am somehow in possession of a
> jinxed system (although the same problem exists on both of my Gentoo machines).

I tried this out on my Ubuntu and Gentoo systems, and I was able to see
the image in both cases just fine. Seems that I am running 8.71 on both
systems:

$ apt-cache policy ghostscript
ghostscript:
Installed: 8.71.dfsg.2-0ubuntu7
Candidate: 8.71.dfsg.2-0ubuntu7

And in Gentoo:

$ equery list ghostscript
[ Searching for package 'ghostscript' in all categories among: ]
* installed packages
[I--] [ ] app-text/ghostscript-gpl-8.71-r6 (0)

Hope this helps!

--
Randy
Re: Ghostscript Problem - Need Verification [ In reply to ]
Hi Frank,

Tested with 300, 380 and 800 dpi - looks to be working fine here.

http://www.sucks-ass.com/image-test.pgm.gz (108K) shows a screen grab of the
rendered raster @380dpi in gqview (same result using ImageMagick's display)

FWIW my emerge --info for the package is below.

Cheers,
malc.

duality /tmp $ emerge --info ghostscript-gpl

Portage 2.2.0_alpha7 (default/linux/amd64/10.0/desktop, gcc-4.5.1,
glibc-2.12.1-r3, 2.6.36-gentoo x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@
_2.67GHz-with-gentoo-2.0.1
Timestamp of tree: Sun, 12 Dec 2010 22:15:03 +0000
ccache version 3.1.3 [disabled]
app-shells/bash: 4.1_p9
dev-java/java-config: 2.1.11-r2
dev-lang/python: 2.6.6-r1, 3.1.2-r4
dev-util/ccache: 3.1.3
dev-util/cmake: 2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc: 0.6.5
sys-apps/sandbox: 2.4
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils: 2.21
sys-devel/gcc: 4.4.5, 4.5.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82
virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers)
Repositories: gentoo x-overlay ardunio
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 cadsoft googleearth AdobeFlash-10
AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ggdb -march=core2 -msse4 -mcx16 -msahf -msse4.1 -msse4.2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild
/etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -ggdb -march=core2 -msse4 -mcx16 -msahf -msse4.1
-msse4.2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news
parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict
unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.virginmedia.com/
ftp://ftp.heanet.ie/pub/gentoo/ http://mirror.bytemark.co.uk/gentoo/
http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/
http://mirror.qubenet.net/mirror/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1,-hash-style=gnu,-as-needed"
LINGUAS="en en_GB"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--compress --force --whole-file --delete --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/mlashley/overlay /home/mlashley/arduinoverlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa amd64 bash-completion
berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt
cscope cups cxx daap dbus dri dts dv dvd dvdr embedded emboss encode exif
fam ffmpeg fftw firefox flac fortran gdbm geolocation gif git gphoto2 gpm
gtk hal hddtemp hdri iconv icu id3tag ieee1394 inotify ipod ipv6 isag jack
java java6 jpeg jpeg2k kde kipi lastfm lcms ldap lensfun libnotify
lm_sensors lua lv2 mad mikmod mjpeg mmx mng modules mp3 mp4 mpeg mplayer
mudflap multilib mysql ncurses netboot nls nptl nptlonly nsplugin ogg
openexr opengl openmp optimized-qmake pam pango pcre pdf perl plasma png
ppds pppd python qt3support qt4 quicktime rdp readline redeyes rss sdl
semantic-desktop session smi smp spell sql sqlite sse sse2 sse3 sse4 sse4.1
sse4.2 ssl ssse3 startup-notification svg sysfs tcpd threads tiff tools
truetype unicode usb v4l2 vim-syntax vnc vorbis webkit x264 xcb xcomposite
xinerama xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp
atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968
fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx
via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare
dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter
mmap_emul mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm
authn_default authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate
dir disk_cache env expires ext_filter file_cache filter headers include info
log_config logio mem_cache mime mime_magic negotiation rewrite setenvif
speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon
directory ptp2" COLLECTD_PLUGINS="ipvs netlink apple_sensors nut apache
apcups ascent battery bind conntrack contextswitch cpu cpufreq curl curl_xml
df disk dns email entropy exec filecount fscache hddtemp interface iptables
irq java load madwifi mbmon memory multimeter mysql network nfs nginx ntpd
olsrd openvpn powerdns processes protocols python rrdcached sensors serial
snmp swap table tail tcpconns teamspeak2 ted thermal uptime users vmem
wireless csv exec logfile network notify_desktop python rrdcached rrdtool
syslog unixsock write_http match_empty_counter match_hashed match_regex
match_timediff match_value target_notification target_replace target_scale
target_set uuid" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate
evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom
oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip
tripmate tnt ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb
ncurses text" LINGUAS="en en_GB" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18"
USERLAND="GNU" VIDEO_CARDS="vesa radeon" XTABLES_ADDONS="quota2 psd pknock
lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit
sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK,
LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
Package Settings
=================================================================

app-text/ghostscript-gpl-9.00 was built with the following:
USE="X cups gtk jpeg2k (multilib) -bindist -djvu -idn" LINGUAS="-ja -ko
-zh_CN -zh_TW"
Re: Ghostscript Problem - Need Verification [ In reply to ]
On Mon, 13 Dec 2010 23:54:46 +0000
malc <mlashley@gmail.com> wrote:

>
> Tested with 300, 380 and 800 dpi - looks to be working fine here.
>

Thanks to all who took the time to do the test.

It looks like Gentoo and ghostscript are working properly. The problem
is elsewhere. I'll have to do some investigation into my system.

Thanks again to all.

Frank Peters