JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit

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

List of issuesList of issues

#2102 Adding images via -importImages CLI is not working
Author: user rayyaw
Date created:
Type: question
Visibility: Everybody
Assigned to:
Labels: CommandlineImport
State: opened Help

> What steps will reproduce the problem? - Decompile an SWF like the one attached using the CLI. Make sure to export everything. - Insert any image into the images/ folder with a new image number. > What is the expected output? What do you see instead? The expected output is that when the SWF is recompiled and contains the new image. However, it does not contain the image. I checked this by opening the SWF in the GUI and checking that the image is not present under the "images" section. Commands run: ffdec --importScript [script folder] [...] ffdec --importImages [script folder] [import into the same SWF] > What version of the product are you using? Is it "nightly build"? Which operating system do you have? OS = Debian Linux (Flatpak install) Version = 19.0.0 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. I have attached an example SWF file for testing this.
DownloadSMF_Base_Hack.swf (2,219 KiB)
The import command does not create new images/scripts/texts/etc., it only replaces already existing items with the matching name. It works that way.
State: new→opened
Type: bug→question
In that case, how should we import new images into an SWF file?
You can do it in the FFDec GUI. Switch to Tag list view, and then right click any tag and from context menu -> Add tag before -> images -> DefineBitsLossless. Then rightclick newly created tag -> Replace... and select image from disk. You cannot do it via commandline as you need to select the tag position within the SWF where to place it and this cannot be done via commandline.
Would it be possible to add this as a feature? We are writing a tool to modify SWF files based on JPEXS (, and not having this feature means we can't inject new images into SWF files.
Hmm, so how would you like to tell where to place the image through commandline? Sprite id and Tag index? This will be very uncomfortable. Or will you somehow display the timeline to the user for him to decide?
The way the Flash Patcher usually works is that the patch author opens the SWF in the FFDec GUI. They determine what needs to be changed, and writes a patch file that contains these changes. A user can then apply this patch using Flash Patcher without ever having to interact with FFDec directly. With that in mind, I think tag index would be most appropriate. The patch author would open the SWF in the GUI, determine the tag index that they want to create the new image with, and then use that index in the patch file. Flash Patcher would then use FFDec to import the image into the corresponding tag index. The user would not have to interact with FFDec's CLI nor the GUI, since this is all dictated by the patch file and executed by the Flash Patcher. If avoiding the GUI is necessary, then -dumpSWF would suffice for determining which tag index to import the image to.
Hi, do you have any updates?