Bug 693235 - Banding interacts badly with huge paths
Summary: Banding interacts badly with huge paths
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Windows 7
: P4 enhancement
Assignee: Robin Watts
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-30 18:05 UTC by Robin Watts
Modified: 2022-06-08 16:10 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Watts 2012-07-30 18:05:01 UTC
Created attachment 8808 [details]
11-09.PS

When rendering 11-09.PS at 300dpi banded, we get bad results, as some of the paths overflow oddly when being read back from the clist. This causes the paths to go in the wrong direction in some bands, and be omitted entirely from others.

Not clear that there is really much we can do about this, but opening the bug so we can note any ideas.

Simplified version of 11-09.PS attached.

The line in question draws from 0 0 to 3E9 3E9.
Comment 1 Ray Johnston 2012-07-30 18:49:31 UTC
I think the best thing to do is to detect it and then fall back to the
'default' action (not high level path based).

This is what is done if the disable_mask has clist_disable_fill_path (for
fills) or clist_disable_stroke_path set (for stroking).
Comment 2 Peter Cherepanov 2021-01-02 18:18:20 UTC
The problem is reproduced at a higher resolution. The file renders correctly at 300 dpi now, but following command line produces incorrect picture:

~/ghostpdl/debugbin/gs -sDEVICE=tiffg4 -r1000 -o a.tiff -dMaxBitmap=10 11-09.PS
Comment 3 Robin Watts 2022-06-08 16:10:22 UTC
Fixed in:

commit 8a72d1c9d24497d483ca756d5311d88e3d7a3420
Author: Robin Watts <Robin.Watts@artifex.com>
Date:   Tue Jun 7 19:40:14 2022 +0100

    Bug 693235: Avoid paths with massive extents during clist writing.

    Reduce massive extents to avoid overflow problems on playback
    due to the shifting of the content for each band.