If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
List of issues
: The issue tracker is now writable again and logged users can download files too. But note that our support is very LIMITED.
#1367 How do I change an RGBA fill colour to just RGB? Images not showing, can't save file.
> What steps will reproduce the problem? I'm editing Skyrim swf files to recolour map marker icons. The problem I have found is that many of the shapes do not display in the top level shapes screen - http://imgur.com/0UaR7OH - although they are there when you double click into them. The issue appears to stem from them having gradient fill styles with RGBA colours rather than Solid fill with just RGB. If I convert all the fill styles to Solid I can then paste in the RGB codes and they stay as RGB. Shapes which I can convert all fills this way then save and show in the main shapes display, and I can resave the swf. However I have come across several which already have Solid fill styles with colours which are RGBA, and there is no way I can see to change RGBA to RGB. I this means the icons won't display. If I try removing the fill style and adding one back in with the same fill style number as before I can then not save anything or re-edit the shape. > What is the expected output? What do you see instead? Take a look in the attached swf. Open it and click on the top level shapes field to show all shapes. You'll see several blank shapes. Double click on one and it will open in the edit window. The first twenty or so that do show are the ones I have already edited to change the fill type. There are several, for example 67 and 73, which I cannot successfully edit because they contain solid fill styles or solid line styles with an RGBA colour which I cannot change to RGB. Examples: Shape 67 - http://imgur.com/vTASRXR (this one isn't in the file I've attached as I swapped it out) Shape 73 - http://imgur.com/TRYM3a7 > What version of the product are you using? Is it "nightly build"? Which operating system do you have? Latest nightly build 1640, although it's the same on the latest stable build too. Windows 7 x64 > 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 hope you can help because this is doing my head in!
mapmarkerart.swf (63 KiB)
Please try the latest nightly build. RGBA is correct for shape 3 and shape 4 tags. The problem was that FFDec created RGB objects instead of RGBA which prevented it from saving (there was a class cast exception) Color was also visible when the fill style was anything. It should be visible only when Solid fill is selected (otherwise it is not used, not even saved to the file)
OK, so the gradient fill was the issue, not the RGB/RGBA?
I don't know. RGBA was an issue, so now it is better. Please try it, maybe there are other problems. I don't know exactly what to do, and what to you want to see/modify.
Fixed a 2nd issue about the focal gradients. So if you use them, please try the latest nightly. Is it working now?
Not really. It does now show one or two parts of a few of the missing images - http://imgur.com/nMU7Zuf - so it's a small improvement! For now I have raw edited or recreated all of the missing ones so I have them all fixed for now - http://imgur.com/VnbO6Ot - however that was a lengthy 12 hour work round! If there is anything else that can be tweaked to resolve the issue that would be great but don't worry if not. At least I now know what I need to do! One separate question though - is there any way of scaling down to fit existing bounds when Replacing shapes? These same map markers are used in other files, but one in particular has them set much smaller. Obviously if I Replace & Update Bounds then I break that scaling, and if I just Replace then I only get a clipped section of the icon within the original bounds. This is what I mean: New coloured icon (at minimum zoom) in mapmarkerart.swf - http://imgur.com/yjeKfXP Same icon to be replaced (at minimum zoom) in map.swf - http://imgur.com/ZgvKmES What happens if I just Replace - http://imgur.com/8tqFJgZ So how can I get that bigger icon to scale down to the desired size on Replace? I am exportign/importing as .svg
So your 1st problem was that the shapes was not correctly rendered in the folder view page. (And in the preview when you used the internal viewer), sorry, it was not clear for me. Now it is fixed, please try it. About repace: When you replace the shape with a png, it is resized. It was different for SVG, so I think it was a bug, too. Now when you replace a shape with an SVG, it resizes the image. (I hope it won't cause any trouble to other users) So please try to import an image with the "Replace" function.
But I don't understand why do you manually edit the shapes in raw editing. Why is it needed? Why not just import the new ones? Could you please exmplain me what do you want to achive exactly from the beginning? If you attach the original swf (because the one you attached was already modifed, you "fixed" something - but I think you should not fix anything manually, it should be fixed in FFDec) and attach the new images, and specify what to change then I'll try to make it easier or fix the problems in FFDec.
It resizes the svg but elements are misaligned and there's 'bleeding' (?) Images all now display without any issue, so that's fixed! You're fast :D
Whats this? Please specify how to reproduce the problem.
OK, so now when I 'Replace' the svg imports and resizes, but elements are not correctly aligned and there are lines 'leaking' out to the side on most of them. I'm uploading my loose files for you. But for example, this is the icon in mapmarkerart.swf - http://imgur.com/spj3l2c I right click on that and export as svg at 100%, then right click on the corresponding shape in map.swf and 'Replace' with the svg I just exported, and this is what I get - http://imgur.com/yntykRj If you want to try it that particular svg is named Nordic Ruin
Coloured Map Markers Loose Files.7z (40 KiB)
mapmarkerart.swf (62 KiB)
map.swf (228 KiB)
Please try the latest nightly again. Next time please write the following in the bug report: - open map.swf - select shapes/defineshape 19 - right click on it, select "Replace" - open the Nordic Ruin.svg file - check the preview with external viewer: "elements are not correctly aligned and there are lines 'leaking'" And attach the referenced files only. - I don't care the other images - I don't know what is "corresponding shape", In first SWF (which is not needed anyway) the shapeid is 47, in 2nd SWF it is 19... so please specify the ID only - Exporting SVG step is unnecessary for reproducing the problem, it is enough to attach the svg OR attach the 1st SWF and write to the steps to export the image, but in this case do not attach the SVG:) - So please make it simple and clear, thanks:) This would make easier for us to fix the problem.
OK, apologies for not being more concise in reporting the secondary issue. To address your earlier questions - "I don't understand why do you manually edit the shapes in raw editing. Why is it needed? Why not just import the new ones?" - I assumed that the issue with them initially not showing was an issue with the shapes, not a bug with your software, and the only way I could get them to show was to Raw Edit by changing the gradient fills to solid fills and setting the colours manually. They would then show fine. I also assumed that the issue with misalignment and bleeding was again an issue with 3rd party editing software and not a bug with the import/replace function in JPEXS. I assumed this to be the case because of the following process: 1. In JPEXS export any shape as .svg 2. Open exported .svg in Inkscape 3. Make any small change and save svg 4. In JPEXS right click the shape and 'Replace' with edited svg 5. Same issues with misalignment and bleeding present as described before. So I therefore assumed, before asking for help here, that the only way I could 'fix' or edit the shapes without breaking something in JPEXS was to Raw Edit them. Anyway, with nightly 1645 the svg import issue with alignment/bleeding is fixed. Thank you. I think this leaves me with one remaining issue which looks to be something to do with offsets when you Replace the shapes. Look at the compass at the top of this screenshot - http://imgur.com/1TKLCjo The black and white icon positioned on the compass bar is one of the original unedited shapes and is correct, all the others are the edited coloured icons which are now showing below the compass bar. These are the ones which have been changed using the 'Replace' function in JPEXS. It appears that when you Replace (without updating bounds) JPEXS does not retain the correct offsets. To demonstrate this do the following: 1. In JPEXS open attached original hudmenu.swf and select Shape #132 2. Note Bounds information in lower left of screen - http://imgur.com/F9HcY7Q 3. Right click on Shape #132 and select Replace 4. Select City.svg from earlier upload 5. Observe Bounds information has changed, with offsets removed - http://imgur.com/md6Xc6P For information, if I Raw Edit the bounds to match those present before shape replaced this happens - http://imgur.com/TlEneFp - only the top left quadrant of the shape remains visible, so I can't seem to fix offsets in this way.
hudmenu.swf (496 KiB)
This should be fixed, please try the latest nightly.
Man, you are on fire :D It has fixed the issue in JPEXS, I just need to redo the file and test in game later. I will report back shortly.
Actually, I may have spoken too soon. The bounds all look right, but as you can see I'm only getting the top left quadrant showing on many of the replaced shapes - http://imgur.com/zLCJqIY Actually, looking at that screenshot it's more like the top left 75%?
I should point out that the part shapes issue above is on the ones where they should be being reduced to fit the bounds. The ones which are not being scaled down at all seem to be OK
To replicate do the following: 1. Open map.swf (attached) 2. Right click on Shape #7 3. 'Replace' with City.swf from earlier upload 4. Click on top level shapes entry to display all shapes 5. Observe Shape #7 only showing part of icon now
map.swf (228 KiB)
The alignment issue on the compass in game is now fixed - thanks :D
Ok, sorry.. you are right, the bounds calculation was wrong when the imported image has a different size. Please try the latest nightly again:)
Yep, all fixed. Thank you so much for all your attention today. I have sent you some pizza and beer to say thank you :D
Thanks. I close this issue now. Please create new issue if you find any new problem.