Re: Hard limits on output raster dimension

Ken Sharp <[email protected]> Tue, 17 Apr 2018 08:13:36 +0100
Newsgroups gmane.comp.printing.ghostscript.devel
Message-ID <[email protected]>
At 09:54 16/04/2018 -1000, Paul Wessel wrote:

>I wonder if there are any 32-bit count limitations on the raster image 
>output that ghostscript can produce? I.e., if I ask ghostscript to 
>rasterize an image plotted in PostScript using the image operator that has 
>dimensions NX * NY = NM pixels where NM > 2^32, is that supported.  I.e., 
>do you use 64-bit variables for counts (int64_t or size_t) in ghostscript?

The PostScript language is, basically, 32-bit, so if you exceed a signed 
32-bit integer at any point you are immediately into uncharted territory. 
Some values are represented internally by a fixed point representation, for 
performance reasons. Again exceeding that might lead to problems.

Beyond that, its impossible to tell from the limited amount of information 
supplied.


>I ask because I am getting an image that seems to suffer from 32/64 bit 
>issues.  Here is my image call (129600 by 64800 source image):
>
>V N 0 0 T 10800 5400 scale [/Indexed /DeviceRGB 1 <0000FFFF0000>] 
>setcolorspace
><< /ImageType 1 /Decode [0 1] /Width 129600 /Height 64800 /BitsPerComponent 1
>    /ImageMatrix [129600 0 0 -64800 0 64800] /DataSource currentfile 
> /ASCII85Decode filter /FlateDecode filter
> >> image
>G[BaQ!<E0#!.^11YO2Z'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
>.....

You haven't described the 'issues' and its not possible for us to 
investigate because you haven't given us enough to work with.

Please note that this mailing list is for questions regarding development 
of applications using Ghostscript (or development of Ghostscript itself), 
not bug reports or PostScript questions. If you think you have found a bug, 
please open a bug report and attach an example file.

Shortened boilerplate:

8<-------------------8<------------------8<-----------------8<-------------------8<----
Thank you for your interest in Ghostscript. Ghostscript is supplied in two 
ways, as open-source software under the Affero General Public Licence 
Version 3 (http://en.wikipedia.org/wiki/Affero_General_Public_License) and 
as commercial software under licence from Artifex Software.

We do value input from our free user community and we will fix bugs 
reported to us as well as considering enhancement requests. However, this 
is entirely at our own discretion and, as you would expect, our commercial 
customers are given priority over free users.

Bugs can be reported (and enhancement requests raised) at 
http://bugs.ghostscript.com there are a number of other avenues open to 
free users:

1) The stack overflow web site has a small but active community involved 
with Ghostscript, as well as PostScript and PDF. Questions raised here will 
often get a good response.

2) The UseNet forum comp.lang.postscript again has a similar community of 
enthusiasts.

3) The Ghostscript developers can be found on the #ghostscript IRC channel 
on irc.freenode.net. Questions asked here will usually get a response 
though time zone differences can mean there are periods when nobody is 
available. The channel is logged, the developers read the logs and will 
respond, so even if nobody answers immediately hang around, someone will 
eventually. Alternatively check back in the logs later.

8<-------------------8<------------------8<-----------------8<-------------------8<----



                     Ken