Project

General

Profile

Actions

Feature #72872

open

Change default rendering for pdf thumbnails to png

Added by Fabian Thommen about 8 years ago. Updated about 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2016-01-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
pdf, convert, jpg, png
Complexity:
medium
Sprint Focus:

Description

Now if you have [GFX][thumbnails_png] = 0, the default value, pdf thumbnails are converted to gif.

If you set it to [GFX][thumbnails_png] = 1, pdf thumbnails are converted to png.

PDF used as images on FE are renderd via this chain, resulting in 256 color gifs on a page.

Add new config value for pdf2img conversion, like this:

[GFX][pdf2imgformat] = 'jpg'
[GFX][pdf2imgformat] = 'png'
[GFX][pdf2imgformat] = 'gif'

default should be jpg.

Actions #1

Updated by Riccardo De Contardi about 7 years ago

  • Target version changed from 8 LTS to 9.0
Actions #2

Updated by Susanne Moog over 6 years ago

  • Category changed from Content Rendering to Frontend
  • Assignee deleted (Fabian Thommen)
Actions #3

Updated by Susanne Moog about 6 years ago

  • Target version deleted (9.0)
Actions #4

Updated by taywa gmbh over 5 years ago

  • Target version set to Candidate for Major Version
Actions #5

Updated by Stephan Bauer about 3 years ago

I'm showing bigger images converted from pdf files in the frontend.
These images would be best shown as jpg not as gif or png.

Here is a comparison between the different file formats TYPO3 created.
The files are 600x425px.
GIF: 128kb
PNG: 934kb
JPG: 60kb

The png file is not optimized in any way. With an optimizer I could reduce the size to 325kb which is sill to much.
I could produce jpg file after changing $targetFileExtension to 'jpg' in file /sysext/core/Classes/Resource/Processing/AbstractGraphicalTask.php in line 81.

I think that the option 'thumbnails_png' should be deprecated and there should be an option where we can choose a file format even new formats like webp.

One problem I found after changing $targetFileExtension to 'jpg' is that some of these PDF files are converted to gif oder png with transparency and the jpg file shows a black frame because the color for transparency is set to this.

Actions

Also available in: Atom PDF