New wz png format decode code

Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Ultimate Member ByCreator is offline
    MemberRank
    Mar 2012 Join Date
    155Posts

    sad Re: New wz png format decode code

    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.
    Hey I used your link, and I try to open maple wz files v142.2 (also tried v62/v83 same errors)
    and getting this error

    Click image for larger version. 

Name:	11111.png 
Views:	24 
Size:	34.5 KB 
ID:	158694
    Spoiler:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.InvalidCastException: Unable to cast object of type 'MapleLib.WzLib.WzProperties.WzUOLProperty' to type 'MapleLib.WzLib.WzProperties.WzSoundProperty'.
    at HaCreator.Wz.WzFileManager.ExtractSoundFile()
    at HaCreator.GUI.Initialization.InitializeWzFiles(String wzPath, WzMapleVersion fileVersion)
    at HaCreator.GUI.Initialization.button1_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1076.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    HaCreator
    Assembly Version: 2.1.1.0
    Win32 Version:
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/HaCreator.exe
    ----------------------------------------
    PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1080.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
    ----------------------------------------
    WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1080.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
    ----------------------------------------
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1055.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1075.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    MonoGame.Framework
    Assembly Version: 3.4.0.456
    Win32 Version: 3.4.0.456
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/MonoGame.Framework.DLL
    ----------------------------------------
    MapleLib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/MapleLib.DLL
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1055.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    HaRepackerLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/HaRepackerLib.DLL
    ----------------------------------------
    NAudio
    Assembly Version: 1.7.3.0
    Win32 Version: 1.7.3.0
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/NAudio.DLL
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.


    and HaCreator are crushing


    and this is HaRepacker
    Click image for larger version. 

Name:	11111-2.png 
Views:	12 
Size:	34.8 KB 
ID:	158695
    Spoiler:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: InvalidArgument=Value of '3' is not valid for 'SelectedIndex'.
    Parameter name: SelectedIndex
    at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
    at HaRepacker.GUI.MainForm.MainForm_Load(Object sender, EventArgs e)
    at System.Windows.Forms.Form.OnLoad(EventArgs e)
    at System.Windows.Forms.Form.OnCreateControl()
    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    at System.Windows.Forms.Control.CreateControl()
    at System.Windows.Forms.Control.WmShowWindow(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.Form.WmShowWindow(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1076.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    HaRepacker
    Assembly Version: 4.2.4.0
    Win32 Version:
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/HaRepacker.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1055.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1075.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1055.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    HaRepackerLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/HaRepackerLib.DLL
    ----------------------------------------
    MapleLib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/MapleLib.DLL
    ----------------------------------------
    System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1055.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1067.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    WeifenLuo.WinFormsUI.Docking
    Assembly Version: 2.9.0.0
    Win32 Version: 2.9.0.0
    CodeBase: file:///D:/maplecoding/HaSuite/HaSuite/WeifenLuo.WinFormsUI.Docking.DLL
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    also Crashing

    I'm runnig them as Admin
    Last edited by ByCreator; 16-11-16 at 09:50 PM.

  2. #17
    Member newbane2 is offline
    MemberRank
    May 2015 Join Date
    26Posts

    Re: New wz png format decode code

    For some reason some images with the case 1 format show up transparent as well.

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

    Re: New wz png format decode code

    Newer KMS wz introduces a new PNG format--format 257(A1R5G5B5).The new NPCs with IDs starting with 257XXXX.img

    PHP Code:
    case 257
            {
              
    pngDecoded = new Bitmap(this.wthis.hPixelFormat.Format16bppArgb1555);
              
    bmpdata pngDecoded.LockBits(new Rectangle(Point.Empty, pngDecoded.Size), ImageLockMode.WriteOnlyPixelFormat.Format16bppArgb1555);
              
    CopyBmpDataWithStride(pixelpngDecoded.Width 2bmpdata);
              
    pngDecoded.UnlockBits(bmpdata);
              break;
            }
    ........
    ........
     public static 
    void CopyBmpDataWithStride(byte[] sourceint strideBitmapData bmpData)
            {
                if (
    bmpData.Stride == stride)
                {
                    
    Marshal.Copy(source0bmpData.Scan0source.Length);
                }
                else
                {
                    for (
    int y 0bmpData.Heighty++)
                    {
                        
    Marshal.Copy(sourcestride ybmpData.Scan0 bmpData.Stride ystride);
                    }
                }

            } 
    Last edited by Elem8100; 27-11-20 at 02:45 PM.

  4. #19
    Hardcore Member LastBattle is offline
    MemberRank
    Aug 2009 Join Date
    102Posts

    Re: New wz png format decode code

    Quote Originally Posted by Elem8100 View Post
    Newer KMS wz introduces a new PNG format--format 257(A1R5G5B5).The new NPCs with IDs starting with 257XXXX.img
    https://github.com/lastbattle/Harepa...ca454db8d4eed1

    thank you

  5. #20
    Member chbe8041 is offline
    MemberRank
    Jan 2013 Join Date
    koreaLocation
    77Posts

    Re: New wz png format decode code

    delete.
    Last edited by chbe8041; 13-12-20 at 05:58 PM.



Page 2 of 2 FirstFirst 12

Advertisement