swf: Don't ignore Bitmap smoothing flags in SWF <8#10103
swf: Don't ignore Bitmap smoothing flags in SWF <8#10103torokati44 wants to merge 1 commit intoruffle-rs:masterfrom
Conversation
|
There is some complex behavior here to be careful of -- IIRC it has to do with a bitmap being in motion or not. In lower SWF version a one-frame movie would result in the smoothing behavior, while a multiple frame movie would be unsmoothed unless quality would be set to BEST. I'll try to remember the exact behavior and get back to you! |
|
Oh, this sounds similar to #5340! |
|
I see this PR is only changing |
|
Actually thinking that this might be a little dangerous to merge as-is as this will incorrectly cause a lot of classic SWFs to be smoothed. We should either properly implement the |
|
Okay, I wasn't sure of it either, without any corresponding changes in the renderer - hence my wish for relevant real-world content. |
|
No worries, I'll try to post some minimal example SWFs. |
|
You can try Wasted Sky from the demo page -- renders as unsmoothed in FP but smoothed with this PR. Here's some minimal examples: To implement, perhaps we add a |
|
Some more examples: 2 frame SWF with 2 bitmaps, one flagged smooth and one unsmoothed,
The linked z0r SWF is 1 frame, so it honors the smoothing setting. The docs above indicate that the smoothing should take place "if the movie clip is static", which sounds like it should smooth if the timeline is stopped or something -- but so far my tests only shows it being affected by the # of frames on the timeline, regardless if it is stopped or not. Another point of confusion is the Flash IDE will always export the bitmap smoothing flag when SWF version is set to 7 and below, regardless of what is set in the UI, so I had to manually edit these SWFs. |
I think this comment:

Bitmap smoothing only occurs in SWF version 8+.Refers to this section in the AS reference:
However, the SWF spec does not mention the version-gate for this flag:

As for
Lower versions use 0x40 and 0x41 type even when unsmoothed.it would be great if someone could come up with a real-world example of this.I already have a counter-example: https://z0r.de/L/z0r-de_56.swf
This is a V6 SWF, and the bitmaps should appear smoothed.
And at any rate, handling this at the SWF read/write level might not be the best idea - I think it would be in a better place near rendering.