-----------------------------------------------------------------------------------
I have a quite a difficult problem. I'm using Habbo asset extractor's figures.php to extract all the images from the clothes swfs. However, a few of the clothes swfs are custom and some of those have "corrupted" images. These images get recognized by swfdump as JPEG, while they should be PNG. I edited the script so that it also extracts JPEG images.
Problem is, these JPEG do not actually get extracted. When I try one by hand with the command:
My guess is that the person who made the custom SWF, changed the extension of some JPEG images by hand to PNG, without converting the actual picture to PNG, however I have no idea how to fix this.
This is the swf file I'm talking about: https://www.sendspace.com/file/dzhx6d
This is only one of many custom clothes which have these corrupted images though.
@ovflowd since you're the creator of the script, do you have any idea?
11-03-16
ovflowd
Re: Habbo asset extractor figures.php errors
Sorry @Gaby but this error is not easy to be solve. Try extracting manually the Images with "Flash Decompiler" and replace it with Flash Decompiler. Habbo Asset Extractor works better with PNG. ;)
11-03-16
Gaby
Re: Habbo asset extractor figures.php errors
Quote:
Originally Posted by ovflowd
Sorry @Gaby but this error is not easy to be solve. Try extracting manually the Images with "Flash Decompiler" and replace it with Flash Decompiler. Habbo Asset Extractor works better with PNG. ;)
I may have found a fix by using the JPEXS commandline instead of swfextractor. I'm still busy with it, so will update later. ^^
I made this for figures.php by the way, of course it can be used in all the scripts by just scanning for what I changed in this function and changing it in the other scripts. If FFdec is installed in another directory, just change C:\Program Files (x86)\FFDec\ffdec.bat to the correct directory.
It also seems to be working a lot faster, since FFdec extracts ALL the images at once, then I edited the foreach so it would only rename the images extracted by FFDec to the correct name.
15-03-16
ovflowd
Re: Habbo asset extractor figures.php errors
Nice but i think this command wll spend more time ...
Since you got a lot of experience with this stuff, do you have an idea for this:
I rewrote one of your extract scripts to extract the pet SWF images for me. All seems to work well, but when I for example take a camera pic with a monkey, it the monkey doesn't get the correct color, it always stays purple. So I took a look at the JSON that gets send to the camera script (the CameraGD class you released).
For a yellow monkey I took a picture off, it sends this in the sprites section of the JSON object:
My eye fell on the paletteSourceName key, so I looked in your script, but it doesn't get handled. I decompressed monkey.swf and opened it up with notepad, then saw this:
monkey06 color (color #efa400 as the palette suggests) should be somehow applied over monkey_64_a_2_0.png and monkey01 color (color #94635b as the palette suggests) over monkey_64_sd_0_0.png.
Searching in your script I found the following in protected function render_sprites():
Does this mean I have to write some code to convert the color codes provided by the palette to rgb and then use $this->image_recolor to make sure the monkey sprites get the correct color?
Also what would be the easiest way to extract the color palette from a pet SWF?
I would personally store the palettes in a database table afterwards, what would you do?
16-03-16
ovflowd
Re: Habbo asset extractor problems
Nope you don't need do that. Isn't the pallete problem. Verify if the files of the Monkey are being saved correctly.
16-03-16
Gaby
Re: Habbo asset extractor problems
Quote:
Originally Posted by ovflowd
Nope you don't need do that. Isn't the pallete problem. Verify if the files of the Monkey are being saved correctly.