Project

General

Profile

Actions

Bug #14537

closed

gifbuilder jpgs are 256 colors

Added by David Lanier almost 20 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-02-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.0rc1
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

gifbuilder creates jpgs that are 256 colors, even if it begins with a high quality jpg.

I believe the source of the problem is in the usage of the imagecreate() function. In 3.7.0, it's found on line 329 of class.tslib_gifbuilder.php.

After referring to the PHP docs, it appears that imagecreatetruecolor() is preferred for preserving image quality. This may only be an issue for installations using GDLib 2. (I'm using GDLib 2)

I tried simply changing imagecreate() to magecreatetruecolor(), but it then requires further adjustments in order to work correctly. (I got black backgrounds, and image quality was still 256 colors).

TYPOSCRIPT TEMPLATE
5 = IMAGE
5.file = GIFBUILDER
5.file {
format = jpg
quality = 100
XY = [10.w],[10.h]
10 = IMAGE
  1. loading high-quality jpg (smooth gradients, etc.)
    10.file {
    import = uploads/media/
    import.field = media
    import.listNum = 1
    }
    12 = TEXT
    12.fontFile = t3lib/fonts/GOUDOS.TTF
    12.fontSize = 20
    12.fontColor = white
    12.niceText = 1
    12.offset = 100,120
    12.text.field = title
    (issue imported from #M760)

Files


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #15149: m.mask produces 256 color images (why is GDlib involved here???)Closed2005-10-23

Actions
Is duplicate of TYPO3 Core - Feature #14269: Bug when using images_frames, jpg images and quality settingsClosed2004-08-12

Actions
Actions

Also available in: Atom PDF