+ update 2020: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means we will NOT develop new features and/or fix most of bugs. We left the tracker running in case somebody from community would like to work on it. Sorry for the inconvenience.
State: closed new: Initial state. As long as issue is in this state, the work on the issue has not yet begun. opened: Opened state means developer started working on the issue. Feature/Fix will probably be in the next release. postponed: This means developer is not working on it now, for some reason it cannot be implemented now. Issue may be opened again in the future. upgraded: Issue is in upgraded state when developer made changes to the program and new version was released. closed: This means the user is satisfied with issue results and no more changes are needed. invalid: These issues cannot be solved. ignored: Developer decided to take no action on this issue. returned: Program changes were made but user is not satisfied and returned the issue.
> What steps will reproduce the problem?
- I will illustrate this problem using a minimal file which contains the minimal
components of 1 image, 1 shape and 1 frame, however the behavior is the same for any .swf
00000018: DefineBitsLossless2 (1)
000001cf: DefineShape3 (2)
000001f6: RemoveObject2 Depth: 50
000001fa: PlaceObject2 (2) Depth:
- Replace the shape with another image using the latest stable build (6.0.1). I used a PNG
image with transparency.
- Do the same replacement in 5.3.0.
> What is the expected output? What do you see instead?
- Both versions manage to update the shape with the new image, but the outputs have
- 6.0.1 generates the following file:
00000013: DefineBitsLossless2 (3)
000007b2: DefineBitsLossless2 (1)
00000969: DefineShape3 (2)
00000993: RemoveObject2 Depth: 50
00000997: PlaceObject2 (2) Depth:
The new tag (3) is placed at the beginning of the file. When the swf contains hundreds of
shapes it becomes very hard to follow. More importantly I have had many problems when a
swf modified like this is projected inside another, making the output unusable.
- 5.3.0 generates the following output
00000018: DefineBitsLossless2 (1)
000001cf: DefineBitsJPEG2 (3)
00000941: DefineShape3 (2)
0000096b: RemoveObject2 Depth: 50
0000096f: PlaceObject2 (2) Depth:
- The new tag (3) is at where it should be (right after the original image it replaced)
and I have never had problems like I did with 6.0.1.
- However the tag type in the new file is always DefineBitsJPEG2 no matter what the
imported image format is. Transparency is somehow preserved but there is no way to edit
the alpha channel because it is not JPEG3/4. I have repeated the test with larger PNG
images and can confirm that the imported image is not compressed at all judging by image
size, so it was probably used as is but labelled as JPEG2.
> Please provide any additional information below. If the problem is related to a SWF
file, attach it here, otherwise we can't help you.
- As far as my use case is concerned, the behavior of 5.3.0 is more desirable as the
output is usable while the ones from 6.0.1 are not. The only thing needs fixing is to make
it assign the correct tag type after importing the image, and even better, make it
possible for users to change the tag type if the automatically assigned ones are wrong.
- Examples attached for your reference
In nightly 778 you can specify the format parameter for image and shape imports.
When you import an image, and the specified tag type is different from the original type,
then ffdec will remove the old tag, and create a new. (Sam as when you want to replace a
DefineBits image, it was already replaced with a DefineBitsJpeg2 tag)
Please let me know if i can close this issue.