JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#1400 SVG export: invalid JPEG data
Author: user dev_zzo
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed Help

> What steps will reproduce the problem? Exporting the attached SWF in the SVG format. > What is the expected output? What do you see instead? Exporting results in embedded JPEG images being saved incorrectly; they are not recognised as valid JPEG data when e.g. base64 decoded and saved as a .jpeg file. Browsers don't render the images correctly as well. When inspected manually, there is no e.g. the JFIF signature. > What version of the product are you using? Is it "nightly build"? Which operating system do you have? 10.0.0 official release; export is performed with some custom Java code calling the ffdec library. > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. Both the original SWF and the export results are attached for your convenience.
developer
How did you create this SWF file? Why it the JFIF signature missing? Normally it should be in the swf. (However Java can decode the image without the header)
user
OK, I spent more time investigating this and it seems the initial finding of JFIF not being there is not true; it is there but 0x240 bytes later. It seems the DefineJPEG2 tag includes additional data (apparently, JPEG encoding tables) in the JPEG stream, which is not handled properly by other tools. Others are having a similar issue as well, see e.g. https://lists.gnu.org/archive/html/gnash-dev/2008-10/msg00140.html It would be ideal to detect and remove extra data in such cases, so the resulting SVG would contain image data that can actually be used.
user
Hmm, simply removing it doesn't really work either. The data is structured to be two JPEG streams, one containing the tables and the other containing the actual image data, like this: SOI DQT0 DQT1 DHT0 DHT1 DHT2 DHT3 EOI SOI APP SOFx SOS scandata EOI. This needs to be rebuilt into: SOI DQT0 DQT1 DHT0 DHT1 DHT2 DHT3 APP SOFx SOS scandata EOI. Basically, removing the first occurrence of FF D9 FF D8 does the job.
developer
Ahaa, so it is duplicate of #1347, not an SVG export issue.
admin
This was fixed in nightly 1828. The JPEG file is reorganized to properly display.
State: new→upgraded
admin
State: upgraded→closed