Tamk1s / Thwimp

A dual-GUI/CLI utility which views, rips, and helps create THP video files for Mario Kart Wii. Can be modified for usage with other games
http://www.eaglesoftltd.com/retro/Nintendo-Wii/thwimp
GNU General Public License v3.0
6 stars 2 forks source link

Irfanview path bug #5

Closed Tamk1s closed 4 years ago

Tamk1s commented 4 years ago

If the Irfanview path contains spaces in it, THPConv conversion will fail. Probably due to forgetting to enclose some cmd prompt commands in Thwimp with "double quotes".

Bug tested and verified on battle_cup_retro.thp conversion in Hover Pack in MKWii_Tracks repo

Tamk1s commented 4 years ago

frame_001 bad_frame_001 error.txt

Paths seem to be fine; however, bug only occurs with a path with a space in it

Enclosed are copy of a badly created and good JPG, and error log when encoding the THP using the bad JPG images (created when Irfanview has a space in its path).

Doing a binary difference between the good and bad JPG files shows an $FFC2 word being used in the bad JPG file for the Start of Frame (SOF) JPG marker. This indicates progressive JPG. (See wikipedia article under Syntax and Structure table for SOF2 marker)

It appears THPConv cannot handle progressive JPG, which is the bug here.

Tamk1s commented 4 years ago

Bugfix to apply:

JPG Progessive option is not a standard Irfanview commandline switch nor an Advanced Batch option, but a JPG Plugin Option. Therefore, the only way to change it is by the i_view32.ini file located in %appdata%\Roaming\Irfanview when converting to jpg by cmdline. (See folder acquitision function)

This option looks like this in the INI file:

[JPEG] Load Grayscale=0 ExifRotate=1 Save Quality=85 Save Progressive=1

Fix method: