Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #136  
Old 09-05-2024, 19:45
brispuss brispuss is offline
Registered User
 
Join Date: Nov 2019
Location: Petone
Posts: 47
Thanks: 11
Thanked 2 Times in 2 Posts
brispuss is on a distinguished road
Trying to precompress a png image using xtool (2020 version) using the command -

Code:
xtool precomp -mpng+preflate -d1 Hint.png hint_png_preflate
and trying -

Code:
xtool precomp -mpng+reflate -d1 Hint.png hint_png_reflate
In both cases the outputs were only slightly larger than the original!?

For preflate option, 3642461 bytes to 3642579 bytes

and for reflate option, 3642461 bytes to 3642578 bytes.

Why only a slight increase in file sizes? Is there something I'm missing in the commands?

png image here

Last edited by brispuss; 09-05-2024 at 19:50.
Reply With Quote
Sponsored Links
  #137  
Old 10-05-2024, 07:42
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,270
Thanks: 1,071
Thanked 6,847 Times in 2,582 Posts
KaktoR is on a distinguished road
You do something wrong for sure.

Code:
Streams: 2 / 2
Time: 00:00:01 (CPU 00:00:00)

Size: 3.47 MB >> 12.7 MB

Done!!!
__________________
Haters gonna hate
Reply With Quote
  #138  
Old 10-05-2024, 09:32
brispuss brispuss is offline
Registered User
 
Join Date: Nov 2019
Location: Petone
Posts: 47
Thanks: 11
Thanked 2 Times in 2 Posts
brispuss is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
You do something wrong for sure.

Code:
Streams: 2 / 2
Time: 00:00:01 (CPU 00:00:00)

Size: 3.47 MB >> 12.7 MB

Done!!!
Thanks. But what is the correct commands to expand the png file using xtool (2020)?

Note that this is a manual input via command line and not part of a script (yet).
Reply With Quote
  #139  
Old 11-05-2024, 04:26
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,135
Thanks: 284
Thanked 1,311 Times in 597 Posts
Masquerade is on a distinguished road
Your command line looks all correct.
Reply With Quote
  #140  
Old 11-05-2024, 04:35
brispuss brispuss is offline
Registered User
 
Join Date: Nov 2019
Location: Petone
Posts: 47
Thanks: 11
Thanked 2 Times in 2 Posts
brispuss is on a distinguished road
Thanks for the verification of my command line command syntax.

However, how does Kaktor get a larger file output, whereas my outputs are only slightly larger than the original file?

Kaktor using different version of xtool? Using different settings/options?

Can someone please explain?

Thank you.
Reply With Quote
  #141  
Old 11-05-2024, 07:35
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,270
Thanks: 1,071
Thanked 6,847 Times in 2,582 Posts
KaktoR is on a distinguished road
Here is what I use

Code:
xtool:reflate:png:d1

Compressed 1 file, 3,642,461 => 13,362,043 bytes. Ratio 366.84%
Compression time: cpu 0.00 sec/real 1.24 sec = 0%. Speed 2.94 mB/s
All OK
__________________
Haters gonna hate
Reply With Quote
  #142  
Old 11-05-2024, 09:35
brispuss brispuss is offline
Registered User
 
Join Date: Nov 2019
Location: Petone
Posts: 47
Thanks: 11
Thanked 2 Times in 2 Posts
brispuss is on a distinguished road
Thanks for the details, but maybe I'm still doing something wrong?

I'm using xtool version 0.8.7.

My manual translation of your script format command and options for manual input within an elevated command box were now -

Code:
xtool precomp -mreflate+png -d1 Hint.png hint_png.xtool
Again, to be clear, I'm inputting the commands and options directly/manually within a command box and executing the commands immediately by pressing the enter key. I am not running a script, and I'm not creating/adding anything to a (*.ini or *.bat) script at this time either.

Unfortunately I'm still getting hardly any improvement in output file size.

Input 3,642,461 bytes, output 3,642,578 bytes.

