• Welcome to SC4 Devotion Forum Archives.

Batch Png to Fsh tool

Started by null45, June 05, 2009, 09:29:16 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Apple Delight

Archive attached.

null45

It looks like the duplicate and missing files may have caused by a bug in my code. &mmm

That is now fixed, file version updated to 1.5.1.5.

Indiana Joe

#102
Always crashes if I try to add more than 50 textures on Win 8.1

EDIT:  Re-installed and restarted, now it won't let me add even one texture and gives me this exception.

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

************** Exception Text **************
System.ArgumentOutOfRangeException: Index must be within the bounds of the List.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.Insert(Int32 index, T item)
   at PngtoFshBatchtxt.Form1.BuildAddList(Int32 startIndex) in C:\Dev_projects\sc4\PngtoFshBatchtxt\Form1.cs:line 1572
   at System.Windows.Forms.Control.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.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
PngtoFshBatch
    Assembly Version: 1.5.1.5
    Win32 Version: 1.5.1.5
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/PngtoFshBatch.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8008 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
FshDatIO
    Assembly Version: 1.3.0.1
    Win32 Version: 1.3.0.1
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/FshDatIO.DLL
----------------------------------------
Microsoft.WindowsAPICodePack.Shell
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/Microsoft.WindowsAPICodePack.Shell.DLL
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.7903 built by: Win9Rel
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.WindowsAPICodePack
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/Microsoft.WindowsAPICodePack.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.


null45

#103
Quote from: Indiana Joe on December 17, 2014, 06:40:29 PM
Always crashes if I try to add more than 50 textures on Win 8.1
Could you attach the images that cause this?

As far as the second crash is concerned, I know where the crash occurs but have no idea what might be causing it. :(

Indiana Joe

#104
Quote from: null45 on December 17, 2014, 09:24:25 PM
Quote from: Indiana Joe on December 17, 2014, 06:40:29 PM
Always crashes if I try to add more than 50 textures on Win 8.1
Could you attach the images that cause this?

As far as the second crash is concerned, I know where the crash occurs but have no idea what might be causing it. :(

Solved it; a couple of textures were missing a digit in their names.

null45

That crash is now fixed.
File version updated to 1.5.5.6.

Indiana Joe

Quote from: null45 on December 20, 2014, 02:21:38 AM
That crash is now fixed.
File version updated to 1.5.5.6.

I'll assume that instead of a crash you now get an error message about invalid ID's?

null45

Quote from: Indiana Joe on December 20, 2014, 01:13:41 PM
I'll assume that instead of a crash you now get an error message about invalid ID's?

It turns out that when fixing that crash I introduced a regression which broke the ID reading entirely.  &ops

That is now fixed and it will now give an error message in invalid IDs.
File version updated to 1.5.1.7.



Indiana Joe

Quote from: null45 on December 20, 2014, 05:04:04 PM
Quote from: Indiana Joe on December 20, 2014, 01:13:41 PM
I'll assume that instead of a crash you now get an error message about invalid ID's?

It turns out that when fixing that crash I introduced a regression which broke the ID reading entirely.  &ops

That is now fixed and it will now give an error message in invalid IDs.
File version updated to 1.5.1.7.

Fantastic thanks for all the hard work!

null45

Fixed a crash when the process button is clicked if there are no files in the list and a UI bug with the End format radio buttons.
Fixed a bug with the DBPF header having the wrong version and a potential file corruption issue with saving into an existing dat.
Improved the QFS compression, file version updated to 1.5.3.0;)

null45

Added a missing DLL, file version updated to 1.5.3.1.

mgb204

Thanks for your efforts, they really make working with textures a whole world simpler, these tools mean creators can spend their time making textures and not worrying about how to import/export and all that malarkey. It's great that you are still supporting them and releasing updates, I'm sure many mods have your work to thank for their existence.

nos.17

First off, love the tool! Insofar, its saved me quite a bit of time...even though I have only created around a dozen textures. However, I am now running into issues.

I have 11 .pngs (10 overlay with transparency and one base without transparency) that I wish to turn to textures. However, when adding them to a new or existing .dat, the program appears to not generate any mips at all; the new (or existing) .dat only contains the 128x128 versions of the textures. No exceptions appear. As I mentioned before, it worked for the first +/- 10 textures. On 64 bit Win 7 Enterprise. Tried fresh install, writing to new and existing .dats, adding only one texture at a time, etc.

Am I doing something wrong?  %confuso


Oh, and also, the drag/drop functionality does not seem to function for me. Not a big deal...I can just manually add the textures, but it may be worth looking into if you'd like.

Thanks so much.

mgb204

Underneath the window where your textures are listed is a drop down box. Make sure this has "Normal Mipmaps" selected, if it was changed it won't revert to the default when you close the application.

nos.17

Quote from: mgb204 on November 24, 2015, 07:01:45 PM
Underneath the window where your textures are listed is a drop down box. Make sure this has "Normal Mipmaps" selected, if it was changed it won't revert to the default when you close the application.

It is and has been selected, so that shouldn't be the problem...must be something else.

null45

Quote from: nos.17 on November 24, 2015, 09:24:58 PM
It is and has been selected, so that shouldn't be the problem...must be something else.

The texture instance id must end in 4, 9 or E in order for normal mipmaps to be generated.
The drag and drop bug has been fixed, file version updated to 1.5.3.2.

null45

Fixed a bug with PNG files always being detected as having transparency, file version updated to 1.5.4.0.

null45

Fixed a bug that would corrupt the DBPF compression directory when a dat contains existing files, file version updated to 1.5.5.0.

Akallan

Hello everyone,

I open the subject again because I downloaded the software but I have a problem. I want to create overlay textures for my future SNT mod, so when I drag my texture inside it (with the name ID code, for example: 0xF8DC4004).

I then create the texture, I open it with the Reader but the problem is that it is ultimately not an overley but a basic texture.

How should I proceed to create an overlay? I read the read-me, but there is nothing that speaks in depth about this subject.

Thank you in advance for your help.
Aka
My CJ :


My european road textures project : S N T - v.2.1

Andreas

My best guess: Your source file must have some transparent part, then it creates an overlay texture rather than a base texture. Use PNG as source format, as it supports transparency natively.
Andreas