Project

General

Profile

Actions

Feature #17729

closed

GIFBUILDER: niceText and transparentColor solution

Added by Ralf Hettinger about 17 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-10-28
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

The problem which I think may be solved is described in TSRef:
"transparentColor
[...]
Option:
transparentColor.closest = 1

This will allow for the closest color to be matched instead. You may need this if you image is not garanteed "clean".

NOTE: You may experience that this doesn't work if you use reduceColors-option or render text with niceText-option."

Yes, the experience is that this is very visible: The transparent images will as from my experience definitely have a distored pixel-cloud around, since niceText will add surrounding pixels in different colors for realizing anti-aliasing. closest seems not to change anything.

The following patch adds some more "magic" to the parameter transparentColor.closest (which I think is not described adequately in TSRef anyway, since from what I understand will have no effect if not adding additional colors separated by | to transparentColor).

So, imagine if
transparentColor = #FFFFFF
transparentColor.closest = 1
was set and some TEXT object generated with niceText = 1

Old behaviour:
No change at all (please correct me if I'm wrong)... for having effect one would have had to apply f.e.
transparentColor = #FFFFFF | #FEFEFE
and then would have replaced both colors to transparency. Not a very helpful option when working with niceText, since one will not know which colors have to be made transparent.

Behaviour after patching:
The closest value is not any longer just a boolean, but gives a percentage value for the Image/GraphicsMagick parameter -fuzz and thus might have as well higher int values for different results. (see http://www.imagemagick.org/script/command-line-options.php#fuzz ).

As from my experience -fuzz has a quite visible (and appreciated) effect for niceText and transparentColor even with low percentage values (given by transparentColor.closest), but of course may depend on the type of image.

It would allow easy configuration for GIFBUILDER images with niceText and transparents background but without pixel-clouds - and provides a solution for the TSRef mentioned problem.

(issue imported from #M6604)


Files

6604_4.1.3.patch (1009 Bytes) 6604_4.1.3.patch Administrator Admin, 2007-10-28 14:35
6604_trunk.patch (1.63 KB) 6604_trunk.patch Administrator Admin, 2007-11-09 23:05
6604_tsref_wiki.txt (1.14 KB) 6604_tsref_wiki.txt Administrator Admin, 2007-11-09 23:05
Actions #1

Updated by Ralf Hettinger about 17 years ago

Uhm. Posted my description in the wrong field (only visible in extended view of bugtracker). So better posting it again... sorry


The following patch adds some more "magic" to the parameter transparentColor.closest (which I think is not described adequately in TSRef anyway, since from what I understand will have no effect if not adding additional colors separated by | to transparentColor).

So, imagine if
transparentColor = #FFFFFF
transparentColor.closest = 1
was set and some TEXT object generated with niceText = 1

Old behaviour:
No change at all (please correct me if I'm wrong)... for having effect one would have had to apply f.e.
transparentColor = #FFFFFF | #FEFEFE
and then would have replaced both colors to transparency. Not a very helpful option when working with niceText, since one will not know which colors have to be made transparent.

Behaviour after patching:
The closest value is not any longer just a boolean, but gives a percentage value for the Image/GraphicsMagick parameter -fuzz and thus might have as well higher int values for different results. (see http://www.imagemagick.org/script/command-line-options.php#fuzz [^] ).

As from my experience -fuzz has a quite visible (and appreciated) effect for niceText and transparentColor even with low percentage values (given by transparentColor.closest), but of course may depend on the type of image.

It would allow easy configuration for GIFBUILDER images with niceText and transparents background but without pixel-clouds - and provides a solution for the TSRef mentioned problem.

Actions #2

Updated by Ralf Hettinger about 17 years ago

Hm. After looking at the code a second time, I now understand what is done with closest=1. And I still think that the documentation in TSRef is... well... suboptimal and way of incomplete.

I changed the patch a bit to derive a more logic handling for closest from 1-99 and would suggest a more complete description in TSRef (applied as 6604_tsref_wiki.txt; the .txt describes the behaviour after applying patch 6604_trunk.patch)

Actions #3

Updated by Xavier Perseguers over 13 years ago

  • Category deleted (Communication)
  • Target version deleted (4.6.0-beta1)
Actions #4

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?

Actions #5

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF