[MGNLIMG-76] allow the ImageGenerator produce an OutputFormat based on the parameters Created: 18/Nov/10  Updated: 09/Mar/11  Resolved: 18/Nov/10

Status: Closed
Project: Imaging
Component/s: None
Affects Version/s: 2.0.5
Fix Version/s: 2.1

Type: Improvement Priority: Major
Reporter: Philipp Bärfuss Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLETK-45 improve the dynamic image type genera... Closed
relation
is related to MGNLETK-35 imaging: produce images of the same t... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Like in MGNLETK-35 a generator can want to return a OutputFormat dynamically. The getOutputFormat() should take the ParameterProvider as an argument like the generate() method does.



 Comments   
Comment by Philipp Bärfuss [ 18/Nov/10 ]

The changes done in MGNLETK-35 are actually changing the original format object. In case of concurrent image generation this could produce wrong results.

Comment by Richard Unger [ 02/Mar/11 ]

I don't think this is a complete fix for the issue.

If I understand correctly: Whereas before this fix, it was a problem because all images were generated in a fixed format, as configured in the outputFormat of the generator, now all images are generated in the format they were uploaded in.

While I understand that sometime this is what is wanted, it is not always the case:

We want to generate ALL variations in PNG Format. The reason is:

When generating variations, the imageing layer does not correctly handle transparency of GIF images. However, when rendering the variation as PNG, transparency is handled correctly.
For this reason, we want to generate all variations as PNG, since then the transparency is correct, even when the editors upload GIFs.

Or, more generally: it might be desirable to be able to override the generated variation format, for whatever reason.

Since this bugfix, overriding the format is no longer possible, or at least, I can't figure out how, and it also is not documented anywhere.

Comment by Philipp Bärfuss [ 08/Mar/11 ]

To achieve what you want to do you would:

  • subclass STKImageGenerator
  • override getOutputFormat(parameter)
  • the set the class node-data to your class's name
Comment by Richard Unger [ 09/Mar/11 ]


Thanks Philipp, I will try this approach. If it works I will post the resulting class.

Generated at Mon Feb 12 02:12:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.