Bug 114471 - Invalid scaling in devices psgray/psmono/psrgb
Invalid scaling in devices psgray/psmono/psrgb
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: ghostscript (Show other bugs)
9
All Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-28 10:12 EST by Krzysio (Chris) Leszczynski
Modified: 2007-04-18 13:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-02 13:37:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Krzysio (Chris) Leszczynski 2004-01-28 10:12:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:
Ghostscript using devices psgray and psmono assumes -r72 and scales
down the final picture if its larger.  psrgb appears to scale
correctly.



Version-Release number of selected component (if applicable):
ghostscript-7.05-32.1

How reproducible:
Always

Steps to Reproduce:
1.
 gs -sDEVICE=psgray -sPAPERSIZE=letter -r300 \
      -sOutputFile=tiger-gray-300.ps \
      /usr/share/ghostscript/*/examples/tiger.ps
2.
 gs -sDEVICE=psrgb -sPAPERSIZE=letter -r300 \
      -sOutputFile=tiger-rgb-300.ps \
      /usr/share/ghostscript/*/examples/tiger.ps

3. gv tiger-gray-300.ps
4. gv tiger-rgb-300.ps
    

Actual Results:  tiger-rgb-300.ps looks correctly -- I have included
it for reference only.
tiger-gray-300.ps is scaled down, it occupies lower-right corner
of the paper.

Expected Results:  Both pictures should be similar
(save the obvious lack of colors in psgray).


Additional info:

There is an easy way to correct it.  The driver incorrectly adds
a "scale" command in each %%PageSetup.

I have known this problem for years and always postprocess it
through:
    perl -pe 's/^(.*) scale/% removed $1 scale/'

A bug lies in /.ImageRead procedure, in psmono_setup[] in
BUILD/ghostscript-7*/src/gdevpsim.c:107
the procedure accepts a resolution from the stack but
then it hard-codes 72dpi.
Comment 1 Tim Waugh 2004-01-28 10:43:07 EST
For reference, the relevant part is:

    "/.ImageRead {"     /* <xres> <yres> <width> <height> <bpc>
.ImageRead - */
    "  gsave [",
        /* Stack: xres yres width height bpc -mark- */
    "    6 -2 roll exch 72 div 0 0 4 -1 roll -72 div 0 7 index",
        /* Stack: width height bpc -mark- xres/72 0 0 -yres/72 0 height */
    "  ] { .ImageItem }",
        /* Stack: width height bpc <matrix> <proc> */
    "  4 index 3 index mul 7 add 8 idiv string currentfile 0 ()",
        /* Stack: width height bpc <matrix> <proc> <buffer> <file> 0 () */
    "  9 4 roll",
        /* Stack: <buffer> <file> 0 () width height bpc <matrix> <proc> */
    "  image pop pop pop pop grestore",
    "} def",
Comment 2 Bill Nottingham 2006-08-04 23:42:58 EDT
Red Hat apologizes that these issues have not been resolved yet. We do want to
make sure that no important bugs slip through the cracks.

Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
They are maintained by the Fedora Legacy project (http://www.fedoralegacy.org/)
for security updates only. If this is a security issue, please reassign to the
'Fedora Legacy' product in bugzilla. Please note that Legacy security update
support for these products will stop on December 31st, 2006.

If this is not a security issue, please check if this issue is still present
in a current Fedora Core release. If so, please change the product and version
to match, and check the box indicating that the requested information has been
provided.

If you are currently still running Red Hat Linux 7.3 or 9, please note that
Fedora Legacy security update support for these products will stop on December
31st, 2006. You are strongly advised to upgrade to a current Fedora Core release
or Red Hat Enterprise Linux or comparable. Some information on which option may
be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Any bug still open against Red Hat Linux 7.3 or 9 at the end of 2006 will be
closed 'CANTFIX'. Again, if this bug still exists in a current release, or is a
security issue, please change the product as necessary. We thank you for your
help, and apologize again that we haven't handled these issues to this point.
Comment 4 Bill Nottingham 2007-01-02 13:37:07 EST
Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
f you are currently still running Red Hat Linux 7.3 or 9, you are strongly
advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux
or comparable. Some information on which option may be right for you is
available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.

Note You need to log in before you can comment on or make changes to this bug.