So how is it possible to get output of 13,362,043 bytes?
Reply With Quote
  #143  
Old 11-05-2024, 11:37
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,135
Thanks: 284
Thanked 1,311 Times in 597 Posts
Masquerade is on a distinguished road
No idea, I use command line too and it works fine for me:

Code:
xtool precomp -mpng+preflate -d1 Hint.png Hint.png.xtool
XTool is created by Razor12911

Version 0.8.7

Streams: 2 / 2
Time: 00:00:01 (CPU 00:00:00)

Size: 3.47 MB >> 12.3 MB
I have attached my working files below + a bat file if you want to have a go:
https://www.upload.ee/files/16621022/Test.7z.html
Reply With Quote
  #144  
Old 11-05-2024, 12:00
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,270
Thanks: 1,071
Thanked 6,847 Times in 2,582 Posts
KaktoR is on a distinguished road
I tried but I cannot make it to work with normal cmd too. Only dsg is working lol. I will look tomorrow. Most likely I just made something wrong.
__________________
Haters gonna hate
Reply With Quote
  #145  
Old 11-05-2024, 15:49
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,135
Thanks: 284
Thanked 1,311 Times in 597 Posts
Masquerade is on a distinguished road
I have xtool.exe in my PATH so I can use it from any command line window. Maybe that affects something.
Reply With Quote
  #146  
Old 12-05-2024, 02:39
brispuss brispuss is offline
Registered User
 
Join Date: Nov 2019
Location: Petone
Posts: 47
Thanks: 11
Thanked 2 Times in 2 Posts
brispuss is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
No idea, I use command line too and it works fine for me:

Code:
xtool precomp -mpng+preflate -d1 Hint.png Hint.png.xtool
XTool is created by Razor12911

Version 0.8.7

Streams: 2 / 2
Time: 00:00:01 (CPU 00:00:00)

Size: 3.47 MB >> 12.3 MB
I have attached my working files below + a bat file if you want to have a go:
https://www.upload.ee/files/16621022/Test.7z.html
Thanks for this!

I downloaded and installed your copy of xtool.exe and preflate_dll.dll to a temporary directory for testing (D:\test).

My original xtool.exe and associated files are located within the C:\xtool directory.

PATH to the original installation of xtool (C:\xtool) was added to the Environment Variables.

PATH to D:\xtool was NOT done to avoid conflict between my original version of xtool and this downloaded version of xtool.

I compared both xtool.exe and preflate_dll.dll files from my original installation (C:\xtool) to the same files within the test directory (D:\test). Both files match precisely.

I ran a manual command line test (xtool precomp -mpng+preflate -d1 Hint.png Hint.png.xtool) for the test directory version of xtool, and it successfully expanded the Hint.png file to Hint.png.xtool to 12,858,367 bytes!

I then ran another manual command line test for xtool.exe in the D:\test directory. Followed by a manual command line test for xtool.exe in the C:\xtool directory. Outputs from this test was different. Refer to enclosed screenshots for details.

This is the contents of the temporary test directory D:\test

test contents

This is the contents of the original installation directory C:\xtool

installation contents

This is the result of xtool.exe test from the temporary test directory D:\test

xtool test from test directory

This is the result of xtool.exe test from the original installation directory C:\xtool

xtool test from installation directory

Tried to attach screenshots directly, but result was very messy layout! So had to upload screenshots to image server instead (sorry).

The results for the xtool.exe tests are different as can be seen in the screenshots. So despite the two xtool executables (xtool.exe) being exactly the same, their outputs do not match!?

It should be noted that the preflate_dll.dll file for the original installation is located within the _libraries sub folder of C:\xtool ie located here - C:\xtool\_libraries.

Further comments, please?
Reply With Quote
  #147  
Old 12-05-2024, 03:04
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,270
Thanks: 1,071
Thanked 6,847 Times in 2,582 Posts
KaktoR is on a distinguished road
Quote:
Originally Posted by brispuss View Post
It should be noted that the preflate_dll.dll file for the original installation is located within the _libraries sub folder of C:\xtool ie located here - C:\xtool\_libraries.

