| <<<Back 1 day (to 2020/08/23) | Fwd 1 day (to 2020/08/25) >>> | 20200824 |
myopia | also, is jp2k pdf really suppoed to reduce file size? I have magick'd out.pdf without -compress, and it's getting me 855729, a -compress with JPEG2000 gives me 5430539, and a -compress with JBIG2 gives 53199040 | 00:15.50 |
emendelson | Question: There are 80+ TrueType fonts in pcl/urwfonts and 35 Type 1 fonts in Resource/Font. Is it possible to find Type 1 equivalents of the 45 TTF fonts in order to make a custom build of GhostScript that could create PDFs that include those fonts? | 00:22.36 |
| (That should say "the 45 TTF fonts with no match in the Type 1 fonts".) And I know there my be legal reasons behind this. | 00:23.16 |
kens | myopia, Ghostscript is a PostScript and PDF interpreter, not an image processor. Because PostScript can read DCT streams (the foundation of JPEG) directly it is possible to write a PostScript program to read JPEG images, and that's what viewjpeg.ps does. | 06:53.00 |
| PostScript cannot read wavelet streams so you can't read a JPEG2000 image in PostScript, or at least not easily. Technically its possible to do so but its computationally very expensive and would be very slow. | 06:53.47 |
| Regarding size; Both JPEG and JPEG2000 are lossy compression systems, but they are not the *same* lossy method. | 06:54.41 |
| JPEG2000 will, in general, produce smaller file sizes for a given qulaity level, or better quality for the same file size, compared to JPEG. | 06:55.08 |
| However, that's if you start form the original image. | 06:55.18 |
| When you JPEG compress an image you lose some of the information (quantising). JPEG200 uses a different scheme and I think its entirely possible that the quantisation of JPEG could result in a larger JPEG2000 file than the JPEG file. Of coruse if you started fomr the original uncompressed image it would be smaller. | 06:56.32 |
| In summary; don't do this. Once you've used a lossy compression algorithm you should not attempt to re-encode it. THis is why the pdfwrite device in Ghostscript has a 'pass-through' mode for JPEG images, to avoid decompressing and recompressing the data which would cause further quality loss. | 06:57.35 |
| emendelson; well yes its possible to find, or create Type 1 equaivalents to TrueType fonts from a purely technical perspective. | 06:58.27 |
| Or you coudl just add the TrueType fonts to Ghostscript's font list by modifying fontmap.GS and/or cidfmap | 06:59.35 |
| That's not guaranteed, but it will generally work. As you note hte TrueType fonts supplied with GhostPCL are supplied under a non-AGPL compatible license. | 07:00.11 |
emendelson | kens, Thank you for the information on fonts. This may or may not be worth the effort, but I'll experiment with a few equivalent fonts. Thanks again. | 12:21.12 |
kens | No problem | 12:21.38 |
| <<<Back 1 day (to 2020/08/23) | Forward 1 day (to 2020/08/25)>>> | |