mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 21:42:59 -05:00
PDF export: an image over 2^27 pixels is written scaled down instead of left out
A placed image of more pixels than the writer is given (2^27) was left out of the PDF, with the warning for an image that can't be decoded (#10490). It is now decoded as Open and Place decode it, within MAX_RASTER_ALLOC and by the decoders that refuse a file too short for the pixels it declares, and scaled down to the most pixels that fit before the Compression and Output settings apply. The warning gives its size and the size written. An image that can't be scaled down (beyond the allowance, or CMYK) is still left out, and the warning gives its size as the cause. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
c4d4ba8552
commit
df730ecbcd
6 files changed
+238
-19
No files matched your search
@@ -1640,6 +1640,10 @@ Images follow the `compression` settings of their kind (`color`, `gray`, or `mon
|
||||
`abovePpi` as placed they are resampled (`downsample`: `average`, `subsample` or `bicubic`) to `ppi`, and compressed
|
||||
with `zip`, `jpeg` (at `quality`; images with transparency stay lossless) or `auto` (JPEGs stay JPEG, the others
|
||||
lossless). `none`, `jpeg2000`, CCITT and `runLength` are written as ZIP, with a warning when an image needs them.
|
||||
An image of more than 2^27 pixels (134 million) is not written as it is: it is scaled down to the most pixels that
|
||||
fit, in its proportions and each pixel the mean of those it covers, before those settings apply, and a warning gives
|
||||
both sizes. One that can't be scaled down (its pixels are beyond what Open and Place decode, or it is a CMYK image) is
|
||||
left out, and the warning gives its size.
|
||||
The pieces of an image bent by a Warp effect are resampled once, for the widest and the highest size any piece places
|
||||
the image at, and all paint that one image.
|
||||
A 16-bit PNG that is not resampled, recompressed or converted keeps its 16 bits a sample in PDF 1.5 and later files,
|
||||
|
||||
Reference in new issue
Block a user