| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Thanks to Michael Osipov for pointing this out
|
|
|
|
|
|
|
|
|
|
| |
The TIFF devices Set the RowsPerStrip tag by dividing the max_strip_size
by the width of the raster. However it is entirely possible to set the
media size to a width of 0 pixels (when resolution is taken into
account), which causes a divide by zero.
Just check the width before dividing and if it is not at least 1 then
return an error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When regression testing different versions, we'd like the files
to be byte for byte comparable. This is broken by output files that
contain comment fields or tags that list the creator versions.
The cluster nobbles at least some of these by hackily rewriting
the gscdefs.h file at build time, but misses files that differ
because of the copyright message. Also, this hackery is hard to
reproduce when building our own versions to try and recreate
problems seen in the cluster.
Accordingly, add some #definery within base/gscdefs.h that
performs the same function dependent only on -DCLUSTER.
Also tweak some devices to ensure that they don't use
revision numbers/copyrights etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes to libtiff for gpdl.
1) Ensure that libtiff doesn't mess with 'boolean' in GS builds
on Windows. Without this, the jpeg structures used by our JPEG
lib build are different in size when called from gs and libtiff,
resulting in runtime errors.
2) Update libtiff so that it can correctly call into the jpeg
library so that memory operations happen from our pools, not
malloc/free. Slightly horrid in that this is more complex with
OJPEG than JPEG files.
Fix some compiler warnings stemming from libtiff update
Various tweaks for libtiff 4.3.0 to build on Windows
Mainly "importing" tif_config.vc.h and tiffconf.vc.h - the tiff build now
created those with cmake.
Then typedef'ing several C99 ***_t style types.
Finally defining matching C99 PRI* printf formatting macros
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically this is intended to allow use of -sPostRenderProfile
so we can (for example) use the plan device to render in RGB, then
convert to cmyk as a post-process step.
In preparing this commit, various problems were found in the planar
downscaler, and these are fixed here too.
In addition, to avoid every device that wants to support
PostRenderProfile needing an identical batch of code to create the
icclink, we extract that into a gx_downscaler_create_post_render_link
helper function, and use that in the appropriate devices.
As a knock on for that, we tweak gsicc_free_link. Firstly, it no
longer takes a memory pointer, but rather uses the one in the
link itself. This is a step up from the existing code that appears
to allocate with 'stable_memory' and then free with 'non_gc_memory'.
I suspect we've been getting away with this by chance because the
two have always happened to be the same.
Secondly, it performs the 'free_link' operation as part of the call.
This enables all the call sites to be simplified.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In cases where -dOverprint=/simulate and -dUsePDFX3Profile
are used, if the page has overprint and no transparency push the
pdf14 device and render the page to a transparency buffer
to the Output intent color space. If the target device has a
different ICC profile than the output intent (specified
with something like -sOutputICCProfile="Fogra39.icc") then
convert the output intent rendered buffer to the target
device color space. Also make sure that the tiff device do
not use the wrong profile in the header.
Additionally, a problem was found where the pdf14 device
was setting up color conversions using the perceptual rendering
intent. Those transforms should be using the colorimetric
rendering intent.
|
| |
|
|
|
|
|
|
|
|
| |
Automatic skew detection/correction for planar devices that use
the downscaler (such as psdcmyk).
Change -dDeskew to be boolean. Remove stray trap setting for
tiffscaled32.
|
| |
|
|
|
|
| |
This makes it easier to issue patch releases for security problems.
|
|
|
|
|
|
|
|
| |
Pass the downscaler parameters into the downscaler init routines,
rather than explicit values.
This reduces the size of the API, and means that future additions
to the structure will automatically be passed through.
|
|
|
|
|
|
|
|
|
|
| |
Calling TIFFCleanup doesn't close the underlying tiffio. Call
TIFFClose instead.
Now the tiff io close handler is actually called, be careful
not to close the underlying file twice.
Finally, actually remember to close the comp file.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Discovered these when working on bug 701845 'devicen' device. Checking
uncovered a plethora of other places that used one of these functions
assuming success.
Also the gdev_prn_copy_scan_lines had places that assumed the return code
was a valid line_count, so if negative, could memset many lines in front of
an allocated buffer.
The code in a few of these usages is strange, and we don't have a way to
check them, so this may not match the original intent.
Also, while perusing all of these files, check devices for alloc's that
assume success and fix them (usually return gs_error_VMerror).
|
|
|
|
|
| |
This causes the bjccolor device at least to give indeterminate
results. Nobbling the rest won't hurt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(squash of commits from filesec branch)
Most of this commit is donkeywork conversions of calls from
FILE * -> gp_file *, fwrite -> gp_fwrite etc. Pretty much every
device is touched, along with the clist and parsing code.
The more interesting changes are within gp.h (where the actual
new API is defined), gpmisc.c (where the basic implementations
live), and the platform specific levels (gp_mswin.c, gp_unifs.c
etc where the platform specific implementations have been
tweaked/renamed).
File opening path validation
All file opening routines now call a central routine for
path validation.
This then consults new entries in gs_lib_ctx to see if validation
is enabled or not. If so, it validates the paths by seeing if
they match.
Simple C level functions for adding/removing/clearing paths, exposed
through the gsapi level.
Add 2 postscript operators for path control.
<name> <string> .addcontrolpath -
Add the given <string> (path) to the list of paths for
controlset <name>, where <name> can be:
/PermitFileReading
/PermitFileWriting
/PermitFileControl
(Anything else -> rangecheck)
- .activatepathcontrol -
Enable path control. At this point PS cannot make any
more changes, and all file access is checked.
|
| |
|
|
|
|
|
|
|
|
|
| |
Also update copyright dates.
Remove gs_cmdl.ps as we no longer use it, and remove its entry from
psfiles.htm.
Remove xfonts.htm as this feature (xfont support) is long, long gone.
|
|
|
|
|
| |
A lot of places accessed device methods directly, instead of using the
accessor macros. Update all the code to use the accessors.
|
|
|
|
|
|
|
|
|
| |
Currently only hooked up for tiffscaled and tiffscaled4.
Enable using -dDownScaleETS=1 along with the usual other downscaler
hooks.
No control over all the myriad ETS flags as yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this commit, it is possible to have the tiffscaled32, tiffscaled24
and tiffscaled8 devices apply an ICC profile after rendering, which
will transform the rendered page to the color space defined by
PostRenderProfile. When used in conjunction with -dUsePDFX3Profile,
if the source file contains an Output Intent profile, the page will
be rendered first to the color space defined by the output intent profile and then
transformed to the color space defined by the PostRenderProfile setting. In this
way, we can avoid issues caused by mismatching ICC profiles in overprint
situations. This along with the commit http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=0df325b4bdbd037c92e2528fc16900de84f8d9c1
are needed to create a patch.
|
| |
|
|
|
|
| |
Only write downscaler options if we will read them.
|
| |
|
|
|
|
| |
I was putting some params that I wasn't getting (or vice versa).
|
|
|
|
|
|
|
|
|
| |
The same sets of parameters (or subsets thereof) are read/
written in many devices get/put_params routines to control
the downscaler.
Arrange to read/write these all in one place to keep the
code simpler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hooked in under the downscaler, so accessible to any device that
calls the downscaler without too many changes.
Only enabled for CMYK devices, so tiffscaled32, tiffsep and
psdcmyk.
-dTrapX and -dTrapY set the horizontal and vertical search areas.
Use 0 for off, otherwise n searches +/- n either side.
TrapOrder sets the cmyk spot ordering from darkest to lightest.
For CMYK, default is [ 3 1 0 2 ] (K, M, C, Y).
For CMYK and spots, default is [ 3 1 0 2 4 5 6 7 ... ]. This
will be wrong if spots aren't arranged in darkest to lightest order.
A typical command line might look like:
gs -sDEVICE=tiffsep -dTrapX=2 -dTrapY=2 -o out.tif
-c "<< /TrapOrder [ 3 1 0 2 ] setpagedevice >>"
-f examples/tiger.eps
|
|
|
|
|
|
|
|
|
|
|
| |
Tweak the code to avoid the warnings seen in the MSVC debug build of
gs.
Mostly adding a few casts to make type changes explicit (and hence
avoid the "casting from int to double might lose data" etc warnings).
Reorder the headers in a couple of places to avoid offsetof being
redefined in a system header warnings.
|
|
|
|
|
|
|
| |
Add a -dTIFFDateTime option, defaults to "true" (existing behaviour) and
-dTIFFDateTime=false prevents the tag being written to the output file.
Also, document this and the UseBigTIFF option.
|
|
Squashed into one commit (see branch for details of the evolution of the
branch).
This brings gpcl6 and gxps into the Ghostscript build system, and a shared
set of graphics library object files for all the interpreters.
Also, brings the same configuration options to the pcl and xps products as we
have for Ghostscript.
|