New wz png format decode code

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Ultimate Member Elem8100 is offline
    MemberRank
    Feb 2010 Join Date
    TaiwanLocation
    187Posts

    New wz png format decode code

    New wz png format decode code
    There's some new format for the png inside the newer version of wz files.Besides the existing ones (1, 2, 513, 517) the new format(3,1026,2050) they are transparent in HaRepacker.

    Here's decode code for all format.

    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Drawing;
    using System.IO;
    using System.IO.Compression;
    using System.Drawing.Imaging;
    using System.Runtime.InteropServices;
    
    namespace WzComparerR2.WzLib
    {
        public class Wz_Png
        {
            public Wz_Png(int w, int h, int data_length, int form, int offs, Wz_File wz_f)
            {
                this.w = w;
                this.h = h;
                this.data_length = data_length;
                this.form = form;
                this.offs = offs;
                this.wz_f = wz_f;
            }
    
            private int w;
            private int h;
            private int data_length;
            private int form;
            private int offs;
            private Wz_File wz_f;
    
            /// <summary>
            /// 获取或设置图片的宽度。
            /// </summary>
            public int Width
            {
                get { return w; }
                set { w = value; }
            }
    
            /// <summary>
            /// 获取或设置图片的高度。
            /// </summary>
            public int Height
            {
                get { return h; }
                set { h = value; }
            }
    
            /// <summary>
            /// 获取或设置数据块的长度。
            /// </summary>
            public int DataLength
            {
                get { return data_length; }
                set { data_length = value; }
            }
    
            /// <summary>
            /// 获取或设置数据块对于文件的偏移。
            /// </summary>
            public int Offset
            {
                get { return offs; }
                set { offs = value; }
            }
    
            /// <summary>
            /// 获取或设置图片的数据压缩方式。
            /// </summary>
            public int Form
            {
                get { return form; }
                set { form = value; }
            }
    
            /// <summary>
            /// 获取或设置图片所属的WzFile
            /// </summary>
            public Wz_File WzFile
            {
                get { return wz_f; }
                set { wz_f = value; }
            }
    
            public byte[] GetRawData()
            {
                lock (this.WzFile.ReadLock)
                {
                    DeflateStream zlib;
                    byte[] plainData = null;
    
                    this.WzFile.FileStream.Position = this.Offset;
    
                    if (this.WzFile.BReader.ReadUInt16() == 0x9C78)
                    {
                        byte[] buffer = this.WzFile.BReader.ReadBytes(this.data_length - 2);
                        MemoryStream dataStream = new MemoryStream(buffer);
    
                        zlib = new DeflateStream(dataStream, CompressionMode.Decompress);
                    }
                    else
                    {
                        this.WzFile.FileStream.Position -= 2;
                        MemoryStream dataStream = new MemoryStream(this.DataLength);
                        int blocksize = 0;
                        int endPosition = (int)(this.DataLength + this.WzFile.FileStream.Position);
    
                        var encKeys = this.WzFile.WzStructure.encryption.keys;
    
                        while (this.WzFile.FileStream.Position < endPosition)
                        {
                            blocksize = this.WzFile.BReader.ReadInt32();
                            byte[] dataBlock = this.WzFile.BReader.ReadBytes(blocksize);
                            encKeys.Decrypt(dataBlock, 0, dataBlock.Length);
    
                            dataStream.Write(dataBlock, 0, dataBlock.Length);
                        }
                        dataStream.Position = 2;
                        zlib = new DeflateStream(dataStream, CompressionMode.Decompress);
                    }
    
                    switch (this.Form)
                    {
                        case 1:
                            plainData = new byte[this.w * this.h * 2];
                            zlib.Read(plainData, 0, plainData.Length);
                            break;
    
                        case 2:
                            plainData = new byte[this.w * this.h * 4];
                            zlib.Read(plainData, 0, plainData.Length);
                            break;
    
                        case 3:
                            plainData = new byte[((int)Math.Ceiling(this.w / 4.0)) * 4 * ((int)Math.Ceiling(this.h / 4.0)) * 4 / 8];
                            zlib.Read(plainData, 0, plainData.Length);
                            break;
    
                        case 513:
                            plainData = new byte[this.w * this.h * 2];
                            zlib.Read(plainData, 0, plainData.Length);
                            break;
    
                        case 517:
                            plainData = new byte[this.w * this.h / 128];
                            zlib.Read(plainData, 0, plainData.Length);
                            break;
    
                        case 1026:
                            plainData = new byte[this.w * this.h];
                            zlib.Read(plainData, 0, plainData.Length);
                            break;
    
                        case 2050:
                            plainData = new byte[this.w * this.h];
                            zlib.Read(plainData, 0, plainData.Length);
                            break;
    
                        default:
                            break;
                    }
                    if (zlib != null)
                    {
                        zlib.Close();
                    }
                    return plainData;
                }
            }
    
            public Bitmap ExtractPng()
            {
                byte[] pixel = this.GetRawData();
                if (pixel == null)
                {
                    return null;
                }
                Bitmap pngDecoded = null;
                BitmapData bmpdata;
    
                switch (this.form)
                {
                    case 1: //16位argba4444
                        byte[] argb = GetPixelDataBgra4444(pixel, this.w, this.h);
                        pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format32bppArgb);
                        bmpdata = pngDecoded.LockBits(new Rectangle(Point.Empty, pngDecoded.Size), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
                        Marshal.Copy(argb, 0, bmpdata.Scan0, argb.Length);
                        pngDecoded.UnlockBits(bmpdata);
                        break;
    
                    case 2: //32位argb8888
                        pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format32bppArgb);
                        bmpdata = pngDecoded.LockBits(new Rectangle(Point.Empty, pngDecoded.Size), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
                        Marshal.Copy(pixel, 0, bmpdata.Scan0, pixel.Length);
                        pngDecoded.UnlockBits(bmpdata);
                        break;
    
                    case 3: //黑白缩略图
                        pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format32bppArgb);
                        int[] argb2 = new int[this.w * this.h];
                        {
                            int index;
                            int index2;
                            int p;
                            int w = ((int)Math.Ceiling(this.w / 4.0));
                            int h = ((int)Math.Ceiling(this.h / 4.0));
                            for (int y = 0; y < h; y++)
                            {
                                for (int x = 0; x < w; x++)
                                {
                                    index = (x + y * w) * 2; //原像素索引
                                    index2 = x * 4 + y * this.w * 4; //目标像素索引
                                    p = (pixel[index] & 0x0F) | ((pixel[index] & 0x0F) << 4);
                                    p |= ((pixel[index] & 0xF0) | ((pixel[index] & 0xF0) >> 4)) << 8;
                                    p |= ((pixel[index + 1] & 0x0F) | ((pixel[index + 1] & 0x0F) << 4)) << 16;
                                    p |= ((pixel[index + 1] & 0xF0) | ((pixel[index] & 0xF0) >> 4)) << 24;
    
                                    for (int i = 0; i < 4; i++)
                                    {
                                        if (x * 4 + i < this.w)
                                        {
                                            argb2[index2 + i] = p;
                                        }
                                        else
                                        {
                                            break;
                                        }
                                    }
                                }
                                //复制行
                                index2 = y * this.w * 4;
                                for (int j = 1; j < 4; j++)
                                {
                                    if (y *4 + j < this.h)
                                    {
                                        Array.Copy(argb2, index2, argb2, index2 + j * this.w, this.w);
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                            }
                        }
                        bmpdata = pngDecoded.LockBits(new Rectangle(Point.Empty, pngDecoded.Size), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
                        Marshal.Copy(argb2, 0, bmpdata.Scan0, argb2.Length);
                        pngDecoded.UnlockBits(bmpdata);
                        break;
    
                    case 513: //16位rgb565
                        pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format16bppRgb565);
                        bmpdata = pngDecoded.LockBits(new Rectangle(new Point(), pngDecoded.Size), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
                        Marshal.Copy(pixel, 0, bmpdata.Scan0, pixel.Length);
                        pngDecoded.UnlockBits(bmpdata);
                        break;
    
                    case 517: //16位rgb565缩略图
                        pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format16bppRgb565);
                        bmpdata = pngDecoded.LockBits(new Rectangle(0, 0, this.w, this.h), ImageLockMode.WriteOnly, PixelFormat.Format16bppRgb565);
                        byte[] lineData = new byte[this.w * 2];
                        for (int j0 = 0, j1 = this.h / 16; j0 < j1; j0++)
                        {
                            for (int i0 = 0, i1 = this.w / 16; i0 < i1; i0++)
                            {
                                int idx = (i0 + j0 * i1) * 2;
                                for (int k = 0; k < 16; k++)
                                {
                                    lineData[i0 * 32 + k * 2] = pixel[idx];
                                    lineData[i0 * 32 + k * 2 + 1] = pixel[idx + 1];
                                }
                            }
                            for (int k = 0; k < 16; k++)
                            {
                                Marshal.Copy(lineData, 0, new IntPtr(bmpdata.Scan0.ToInt32() + lineData.Length * (j0 * 16 + k)), lineData.Length);
                            }
                        }
                        pngDecoded.UnlockBits(bmpdata);
                        break;
                       /* pngDecoded = new Bitmap(this.w, this.h);
                        pngSize = this.w * this.h / 128;
                        plainData = new byte[pngSize];
                        zlib.Read(plainData, 0, pngSize);
                        byte iB = 0;
                        for (int i = 0; i < pngSize; i++)
                        {
                            for (byte j = 0; j < 8; j++)
                            {
                                iB = Convert.ToByte(((plainData[i] & (0x01 << (7 - j))) >> (7 - j)) * 0xFF);
                                for (int k = 0; k < 16; k++)
                                {
                                    if (x == this.w) { x = 0; y++; }
                                    pngDecoded.SetPixel(x, y, Color.FromArgb(0xFF, iB, iB, iB));
                                    x++;
                                }
                            }
                        }
                        break;*/
    
                    case 1026: //dxt3
                        argb = GetPixelDataDXT3(pixel, this.w, this.h);
                        pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format32bppArgb);
                        bmpdata = pngDecoded.LockBits(new Rectangle(new Point(), pngDecoded.Size), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
                        Marshal.Copy(argb, 0, bmpdata.Scan0, argb.Length);
                        pngDecoded.UnlockBits(bmpdata);
                        break;
    
                    case 2050: //dxt5
                        argb = GetPixelDataDXT5(pixel, this.w, this.h);
                        pngDecoded = new Bitmap(this.w, this.h, PixelFormat.Format32bppArgb);
                        bmpdata = pngDecoded.LockBits(new Rectangle(new Point(), pngDecoded.Size), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
                        Marshal.Copy(argb, 0, bmpdata.Scan0, argb.Length);
                        pngDecoded.UnlockBits(bmpdata);
                        break;
                }
    
                return pngDecoded;
            }
    
            public static byte[] GetPixelDataBgra4444(byte[] rawData, int width, int height)
            {
                byte[] argb = new byte[width * height * 4];
                {
                    int p;
                    for (int i = 0; i < rawData.Length; i++)
                    {
                        p = rawData[i] & 0x0F; p |= (p << 4); argb[i * 2] = (byte)p;
                        p = rawData[i] & 0xF0; p |= (p >> 4); argb[i * 2 + 1] = (byte)p;
                    }
                }
                return argb;
            }
    
            public static byte[] GetPixelDataDXT3(byte[] rawData, int width, int height)
            {
                byte[] pixel = new byte[width * height * 4];
    
                Color[] colorTable = new Color[4];
                int[] colorIdxTable = new int[16];
                byte[] alphaTable = new byte[16];
                for (int y = 0; y < height; y += 4)
                {
                    for (int x = 0; x < width; x += 4)
                    {
                        int off = x * 4 + y * width;
                        ExpandAlphaTableDXT3(alphaTable, rawData, off);
                        ushort u0 = BitConverter.ToUInt16(rawData, off + 8);
                        ushort u1 = BitConverter.ToUInt16(rawData, off + 10);
                        ExpandColorTable(colorTable, u0, u1);
                        ExpandColorIndexTable(colorIdxTable, rawData, off + 12);
    
                        for (int j = 0; j < 4; j++)
                        {
                            for (int i = 0; i < 4; i++)
                            {
                                SetPixel(pixel,
                                    x + i,
                                    y + j,
                                    width, 
                                    colorTable[colorIdxTable[j * 4 + i]],
                                    alphaTable[j * 4 + i]);
                            }
                        }
                    }
                }
    
                return pixel;
            }
    
            public static byte[] GetPixelDataDXT5(byte[] rawData, int width, int height)
            {
                byte[] pixel = new byte[width * height * 4];
    
                Color[] colorTable = new Color[4];
                int[] colorIdxTable = new int[16];
                byte[] alphaTable = new byte[8];
                int[] alphaIdxTable = new int[16];
                for (int y = 0; y < height; y += 4)
                {
                    for (int x = 0; x < width; x += 4)
                    {
                        int off = x * 4 + y * width;
                        ExpandAlphaTableDXT5(alphaTable, rawData[off + 0], rawData[off + 1]);
                        ExpandAlphaIndexTableDXT5(alphaIdxTable, rawData, off + 2);
                        ushort u0 = BitConverter.ToUInt16(rawData, off + 8);
                        ushort u1 = BitConverter.ToUInt16(rawData, off + 10);
                        ExpandColorTable(colorTable, u0, u1);
                        ExpandColorIndexTable(colorIdxTable, rawData, off + 12);
    
                        for (int j = 0; j < 4; j++)
                        {
                            for (int i = 0; i < 4; i++)
                            {
                                SetPixel(pixel,
                                    x + i,
                                    y + j,
                                    width,
                                    colorTable[colorIdxTable[j * 4 + i]],
                                    alphaTable[alphaIdxTable[j * 4 + i]]);
                            }
                        }
                    }
                }
    
                return pixel;
            }
    
            private static void SetPixel(byte[] pixelData, int x, int y, int width, Color color, byte alpha)
            {
                int offset = (y * width + x) * 4;
                pixelData[offset + 0] = color.B;
                pixelData[offset + 1] = color.G;
                pixelData[offset + 2] = color.R;
                pixelData[offset + 3] = alpha;
            }
    
            #region DXT1 Color
            private static void ExpandColorTable(Color[] color, ushort c0, ushort c1)
            {
                color[0] = RGB565ToColor(c0);
                color[1] = RGB565ToColor(c1);
                if (c0 > c1)
                {
                    color[2] = Color.FromArgb(0xff, (color[0].R * 2 + color[1].R + 1) / 3, (color[0].G * 2 + color[1].G + 1) / 3, (color[0].B * 2 + color[1].B + 1) / 3);
                    color[3] = Color.FromArgb(0xff, (color[0].R + color[1].R * 2 + 1) / 3, (color[0].G + color[1].G * 2 + 1) / 3, (color[0].B + color[1].B * 2 + 1) / 3);
                }
                else
                {
                    color[2] = Color.FromArgb(0xff, (color[0].R + color[1].R) / 2, (color[0].G + color[1].G) / 2, (color[0].B + color[1].B) / 2);
                    color[3] = Color.FromArgb(0xff, Color.Black);
                }
            }
    
            private static void ExpandColorIndexTable(int[] colorIndex, byte[] rawData, int offset)
            {
                for (int i = 0; i < 16; i += 4, offset++)
                {
                    colorIndex[i + 0] = (rawData[offset] & 0x03);
                    colorIndex[i + 1] = (rawData[offset] & 0x0c) >> 2;
                    colorIndex[i + 2] = (rawData[offset] & 0x30) >> 4;
                    colorIndex[i + 3] = (rawData[offset] & 0xc0) >> 6;
                }
            }
            #endregion
    
            #region DXT3/DXT5 Alpha
            private static void ExpandAlphaTableDXT3(byte[] alpha, byte[] rawData, int offset)
            {
                for (int i = 0; i < 16; i += 2, offset++)
                {
                    alpha[i + 0] = (byte)(rawData[offset] & 0x0f);
                    alpha[i + 1] = (byte)((rawData[offset] & 0xf0) >> 4);
                }
                for (int i = 0; i < 16; i++)
                {
                    alpha[i] = (byte)(alpha[i] | (alpha[i] << 4));
                }
            }
    
            private static void ExpandAlphaTableDXT5(byte[] alpha, byte a0, byte a1)
            {
                alpha[0] = a0;
                alpha[1] = a1;
                if (a0 > a1)
                {
                    for(int i = 2; i < 8; i++)
                    {
                        alpha[i] = (byte)(((8 - i) * a0 + (i - 1) * a1 + 3) / 7);
                    }
                }
                else
                {
                    for(int i = 2; i < 6; i++)
                    {
                        alpha[i] = (byte)(((6 - i) * a0 + (i - 1) * a1 + 2) / 5);
                    }
                    alpha[6] = 0;
                    alpha[7] = 255;
                }
            }
    
            private static void ExpandAlphaIndexTableDXT5(int[] alphaIndex, byte[] rawData, int offset)
            {
                for (int i = 0; i < 16; i += 8, offset += 3)
                {
                    int flags = rawData[offset]
                        | (rawData[offset + 1] << 8)
                        | (rawData[offset + 2] << 16);
                    for(int j = 0; j < 8; j++)
                    {
                        int mask = 0x07 << (3 * j);
                        alphaIndex[i + j] = (flags & mask) >> (3 * j);
                    }
                }
            }
            #endregion
    
            public static Color RGB565ToColor(ushort val)
            {
                const int rgb565_mask_r = 0xf800;
                const int rgb565_mask_g = 0x07e0;
                const int rgb565_mask_b = 0x001f;
                int r = (val & rgb565_mask_r) >> 11;
                int g = (val & rgb565_mask_g) >> 5;
                int b = (val & rgb565_mask_b);
                var c = Color.FromArgb(
                    (r << 3) | (r >> 2),
                    (g << 2) | (g >> 4),
                    (b << 3) | (b >> 2));
                return c;
            }
        }
    }


  2. #2
    Hardcore Member Neptunia is offline
    MemberRank
    Dec 2013 Join Date
    105Posts

    Re: New wz png format decode code

    How do i show you my eternal gratitude

    Last edited by Neptunia; 24-09-16 at 10:18 AM.
    Owner of IntrinsicMS, the Story Within.

    I am looking for KMST 1.2.477 setup/skill.wz. I'm willing to pay small fee for it

  3. #3
    Hardcore Member JellyIsHawt is offline
    MemberRank
    Nov 2009 Join Date
    2009Location
    102Posts

    Re: New wz png format decode code

    eugh, now I have to download vs
    Thanks!

    EDIT : where does this go ? WzPngpropterty.cs if so do I replace the whole code or add this in
    Sorry I've tried looking through everything on my own even though I have no prior experience with vs..
    Last edited by JellyIsHawt; 25-09-16 at 11:06 AM.
    Server Status:Not Ready

  4. #4
    I'm overrated. Fraysa is offline
    GammaRank
    Apr 2008 Join Date
    4,858Posts

    Re: New wz png format decode code

    Quote Originally Posted by JellyIsHawt View Post
    eugh, now I have to download vs
    Thanks!

    EDIT : where does this go ? WzPngpropterty.cs if so do I replace the whole code or add this in
    Sorry I've tried looking through everything on my own even though I have no prior experience with vs..
    I believe he just showed his code and his implementation, if you'd like to apply this whole class to HaRepacker it won't work.

  5. #5
    Hardcore Member JellyIsHawt is offline
    MemberRank
    Nov 2009 Join Date
    2009Location
    102Posts

    Re: New wz png format decode code

    Yeah, I'm completely in the dark when it comes to visual studios..
    But I did try to figure it out on my own and I ended up downloading vs and creating a new class in wzlib>wzproperties.

    I did some searching through hasuite and found something similar to the code he posted and I ended up finding WzPngProperty.cs so I thought of either adding the code to that class or making a completely new class.

    I came to the conclusion that it would make more sense to make a new class because of certain things I saw in the WzPngProperty class after looking through the code...

    Anyways I made a new class in WzLib called WzPng2Property, pasted his code and built it in any cpu mode as haha suggeted on his github and it gave me a error about Wz_Png not being defined or whatever.

    I've had experience with coding maplestory sources in netbeans and the code I was looking at in visual studios looked similar so I kind of understood what was going on

    this probably seems like the easiest thing ever to certain people who know about this stuff but yeah, total noob here...

    Rip.
    Server Status:Not Ready

  6. #6
    Ultimate Member Elem8100 is offline
    MemberRank
    Feb 2010 Join Date
    TaiwanLocation
    187Posts

    Re: New wz png format decode code

    The newest version of maplelib has already implemented(format 1026).You just need to change/add one line of code for format 2050.
    https://github.com/haha01haha01/Mapl...PngProperty.cs

    case 2050:
    ..........
    ..........
    decBuf = GetPixelDataDXT5(decBuf, Width, Height); //(change DX3 to DX5)
    ...........
    break;
    Last edited by Elem8100; 26-09-16 at 11:53 AM.

  7. #7
    Account Upgraded | Title Enabled! Angxl is offline
    True MemberRank
    Sep 2016 Join Date
    United StatesLocation
    210Posts

    Re: New wz png format decode code

    Where exactly do I put this? Do I make a new property called WzPng? I don't know how to make DLL's and I have an IQ of 1, so can someone teach me please?

  8. #8
    Account Upgraded | Title Enabled! davidling is offline
    True MemberRank
    Jul 2011 Join Date
    449Posts

    Re: New wz png format decode code

    Quote Originally Posted by Neptunia View Post
    How do i show you my eternal gratitude

    Lmao i get "has stopped working" after i compile the code and overwrite the .dll

    - - - Updated - - -

    Quote Originally Posted by Age View Post
    Where exactly do I put this? Do I make a new property called WzPng? I don't know how to make DLL's and I have an IQ of 1, so can someone teach me please?
    You might need to find the harepacker source code and look for WzPngProperty.cs, add those missing code (just copy paste and edit some stuff) and try, And "Has stopped working" is my result after compile it lol.

  9. #9
    Hardcore Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: New wz png format decode code

    This interests me as well, it sounds as easy as changing a few values, but when it comes to compiling the actual MapleLib, there is one missing file that it refers to "NAudio", so I just added it as a reference from the dll available from the Harepacker files (Not sure if that's how it's done).

    Similar to davidling, the end result is Harepacker functioning at all. Comparing the sizes, I'm pretty sure changing 2 values isn't suppose to increase the dll by 20kb, but I wouldn't know. What else am I missing? (I know nothing with these kinds of subjects please forgive me >~<)

    Anyone know how to compile it successfully?

  10. #10
    I'm overrated. Fraysa is offline
    GammaRank
    Apr 2008 Join Date
    4,858Posts

    Re: New wz png format decode code

    Quote Originally Posted by Modify View Post
    Anyone know how to compile it successfully?
    1. Clone MapleLib
    2. Fire up Visual Studio
    3. Add the required code @Elem8100 posted
    4. ???
    5. profitzzzzz!!!

  11. #11
    Hardcore Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: New wz png format decode code

    Hi Fraysa :o

    Quote Originally Posted by Fraysa View Post
    1. Clone MapleLib
    2. Fire up Visual Studio
    3. Add the required code @Elem8100 posted
    4. ???
    5. profitzzzzz!!!
    This put a big smile on my face, but I just want to confirm a few things before I have another attempt at this curse again

    When I clone MapleLib, start up the MapleLib.csproj, then place the required code based off where the namespace "WzComparerR2.WzLib" is as a file called Wz_Png?

    -> I just realized I thought of something similar to what JellyIsHawt did
    Last edited by Modify; 24-10-16 at 09:34 PM. Reason: Typos

  12. #12
    I'm overrated. Fraysa is offline
    GammaRank
    Apr 2008 Join Date
    4,858Posts

    Re: New wz png format decode code

    Quote Originally Posted by Modify View Post
    Hi Fraysa :o



    This put a big smile on my face, but I just want to confirm a few things before I have another attempt at this curse again

    When I clone MapleLib, start up the MapleLib.csproj, then place the required code based off where the namespace "WzComparerR2.WzLib" is as a file called Wz_Png?

    -> I just realized I thought of something similar to what JellyIsHawt did
    WzComparerR2.WzLib is a different variation of MapleLib it appears, so you can't use this file with MapleLib.

    Anyways - I already did the work for you. Check the link in my previous post (hint: hidden under "profitzzzzzzzz!!!").

  13. #13
    Hardcore Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: New wz png format decode code

    I honestly feel bad about this, but I appreciate that a lot >~< (Didn't notice it was a link :o)

    What do you mean by a different variation? :o When comparing the the code above and WzPngProperty, it looks the exact same except what Elem8100 stated.

    Based on instinct, I placed the dll where my Harepacker is located and it crashes immediately similar to what happened when I tried to create the dll. Did I even use this correctly? *-*

    And can you explain briefly how you made the dll? I'm really curious about that :o

    (Sorry for all the questions)

    I'm using the Harepacker from here.

  14. #14
    I'm overrated. Fraysa is offline
    GammaRank
    Apr 2008 Join Date
    4,858Posts

    Re: New wz png format decode code

    Quote Originally Posted by Modify View Post
    I honestly feel bad about this, but I appreciate that a lot >~< (Didn't notice it was a link :o)

    What do you mean by a different variation? :o When comparing the the code above and WzPngProperty, it looks the exact same except what Elem8100 stated.

    Based on instinct, I placed the dll where my Harepacker is located and it crashes immediately similar to what happened when I tried to create the dll. Did I even use this correctly? *-*

    And can you explain briefly how you made the dll? I'm really curious about that :o

    (Sorry for all the questions)

    I'm using the Harepacker from here.
    I don't know what version of MapleStory WZ files you're trying to load, but I uploaded my HaSuite here.
    Works great for me.

  15. #15
    Hardcore Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: New wz png format decode code

    Quote Originally Posted by Fraysa View Post
    I don't know what version of MapleStory WZ files you're trying to load, but I uploaded my HaSuite here.
    Works great for me.
    I haven't even gotten to the point of loading WZ files unfortunately, just trying to run it crashes me :/

    I'll try out yours and uhh "give an update" if it works for me >~<


    EDIT: It worked perfectly thank you!

    If anyone else has been able to compile it successfully, can someone tell me how they did it? Trying to compile it for me gave me reference errors which preventing me from compiling at all. :o Thank you!
    Last edited by Modify; 24-10-16 at 11:32 PM.



Page 1 of 2 12 LastLast

Advertisement