Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
The GFX file
Results 1 to 4 of 4

Thread: The GFX file

  1. #1
    Junior Member
    Join Date
    Mar 2015
    Posts
    17

    The GFX file

    This is for education only, zezenia is a great game and K-zod seems nice!
    This is probably a few years too late but hopefully someone enjoys tibian/zez art as much as me.

    update 5.6
    Download all 6768 imgs here.



    some strange stuff inside:


    So the first 4 bytes of the file I don't know but after that you have:
    two bytes displaying the amount of images (0x19cb=6603)
    another two bytes (0,0) which you can skip.

    Then you just loop through all the images.
    Looking at the first image:
    two bytes width (0x20,0), two bytes height(0x20,0), three bytes are the bytes to read(0x001000) and zero byte at the end.
    So its a 32x32 image and it is telling us to read 4096 bytes (32*32*4)=4096 HOWEVER not all the data is here as you will see.
    Next you will read the pixel data (0x2c, 0x53, 0x92, 0xff, etc).
    The pixels are in BGRA format.

    Finally (BUT VERY IMPORTANT!) you need to do a search through each image and look for a 1 in the first byte of each pixel, if there is, you need to add x amount of transparent pixels (BGRA=0,0,0,0 will do nicely).
    You get x from the next byte after the 1 in the first byte.
    So, you need to remove this 1 byte and x (the next byte) and insert x amount of transparent pixels (4 bytes).

    An image to explain everything and where these blue 1 bytes linger:


    The GFX is full of goods worth looking through!
    I haven't check them all, maybe I have made a mistake,
    If you need help feel free to msg me or post
    Last edited by xbv; 11-25-2015 at 09:54 AM.

  2. #2
    Junior Member
    Join Date
    Mar 2015
    Posts
    17
    updated the link for those interested in the new update




  3. #3
    You think there anything other than image data in the file?

  4. #4
    This is wrong.
    Zezenia reads 4 bytes to know the number of images to read, not 2. It also reads 4 bytes for the size of the image, not 3.

    Regarding the transparent pixels, I didn't look much with olly, but something is wrong there. The third image, which is the client background, is 2048x1024 (width x height). This means there are 2048x1024 = 2097152 pixels in the image. If you multiply that by 4, which is the number of bytes in each pixel, you get 8388608, which is the number of bytes in the image. However, the actual number of bytes in the image is 6291510 (downloaded from your dump).

    Also, all your images have bit depth 24, which means 3 bytes per pixel, not 4, but eh gfx apparently uses 4, which means bit depth 32.

    If I read the 8388608 bytes that I should read according to the tutorial, and replace the 0x01 0x0X with X transparent pixels, I will get an out of boundaries exception, because moving 2 bytes for the transparents and 4 for the other ones doesn't match the 8388608 (I will be at index 8388606 when I should read the last 4 bytes, which would be 8388606, 8388607, 8388608 (boom) and 8388609 (boom)).

    Also, in your screenshot, in the image you are using as example, there are 3 sections of transparent pixels: 01 12, 01 04, and 01 06. This means 18*4 + 4*4 + 6*4 = 72 + 16 + 24 = 112 bytes (28 pixels).
    The rest of the image pixels sum up to 9*4 bytes = 36 bytes (9 pixels). 28 + 9 = 37 pixels. HOWEVER, the image is 8x8 = 64 pixels. The math doesn't add up.
    Last edited by wizzarr; 02-04-2016 at 04:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •