View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011029 | Scribus | Import / Export | public | 2012-08-12 17:43 | 2012-11-13 20:32 |
Reporter | JussiP | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | any | OS | any | OS Version | any |
Product Version | 1.5.0svn | ||||
Fixed in Version | 1.5.0svn | ||||
Summary | 0011029: Add explicit monochrome color space | ||||
Description | This could be considered a part of bug 3540 but I filed it separately to reduce clutter on that bug. In addition to explicit grayscale support listed in the bug above, Scribus should special case 1 bit B&W images. Currently they are always resampled to 8 bit grayscale images, which is wasteful. 1 bit images should always be output in the PDF as 1 bit grayscale images, regardless of output mode (i.e web/grayscale/printer). The attached patchset does the following: - does some cleanup in the PDF export setup code - adds a monochrome color space - adds monochrome detection to the TIFF reader - adds code to generate a 1 bit bytestream for images - writes 1 bit images to the PDF stream It mostly works but there are some bugs. Most noticeably the colors are inverted when writing a printer PDF and non-1-bit images get corrupted on export. | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
|
|
Thanks, i just started testing your patch (0011026 took me a bit of time). I already fixed the corruption problem : it was caused by Color_Gray/Color_Cmyk values which had not been replaced by the corresponding ColorSpaceEnum value in WriteFlateImageToStream(). |
|
Some additional things to notice: - 1-bit images should probably not be JPEG compressed because they are used for precise linework in comics, even if the global compression setting is JPEG - 1-bit black is often used as overprint, but it does not seem to be working for images (it does for colored boxes) - the color reversal is probably caused by the internal image data being in CMYK when writing printer data and RGB otherwise |
|
Afaik JPEG compression is simply not allowed by PDF specs for 1-bit images. |
|
I disabled JPEG compression for monochrome image and force ZIP compression except in the case where 'no compression' is selected. The inversion problem when 'Printer' target is selected is also fixed. Fixed also a side-effect of that patch with grayscale image with embedded ICC profiles. I still have to test the patch with monochrome image on which image effects have been applied. There are some issues which have to be fixed. |
|
Committed! Thanks! |
|
Thank you for your fast response. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-08-12 17:43 | JussiP | New Issue | |
2012-08-12 17:43 | JussiP | File Added: monochrome.zip | |
2012-08-14 23:37 | jghali | Note Added: 0028818 | |
2012-08-15 07:47 | JussiP | Note Added: 0028819 | |
2012-08-15 13:39 | jghali | Note Added: 0028820 | |
2012-08-18 12:50 | jghali | Note Added: 0028831 | |
2012-08-18 22:31 | jghali | Note Added: 0028835 | |
2012-08-18 22:31 | jghali | Status | new => resolved |
2012-08-18 22:31 | jghali | Fixed in Version | => 1.5.0svn |
2012-08-18 22:31 | jghali | Resolution | open => fixed |
2012-08-18 22:31 | jghali | Assigned To | => jghali |
2012-08-19 08:28 | JussiP | Note Added: 0028836 | |
2012-11-13 20:32 | cbradney | Status | resolved => closed |