Further comments, please?
Do you have set the xtool option for custom path in arc.ini? I don't think you can set this option directly from command line.
__________________
Haters gonna hate
Reply With Quote
  #148  
Old 12-05-2024, 04:39
brispuss brispuss is offline
Registered User
 
Join Date: Nov 2019
Location: Petone
Posts: 47
Thanks: 11
Thanked 2 Times in 2 Posts
brispuss is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Do you have set the xtool option for custom path in arc.ini? I don't think you can set this option directly from command line.
If you are referring to the arc.ini file located in Freearc here - C:\Program Files (x86)\FreeArc\bin , then no I haven't changed anything in arc.ini.

In any case, I rarely use Freearc or Arc at the moment.

How does changing the arc.ini content help with running xtool properly from the command line?
Reply With Quote
  #149  
Old 13-05-2024, 01:04
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,135
Thanks: 284
Thanked 1,311 Times in 597 Posts
Masquerade is on a distinguished road
@brispuss
Ah, there's your issue.

XTool is inherently a command line tool, Razor made xtoolui.dll for quick testing.

So, in your C:\XTool folder, you will see the ui load because xtoolui.dll is present. This dll is not a dependency to xtool.exe so you can move/delete it and then xtool.exe will function only in console mode.

Furthermore, you need the library for precompression to be in the same folder as xtool.exe in order for precompression to work. XTool won't read/search the _libraries folder for compression libraries.

So, by having xtool.exe and preflate_dll.dll in a single folder, you will have working precompression. Same goes for zlibwapi.dll for zlib, hif2raw_dll.dll+raw2hif_dll.dll for reflate, libzstd.dll, liblz4.dll etc..... all need to be in the same folder as xtool.exe for those codecs to work.
Reply With Quote
The Following User Says Thank You to Masquerade For This Useful Post:
brispuss (13-05-2024)
  #150  
Old 13-05-2024, 04:28
brispuss brispuss is offline
Registered User
 
Join Date: Nov 2019
Location: Petone
Posts: 47
Thanks: 11
Thanked 2 Times in 2 Posts
brispuss is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
@brispuss
Ah, there's your issue.

XTool is inherently a command line tool, Razor made xtoolui.dll for quick testing.

So, in your C:\XTool folder, you will see the ui load because xtoolui.dll is present. This dll is not a dependency to xtool.exe so you can move/delete it and then xtool.exe will function only in console mode.

Furthermore, you need the library for precompression to be in the same folder as xtool.exe in order for precompression to work. XTool won't read/search the _libraries folder for compression libraries.

So, by having xtool.exe and preflate_dll.dll in a single folder, you will have working precompression. Same goes for zlibwapi.dll for zlib, hif2raw_dll.dll+raw2hif_dll.dll for reflate, libzstd.dll, liblz4.dll etc..... all need to be in the same folder as xtool.exe for those codecs to work.
Thank you very much!!

I was coming to the same or at least very similar conclusions as you have after carrying out more tests. I was about to post my findings and comments something similar to yours, but you bet me to it!!

I have deleted the GUI files xtoolui.dll and xtoolui.ini. Moved all the codecs from the _libraries sub folder to the main folder with xtool.exe (C:\xtool\).

So, for now, xtool seems to be working as expected. I just have to be extra careful about inputting the correct parameters for xtool to function properly!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question bigorangekitty PS2 Games 5 15-05-2002 16:51
Total newbie...dumb question...patience please! xxxMikexxx PC Games 1 02-04-2002 23:19
newbie question troi22 PS2 Games 1 28-02-2002 03:18
newbie PAL patch question for Pro Evolution Purple Cowboy PS2 Games 2 19-02-2002 12:39
Newbie question...how do I know if the game I've downloaded is Autoboot or not? konichiwa DC Games 1 23-11-2000 20:35



All times are GMT -7. The time now is 17:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com