Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bitmap color blend when render cue. #2055

Closed
peerless2012 opened this issue Jan 19, 2025 · 5 comments
Closed

Support bitmap color blend when render cue. #2055

peerless2012 opened this issue Jan 19, 2025 · 5 comments
Assignees

Comments

@peerless2012
Copy link

[REQUIRED] Use case description

I'm developing ass/ssa render use libass for Meida3, the libass will produce a alpha bitmap, I create a ALPHA_8 bitmap and put it to Cue, when render the bitmap in SubtitlePainter, I need to blend some color when draw the bitmap.

Proposed solution

Add a bitmapColor field in Cue, and set the bitmapColor to bitmapPaint in SubtitlePainter.

Alternatives considered

I also noticed that, compress bitmap to png is to fix a bug

@icbaker
Copy link
Collaborator

icbaker commented Jan 20, 2025

I'm afraid we don't plan to modify Cue to support this level of custom integration.

@icbaker icbaker closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
@peerless2012
Copy link
Author

I can make a PR for this.

@icbaker
Copy link
Collaborator

icbaker commented Jan 20, 2025

I'm afraid we wouldn't merge a PR for this either.

@peerless2012
Copy link
Author

peerless2012 commented Jan 20, 2025

But the Effect can't use to render subtitle.

And this feature will make bitmap from AGRB_8888 to ALPHA_8, and save 3/4 memory usage.

Without this feature, I have to use ARGB_8888 for each bitmap, the performance is so bad.

@peerless2012
Copy link
Author

Currently, I add a AssSubtitleParser to parse ass data and a AssSubtitleParserFactory to use my own SubtitleParser.

When parse ass time data, i can get bitmap, then set the output bitmap to output.

The bitmap is ARGB_8888 for now, because I can't extend Subtitle render logic. And I think the blend color for bitmap is also a simple and common feature which not just for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants