Editing GimConv

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 296: Line 296:
The help screen of GimConv.exe displays a few options with an small explain about them, the example below belongs to the official GimConv.cfg with the options sony considered useful, this options are mostly useless for us, in short: interact doesnt allows to do special things, the merge modes are hardcore because are intended to create GIM files by some kind of artisan method where you create the GIM by using "pieces" from other files, the promt modes doesnt helps much, gimview.exe doesnt exists, the image resize methods should not be used (instead you should prepare your images with the correct size before converting them with GimConv.exe), the pixel formats normal/faster should not be used that way individually, and the options to swap rgba color channels are not needed for PS3
The help screen of GimConv.exe displays a few options with an small explain about them, the example below belongs to the official GimConv.cfg with the options sony considered useful, this options are mostly useless for us, in short: interact doesnt allows to do special things, the merge modes are hardcore because are intended to create GIM files by some kind of artisan method where you create the GIM by using "pieces" from other files, the promt modes doesnt helps much, gimview.exe doesnt exists, the image resize methods should not be used (instead you should prepare your images with the correct size before converting them with GimConv.exe), the pixel formats normal/faster should not be used that way individually, and the options to swap rgba color channels are not needed for PS3


{{Keyboard|content=<syntaxhighlight lang="bash">
{{Keyboard|content=C:\PS3_Custom_Theme_v200\GimConv>GimConv.exe
C:\PS3_Custom_Theme_v200\GimConv>GimConv.exe
gimconv ver 1.20h --- generic picture converter
gimconv ver 1.20h --- generic picture converter
  Copyright (C) 2006 Sony Computer Entertainment Inc.
  Copyright (C) 2006 Sony Computer Entertainment Inc.
Line 321: Line 320:
         -F              output in faster pixel storage format
         -F              output in faster pixel storage format
         -R              re-convert ( don't swap RGBA <-> ABGR )
         -R              re-convert ( don't swap RGBA <-> ABGR )
</syntaxhighlight>}}
}}


==Options==
==Options==
{{Boxtip1|content=To specify an option is needed to use '''a single dash''' with the name of the option.}}
{{Boxtip1|content=To specify an option is needed to use '''a single dash''' with the name of the option.}}
GimConv.exe allows to make a GIM-to-PNG conversion by specifying the file extension with the option '''-o''':
GimConv.exe allows to make a GIM-to-PNG conversion by specifying the file extension with the option '''-o''':
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe in.gim -o out.png</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe in.gim -o out.png}}


If you make a PNG-to-GIM conversion (or any of the supported input formats to GIM) without specifying any other option then are going to be loaded all the default settings of GimConv.cfg (from top to bottom) and this is not good because you dont have much control of the resulting GIM, most probably is going to generate a GIM file not compatible with PS3, at this point maybe you thought in creating a modifyed GimConv.cfg with all the default settings required by PS3 but this is not good enought either because there are (at least) 2 different GIM formats used in PS3 and you are going to break the compatbility with PSP, anyway here is the command as an usage example
If you make a PNG-to-GIM conversion (or any of the supported input formats to GIM) without specifying any other option then are going to be loaded all the default settings of GimConv.cfg (from top to bottom) and this is not good because you dont have much control of the resulting GIM, most probably is going to generate a GIM file not compatible with PS3, at this point maybe you thought in creating a modifyed GimConv.cfg with all the default settings required by PS3 but this is not good enought either because there are (at least) 2 different GIM formats used in PS3 and you are going to break the compatbility with PSP, anyway here is the command as an usage example
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe in.png -o out.gim</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe in.png -o out.gim}}


The interesting options are located at middle of GimConv.exe and contains several settings, this is an example of an option that is overriding the most critical settings (is a bit pointless thought, because the settings are given the value "default")
The interesting options are located at middle of GimConv.exe and contains several settings, this is an example of an option that is overriding the most critical settings (is a bit pointless thought, because the settings are given the value "default")
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe in.png -o out.gim -DXT</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe in.png -o out.gim -DXT}}
The option '''-DXT''' used in this example contains 3 settings that are going to be loaded after the default settings (this is an example of the official GimConv.cfg, the one used inside rcomage is different):
The option '''-DXT''' used in this example contains 3 settings that are going to be loaded after the default settings (this is an example of the official GimConv.cfg, the one used inside rcomage is different):
{{Boxcode|code=<syntaxhighlight lang="c">
{{Boxcode|code=<syntaxhighlight lang="c">
Line 343: Line 342:


Another example where can be seen better how the options contains settings that overrides the default settings:
Another example where can be seen better how the options contains settings that overrides the default settings:
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe in.gim -o out.gis -S</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe in.gim -o out.gis -S}}
*The option '''-S''' contains this settings:
*The option '''-S''' contains this settings:
{{Boxcode|code=<syntaxhighlight lang="c">
{{Boxcode|code=<syntaxhighlight lang="c">
Line 356: Line 355:
{{Boxtip1|content=To specify a setting is needed to use '''a double dash''' with the name of the setting.}}
{{Boxtip1|content=To specify a setting is needed to use '''a double dash''' with the name of the setting.}}
This is the most accurate way to have full controll of the GIM settings, if you are picky you can write a long line of settings to override all the critical default settings (just incase the GimConv.cfg was modifyed by someone, by doing this you are overriding his/her changes made to the default settings). If you are writing an script or any tool that sends actions to gimconv.exe you should use this method
This is the most accurate way to have full controll of the GIM settings, if you are picky you can write a long line of settings to override all the critical default settings (just incase the GimConv.cfg was modifyed by someone, by doing this you are overriding his/her changes made to the default settings). If you are writing an script or any tool that sends actions to gimconv.exe you should use this method
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe in.png -o out.gim --pixel_order normal --format_style psp --format_endian big</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe in.png -o out.gim --pixel_order normal --format_style psp --format_endian big}}
The 3 settings in the example are overriding the default settings at top of GimConv.cfg (this is an example of the official GimConv.cfg, the one used inside rcomage is different):
The 3 settings in the example are overriding the default settings at top of GimConv.cfg (this is an example of the official GimConv.cfg, the one used inside rcomage is different):
{{Boxcode|code=<syntaxhighlight lang="c">
{{Boxcode|code=<syntaxhighlight lang="c">
Line 370: Line 369:
{{Boxtip1|content=Reminder: options are passed with '''a single dash''' and settings with a '''double dash'''}}
{{Boxtip1|content=Reminder: options are passed with '''a single dash''' and settings with a '''double dash'''}}
This is the official way, the predefined options of the official GimConv.cfg are intended to be used together with other options, this way you can have an option containing a group of settings (that are common for a console) and several other options for the different GIM formats supported in that console, using GimConv.exe this way is a bit more confusing though and makes harder to pass commands to it, but is very handy to make tests
This is the official way, the predefined options of the official GimConv.cfg are intended to be used together with other options, this way you can have an option containing a group of settings (that are common for a console) and several other options for the different GIM formats supported in that console, using GimConv.exe this way is a bit more confusing though and makes harder to pass commands to it, but is very handy to make tests
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe in.png -o out.gim -DXT --pixel_channel brag</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe in.png -o out.gim -DXT --pixel_channel brag}}
The command in the example is loading the option '''-DXT''' like in the example above, but additionally is overriding one of the settings inside '''-DXT''' with the '''--pixel_channel brag''' to reorder the color channels (from left to right, BLUE, RED, ALPHA, GREEN), the resulting GIM is going to be like the one made in the example above, the only difference is the location of the pixel colors
The command in the example is loading the option '''-DXT''' like in the example above, but additionally is overriding one of the settings inside '''-DXT''' with the '''--pixel_channel brag''' to reorder the color channels (from left to right, BLUE, RED, ALPHA, GREEN), the resulting GIM is going to be like the one made in the example above, the only difference is the location of the pixel colors


It allows to cummulate many options and settings <abbr title="the rule to remember is... the last setting overrides the previous ones with the same name">in any order</abbr> (be careful this could create some problems) to do something like this:
It allows to cummulate many options and settings <abbr title="the rule to remember is... the last setting overrides the previous ones with the same name">in any order</abbr> (be careful this could create some problems) to do something like this:
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe in.png -o out.gis -DXT --pixel_channel brag -S</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe in.png -o out.gis -DXT --pixel_channel brag -S}}


==From rcomage==
==From rcomage==
{{Boxwarning1|content='''Dont use this method for PS3'''. GIM files from PS3 firmware uses (at least) 2 different GIM formats, rcomage applyes the same settings for all the GIM files so some are broken}}
{{Boxwarning1|content='''Dont use this method for PS3'''. GIM files from PS3 firmware uses (at least) 2 different GIM formats, rcomage applyes the same settings for all the GIM files so some are broken}}
This ones are rcomage commands that includes gimconv commands in between quotes, are optional and are intended to change the default GIM settings used by rcomage when doing the PNG-to-GIM conversions. Rcomage.exe sends the GIM settings to gimconv.exe when is compiling the RCO (see the "compile" help in [[rcomage]] page). There are 2 options in rcomage specific for this task, named: '''--gimconv-cmd''' and '''--gimconv-flags'''
This ones are rcomage commands that includes gimconv commands in between quotes, are optional and are intended to change the default GIM settings used by rcomage when doing the PNG-to-GIM conversions. Rcomage.exe sends the GIM settings to gimconv.exe when is compiling the RCO (see the "compile" help in [[rcomage]] page). There are 2 options in rcomage specific for this task, named: '''--gimconv-cmd''' and '''--gimconv-flags'''
{{Keyboard|content=<syntaxhighlight lang="bash">rcomage.exe compile in.xml out.rco --gimconv-cmd ".\gimconv\gimconv.exe" --gimconv-flags "--pixel_order normal --format_style psp --format_endian big"</syntaxhighlight>}}
{{Keyboard|content=rcomage.exe compile in.xml out.rco --gimconv-cmd ".\gimconv\gimconv.exe" --gimconv-flags "--pixel_order normal --format_style psp --format_endian big"}}


As mentioned [http://endlessparadigm.com/forum/showthread.php?tid=19501&pid=350611#pid350611 here] inside RCO files from PS3 official firmwares there are (at least) 2 types of GIM formats, and usually both are used inside the same RCO, as example... an RCO with a total of 14 GIM files where 12 of them was made using some GIM settings, and the other 2 with different GIM settings, for this reason is needed to identify the GIM settings and rebuild every GIM file individually
As mentioned [http://endlessparadigm.com/forum/showthread.php?tid=19501&pid=350611#pid350611 here] inside RCO files from PS3 official firmwares there are (at least) 2 types of GIM formats, and usually both are used inside the same RCO, as example... an RCO with a total of 14 GIM files where 12 of them was made using some GIM settings, and the other 2 with different GIM settings, for this reason is needed to identify the GIM settings and rebuild every GIM file individually
Line 444: Line 443:


'''1st most common'''
'''1st most common'''
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe original.gim -o try1.gim -ps3rgba8888</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe original.gim -o try1.gim -ps3rgba8888}}
'''2nd most common''' (this is a variant of the previous with <abbr title="the block contains info related with the GIM creation and a version usually 'GimConv 1.20e' in retail PS3 firmwares, when you run this command the original block data is preserved but the version is updated">a block added at the end of the file</abbr>)
'''2nd most common''' (this is a variant of the previous with <abbr title="the block contains info related with the GIM creation and a version usually 'GimConv 1.20e' in retail PS3 firmwares, when you run this command the original block data is preserved but the version is updated">a block added at the end of the file</abbr>)
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe original.gim -o try2.gim -ps3rgba8888 --update_fileinfo on</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe original.gim -o try2.gim -ps3rgba8888 --update_fileinfo on}}
'''3rd most common'''
'''3rd most common'''
{{Keyboard|content=<syntaxhighlight lang="bash">gimconv.exe original.gim -o try3.gim -dxt5</syntaxhighlight>}}
{{Keyboard|content=gimconv.exe original.gim -o try3.gim -dxt5}}


After every GIM-to-GIM conversion is needed to compare the hashes, first "original.gim VS try1.gim", then "original.gim VS try2.gim", then "original.gim VS try3.gim"
After every GIM-to-GIM conversion is needed to compare the hashes, first "original.gim VS try1.gim", then "original.gim VS try2.gim", then "original.gim VS try3.gim"
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)