GimConv: Difference between revisions
Line 361: | Line 361: | ||
The label names proposed here doesnt makes sense at this point, feel free to add more groups of settings with any label name following this same method, also add some info about how many images uses this format (if posible) | The label names proposed here doesnt makes sense at this point, feel free to add more groups of settings with any label name following this same method, also add some info about how many images uses this format (if posible) | ||
* | *Inside [[explore_plugin]]_full.rco from firmware 4.70 there are 245 images, 198 of them (included the new icon tex_psn.gim) has been made by using this 3 options: | ||
{{Boxcode|content=<syntaxhighlight lang="c"> | {{Boxcode|content=<syntaxhighlight lang="c"> | ||
option -ps3wiki1 { | option -ps3wiki1 { |
Revision as of 03:47, 6 March 2015
Description
GimConv v1.20h was released with p3tcompiler v2.00 as part of the PS3 Custom Theme Toolbox
It manages the GIM image conversions to use inside Resource Container (RCO) files, PlayStation 3 Theme (P3T) files, etc...
- Other notes:
- PSP Custom Theme Toolbox admits .GIM files as input, but doesnt includes a gim converter
- The option -viewer (start gimview.exe when process ends) in the config file points to an official gim viewer that doesnt exists in the public release
- Speculation about animated images support http://endlessparadigm.com/forum/showthread.php?tid=5054
Usage
The command line help of GimConv.exe displays a very limited list of options with an small explain, some are generic for the tool usage and others are loading another option from the config file (GimConv.cfg)
'''C:\PS3_Custom_Theme_v200\GimConv>GimConv.exe''' gimconv ver 1.20h --- generic picture converter Copyright (C) 2006 Sony Computer Entertainment Inc. All Rights Reserved. usage: gimconv <input files> [options] options: -interact input additional options -pictures merge files as pictures -frames merge files as frames -levels merge files as levels -prompt prompt always -warning prompt on warning -error prompt on error -viewer start gimview.exe when process ends -o <filename> specify output file name -s <w,h> resize image data -S output text format -P resize image data to a power of two -N output in normal pixel storage format -F output in faster pixel storage format -R re-convert ( don't swap RGBA <-> ABGR )
GimConv.exe
By specifying an option, or a group of options from command line by his labels (using the names that appears in the help screen, or using the names that appears inside the GimConv.cfg file)
'''gimconv.exe tex_psn.png -o tex_psn.gim --DXT'''
By specifying the options strictly from command line (using the names that appears inside the GimConv.cfg file) This is the most accurate way to specify options
'''gimconv.exe tex_psn.png -o tex_psn.gim --format_style psp --format_endian big --pixel_order normal'''
By passing GIM settings from rcomage.exe ---to---> gimconv.exe when 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
rcomage.exe ...
GimConv.cfg
In this file is where are listed all the options availables of the tool and his default values
This is the original configuration file not modifyed, for more info about the modifications made in the config file supplyed with rcomage see the differences in the Discussion page
Code Sample
Note there are some modifications made officially by sony because GimComv was initially made for PSP, but this public release of GimConv was used to build PS3 themes, so it has some settings specific for PS3 themes
This group at top on the config file are default settings (for PS3) that overrides other default settings (for PSP) specifyed before in the file (and it adds an "extend_edge" that seems to be new)
Code Sample
And this other group seems to be options for some specific gim formats used in PS3
Code Sample
Custom configurations
The configuration file allows to modify the help screen of the command line, and to add your own options that can be composed of groups of settings, there is no need at all to do this (because doesnt really enables any new funcionallity) but is good to keep a record of the most common used formats for a console, also because allows to use cutom names so is posible to label them with an intuitive name that defines his format
The config file supplyed by rcomage contains some custom options for the formats used in PSP, some default settings changed that was common for PSP (that doesnt really affects much to the usage for PS3), and it also had one group of options added for PS3 (labeled -ps3 at this time) but this group seems to use wrong options
This wiki section proposes some new groups with new label names (to be able to use a new modifyed config file without breaking the compatibility of other tools that uses rcomage as a dependency)
The label names proposed here doesnt makes sense at this point, feel free to add more groups of settings with any label name following this same method, also add some info about how many images uses this format (if posible)
- Inside explore_plugin_full.rco from firmware 4.70 there are 245 images, 198 of them (included the new icon tex_psn.gim) has been made by using this 3 options:
Code Sample
- Any other (this 2 options seems to be common for all ps3 4.70 rco's)
Code Sample
How to identify GIM settings
- To identify the settings that was used to build a GIM file:
- Use rcomagegui to make an extraction of the contents without conversion of images (this way the GIM are extracted as GIM)
- Use rcomagegui to make another extraction of the contents with conversion of images (this way the GIM are extracted as PNG)
- Use gimconv to convert a PNG ---to---> GIM by the old method of test-error by trying some of the options availables that appears in gimonv.cfg
- Use a hexeditor to compare the original GIM extracted in step 1 with the rebuilt GIM from your test, there is no need to make accurate comparisons, just an overview of the first 0x80 bytes of the header, and how the pixel data is ordered starting at offset 0x80
- When the header and pixel data seems similar make a hash comparison, original GIM and rebuild GIM should be exactly the same hash (is posible to create a GIM exactly like the original)
GIM formats used in PS3
Has been said here that PS3 uses at least 2 types of GIM images, both included inside rco's, and in some cases both types in the same rco
If an rco contains 2 or more images that was created with different gim settings... it means is not posible to compile this .rco with rcomage by using .png images as source (because rcomage.exe needs to pass some gim settings to gimconv.exe to make the png--->gim conversion and this settings are applyed to all png)
In other words, the only way to compile this rco's is in 2 steps, first is needed to make the different gim conversions with gimconv.exe (and all the other conversions in case exists vag audio or a vsmx script), and then is needed to compile the .rco with rcomage.exe by using the gims as source
Also means we have a big problem to document in wiki wich settings are used for each image (there are thousands of images so initially seems not posible), but probably they follows a rule, so the solution is to deduce or imagine the real reason of why the ps3 is using different gim formats inside the .rco's
image group or rco | gim settings | notes |
---|---|---|
explore_plugin_full.rco (and other explore_plugin_***.rco ?) | --format_style psp --format_endian big --pixel_order normal | candidate to "standard" gim format for main xmb images |
xmb_plugin_normal.rco (and other xmb_***.rco ?) | ? | uses some variant of dxt5 ? |
Speculation
Initially... it seems the gim format depends of who is the responsible of displaying them (as an example, in the link above it seems the images reported as "rare" belongs to "tex_indi_***" (are textures for the "indicator", is the information bar at top-right of xmb, are the tiny icons that appears eventually when you receive a message, etc..)
Note is posible to group them based in how his names starts, all "tex_indi" belongs to indicator so should share the same gim format, even if there are more "tex_indi" inside other rco's, doesnt matters in wich .rco are located what matters is his purpose is the same (to be displayed inside the indicator)
|