Closed Tamk1s closed 4 years ago
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.
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:
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