FORUMS
Remove All Ads from XDA

[APP][11.11.09] CFC GUI - THE Manila/TF3D Image Editor

11,414 posts
Thanks Meter: 87,934
 
By Chainfire, Moderator Emeritus / Senior Recognized Developer - Where is my shirt? on 13th January 2009, 08:45 PM
Post Reply Email Thread
Update November 11, 2009
CFC and CFC GUI have been updated to 0.60 and 0.60.35 respectively. CFC runtime files have been updated.

Changes:
- Support for new filenames (and categories) used in TF3D v2.5+
- Support for new file formats (read only, "replace" write is always in old format) used in TF3D v2.5+
- Support for new compressed formats that correspond to the new formats mentioned above
- If you are using this with 2.5, please do read the 2.5 specific notes!
- At this time I STRONLY recommend patching Manila files manually instead of using the auto-patching! See the tech thread referenced below.

Update June 5, 2009
CFC and CFC GUI have been updated to 0.55 and 0.55.25 respectively. The CFC runtime files have not been updated.
Changes:

- Better compression ratio (backwards compatible with old runtime)
- UltraHQ en/de-coding support (CFC)
- "Patch Manila on device" function has been improved to work-around the issue of Manila no longer starting that some people have (CFC-GUI)

Update April 20, 2009
CFC GUI v0.50 has been released! LOTS of new features! Also updated CFC runtime (for on the device) to 0.50.

Deployment of CFC 0.50 is needed for UltraHQ background images. "Use Device->Patch Manila on device" to deploy new version to device. Note that CFC Live Patch has been discontinued in favor of this function.

Also, a patch to xboxmod's TF3Dv2-VGA is needed. Can be deployed to device with "TF3Dv2->Deploy xboxmod TF3Dv2-VGA background fix" option. The file in question is also attached to this post ( 2a3d01cc_manila ).

For chefs: see the tech reference thread for updated runtime files or use the "Tools->Patch Manila" function.

Update Feb 26, 2009
CFC and CFC GUI have been updated to 0.46.15. Fixed an issue with PNGs without alpha channel.

Update Jan 15, 2009
CFC Live Patch 0.45.01 has been released. You can run this tool on your phone to make your current Manila installation compatible with CFC compression.

See this post.

---

Really short
CFC GUI is a Manila3D image tool, somewhat like Manila Editor, but better on some fronts.

Related threads
Technical / reference thread
CFC command line version, full history / progress, complete technical documentation of all relevant file formats and how to en/decode them.

DONATE!
I do not need your donations to be able to buy my smokes, beers, pizza's, kebabs or phones - though they certainly help! However, nothing shows appreciation like a donation, and encourages people to continue developing and implementing feature requests. If you are a themer actively taking donations for your work, a donation would even be fair, instead of just nice.

Do not underestimate just how much time and research goes into many of the things posted on XDA. Donate something to someone (not necessarily me) or even XDA itself, don't be a cheapskate. (Yes I donate time, effort and funds myself to various projects, more than I get back!)

Things you should know
- RTFM. It will be a few posts down from here. Failure to RTFM will give you 7 years bad luck.
- The tool is called CFC and supports CFC compression, but you can also "not do" that. It's optional. Do note that not all ROMs and TF3D packages support CFC compression (yet).
- CFC GUI uses version notation of Z.XX.YY, where XX is the CFC-core version shared with the command line CFC program, and YY is the version of the GUI.

History
CFC is the tool I originally built to assist me with some things when I ported TF3D to QVGA. At first, I was severely annoyed with the size of TF3D, which lead me to implement extra lossless compression (as it turns out, Manila images compress very well). You will not be surprised to learn that CFC stands for "Chainfire's Compression" Unexpectedly, but not completely surprisingly, the compression actually made TF3D faster.

I was however not content with this, and thus wanted to scale images down to QVGA size. Not content with Manila Editor's image quality, I figured out how to do this with much better quality using an ATI tool: The Compressonator. This however required a lot of mucking with different texture formats and the conversions between those, which are all things that could be done with the CFC tool. A lot of things were figured out, and the complete reference can be found in the technical/reference counterpart of this thread.

Now, 3 months after all that, myself and D-MAN666 (one of the people originally behind Manila Editor) have finally figured out the complete QTC format, and I decided to create my own encoder/decoder. Both encoding and decoding quality easily beats Manila Editor, and rivals The Compressonator (but a lot less hassle!).

(< 0.60 : 12497 downloads)
Attached Files
File Type: zip 2a3d01cc_manila.zip - [Click for QR Code] (13.8 KB, 9877 views)
File Type: zip cfc-gui-only-0.60.35.zip - [Click for QR Code] (382.9 KB, 12459 views)
The Following 2 Users Say Thank You to Chainfire For This Useful Post: [ View ]
 
 
13th January 2009, 08:45 PM |#2  
Chainfire's Avatar
OP Moderator Emeritus / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 87,934
 
Donate to Me
More
TFM - The F*ing Manual, take 5 minutes to read it.
- Last updated for CFC GUI version 0.60.35 on 11.11.2009 -

Window features
The interface is rather simple, so I will not waste too may words on it.

On the left you have a list of the files in the directory you selected, including the resolution and four possible flags: Alpha channel, Padded, Compressed (CFC), RGBA-CFC and BPP (number).

On the top-right you have some boxes in various colors, which allow you to change the image background color, a checkbox that allows you to switch between actual size and 'fit-to-screen', and last but not least, the actual image.

Bottom-right you have some information about the image, and a few buttons. These buttons are also represented under the File menu and should speak for themselves for the most part.

The menu
Items in the File menu (or on the buttons) apply either to the program or the currently selected file.

Items in the Tools menu apply either to all listed files or a Manila package.

Items in the Device menu relate to doing things with Manila on your device.

Items in the TF3Dv2 menu are related only to the new Manila versions from Topaz and newer devices (though available on many older devices now too).

Must-know background info - Headers
If you come from Manila Editor, you might wonder why you never have to select any header info in CFC GUI. This is because the complete QTC image format is now known. The correct headers will be set automatically.

Must-know background info - Alpha channel
There are two different Manila image (QTC) formats, one that has an alpha channel and one that doesn't. Most images have an alpha channel, and those that don't are exactly those images Manila Editor chokes on.

Must-know background info - Padding
Original HTC Manila image files are all padded to make sure they are a multiple of 512 bytes in size. This is because read access is faster if the files are cooked in this way (it makes no difference if not cooked in).

Must-know background info - Compression
CFC GUI allows to use/compress/decompress CFC format compressed image files. These are smaller and usually faster than non-compressed files, however, they are not supported on all ROMs and TF3D packages (yet).

Must-know background info - RGBA
The new CFC 0.50 supports RGBA compressed images. This is very much comparable to PNG, but a different file-format to get Manila to read it and optimize loading the data into the graphics chip. You cannot convert between these and QTC using the "CFC Compress" options. This is by design! Currently the only function making use of this format is the TF3Dv2 background creator, but technically you could use it to create lossless PNG-style images for all Manila content.

Must-know background info - background images
These are generated in a special way to fix up various bugs in Manila background placement. You should not run any other background fixes aside from the xboxmod fix included - and that only if you are using TF3Dv2 on VGA!

Function: Replace with ...
Replace currently selected file with a PNG of your choice.

Function: Save as ...
Save currently selected file to a PNG of your choice.

Function: Pad
Make sure the selected file (or all files) are padded.

Function: Trim
Make sure the selectd file (or all files) are NOT padded.

Function: CFC Compress
Compress the selected file (or all files) to CFC format.

Function: CFC Decompress
Decompress the selected file (or all files) to normal QTC format.

Function: From device
Replaces the current image with the image with the same name from your device.

Function: To device
Saves the image to your device and restarts Manila if needed.

Function: Revert to ROM
Deletes the image from device and restarts Manila if needed - so the image from the ROM will be used. Do not use this function if you installed Manila via a CAB.

Function: Export
Exports all images to PNG format in the folder you select

Function: Fix file attributes
Makes sure all images have the Hidden/System/Archive attributes

Function: Finish up
Asks you a few questions and makes sure all images are optimized and ready. See "When you're done editing ..." below.

Function: Scale VGA -> QVGA
For people working on the QVGA ports. Scales down all images (that are not too small) by half.

Function: Patch Manila
Patches Manila to be able to use CFC compressed images. Also pads the files, sets attributes, and adds required DLLs to the folder. This option is mainly here for cooks. For users who want to make their current Manila on their phone CFC compression compatible, use the CFC Live Patch tool. For both options, see this post in the technical / reference thread. Do not use this function without having read that post! Only for VGA and WVGA Manila's, do NOT use it for QVGA Manila!

I STRONGLY ADVISE YOU TO PATCH MANILA MANUALLY AT THIS TIME. SEE THE TECH THREAD FOR HOW

Function: Device->Manila
Start, stop, or restart Manila on your device.

Function: Device->Import from device
Copies all Manila images on your device to the current working folder.

Function: Device->Export to device
Finds all changes compared to the Manila on your device, and sends these changes to your device. Will restart Manila if needed. (Files are not just copied because you would have two copies of unchanged files - one on internal storage and one in ROM!)

Function: Device->Revert to ROM
Reverts all images files on your device to ROM. Do not use with a CAB-installed Manila version! See Revert to ROM function above for more details.

Function: Device->List changes
Finds all changes compared to the Manila on your device.

Function: Device->Export changes as QTC/CFC
Finds all changes compared to the Manila on your device and saves them to a folder of your choice in the actual format used.

Function: Device->Export changes as PNG
Finds all changes compared to the Manila on your device and saves them to a folder of your choice, converted to PNGs.

Function: Device->Patch Manila on device
Deploys the included version of CFC to your device. Will restart Manila if needed.

I STRONGLY ADVISE YOU TO PATCH MANILA MANUALLY AT THIS TIME. SEE THE TECH THREAD FOR HOW

Function: TF3Dv2->Create background
Creates high quality backgrounds for TF3Dv2. Supported are both WVGA and VGA versions of TF3Dv2, and can create portrait as well as landscape files.

Function: TF3Dv2->Deploy xboxmod TF3Dv2-VGA background fix
Deploys fixed LUA for backgrounds on xboxmod's TF3Dv2-VGA. The patch was given to xboxmod before V1D release but he included the wrong version of the patch by accident.

Function: View->By file name / By Manila name
Switches file list view between file name and internal Manila name.

When you're done editing and going to use the images ...
For best performance and usage, you should always make sure when you're done that the files are all either compressed or uncompressed, padded or trimmed, and have the correct file attributes. You can do this manually through the buttons or the menu, but the "Finish up" function (Ctrl+F) does all this for you.

A note on PNG images
It seems not all PNG images are supported equally. If you are using Photoshop, it is known that "Save for web" option may create PNG files CFC GUI cannot read. Please use normal "Save as ..." to PNG!

How to make Manila compatible with CFC compression
The "Tools -> Patch Manila" option exists to patch a complete Manila package. If you want to patch the Manila currently on your device, use "Device -> Patch Manila on device".

Information about both can be found in this post in the technical / reference thread.

Manila/TF3D v2.5+ specific notes
- Due to how it is cooked into ROMs, you MUST patch manually at this time, or chances are everything will go wrong. You may need to dump the entire ROM for this.
- The new image formats can now be CFC compressed, but you do need the new 0.60 runtime files.
- The OEM packages spread the *_manila files over multiple folders. You will need to open and compress each folder seperately, CFC GUI does not support scanning sub-dirs at the moment.
- While CFC GUI can read and export to PNG all known (and new) formats, if you replace an image it will currently always be converted to ATI_RGB or ATI_RGB_EXPLICIT_ALPHA (auto-detected) formats. The new formats are not currently supported as target, only as source, so to speak.
The Following User Says Thank You to Chainfire For This Useful Post: [ View ]
13th January 2009, 08:46 PM |#3  
Chainfire's Avatar
OP Moderator Emeritus / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 87,934
 
Donate to Me
More
Changelogs
0.60.35, 11.11.2009
  • Support for new filenames (and categories) used in TF3D v2.5+
  • Support for new file formats (read only, "replace" write is always in old format) used in TF3D v2.5+
  • Support for new compressed formats that correspond to the new formats mentioned above
  • If you are using this with 2.5, please do read the 2.5 specific notes!
  • At this time I STRONLY recommend patching Manila files manually instead of using the auto-patching! See the tech thread referenced below.

0.55.25, 05.06.2009
  • Improved compression ratio (backwards compatible)
  • UltraHQ en/de-coding support in command line tool (see tech thread)
  • "Patch Manila on device" function has been fixed to prevent the non-starting Manila issue

0.50.22, 20.04.2009
  • TF3Dv2->Deploy xboxmod TF3Dv2-VGA background fix
  • Background images now support full RGBA mode (takes up lots of space!)
  • Redone list refresh - only the changes files are reloaded now when doing a simple operation - much faster
  • File list now allows multiple files to be selected to perform "File" and button-press actions on
  • Files can now be dragged from the file list to explorer to export as QTC
  • "Device drop box" added. You can drag files from the file list or from explorer to copy them to the device and restart Manila
  • TF3Dv2->Create background added
  • Manila is now only restarted if it was running before a device action was performed
  • Added display by original Manila filename (instead of hashes)
  • Added File->From device, reloads the current image from device
  • Added File->To device, exports the current image to device (restarts Manila)
  • Added File->Revert to ROM, reverts the current image to the ROM image on the device (only) (restarts Manila)
  • Added Tools->Import from PNGs, to import a folder full of PNGs
  • Added Device->Import from Device, imports all images from your Manila install on your device
  • Added Device->Export to Device, exports the images that are different than on your device to the device (restarts Manila)
  • Added Device->Revert to ROM, reverts all images on the device (only) to the ROM images (restarts Manila)
  • Added Device->List changes, compares your local set to the device set and lists changes
  • Added Device->Export changes to QTCs, copies the changes as ^^^ to a folder
  • Added Device->Export changes to PNGs, copies the changes converted to PNG as ^^^ to a folder
  • Added movable splitter between file list and image panel
  • Made file list auto-sizing

0.46.15, 26.02.2009
  • Fixed decoding issue with PNGs without alpha channel in CFC core

0.45.15, 14.01.2009
  • Added some more file attribute handling code
  • Added some file backup/restore in case of failure code
  • Adjusted screen layout to cope with different DPI settings
  • Added progress screen for directory scanning on first load
  • Added progress screen for encoding PNG -> QTC (Replace with ...)
  • Added "Tools -> Finish up" feature (see manual)
  • Added "Tools -> Export" feature (see manual)
  • Added "Tools -> Fix file attributes" feature (see manual)
  • Form caption now displays current working directory
  • You can now provide the directory you want to load as a commandline option
  • Settings are saved to and loaded from the registry, so it remember the current working directory and such.
The Following User Says Thank You to Chainfire For This Useful Post: [ View ]
13th January 2009, 08:47 PM |#4  
Chainfire's Avatar
OP Moderator Emeritus / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 87,934
 
Donate to Me
More
-- All mine! --
13th January 2009, 08:47 PM |#5  
Chainfire's Avatar
OP Moderator Emeritus / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 87,934
 
Donate to Me
More
-- Last one --
13th January 2009, 10:09 PM |#6  
Account currently disabled
Flag Miami, FL
Thanks Meter: 1
 
More
Thanks for this tool bro I really it
I appreciate it
13th January 2009, 10:51 PM |#7  
Sergio PC's Avatar
Senior Member
Flag Santiago
Thanks Meter: 6
 
More
Woooow very nice, (editing manila as I type)
Guess its time to change my good ol Manila editor

Thank you very much I appreciate.

Greets.
14th January 2009, 05:46 AM |#8  
tnyynt's Avatar
Retired Senior Moderator
Thanks Meter: 5
 
Donate to Me
More
S t u c k !
14th January 2009, 06:26 AM |#9  
Phat7's Avatar
Senior Member
Thanks Meter: 126
 
More
Thanks for the great application chainfire! Sorry to be the first with the questions, but I try to replace a png in a manila file, but the manila file disappears from the list on the left and the folder from where I opened it. Same when trying to save a png file. What am I doing wrong? I did rtfm.

Btw the buttons on the bottom right appear out of the bottom right border of the app window, i.e. they are almost not visible.

Thanks again!
14th January 2009, 06:31 AM |#10  
Chainfire's Avatar
OP Moderator Emeritus / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 87,934
 
Donate to Me
More
Quote:
Originally Posted by Phat7

Thanks for the great application chainfire! Sorry to be the first with the questions, but I try to replace a png in a manila file, but the manila file disappears from the list on the left and the folder from where I opened it. Same when trying to save a png file. What am I doing wrong? I did rtfm.

Btw the buttons on the bottom right appear out of the bottom right border of the app window, i.e. they are almost not visible.

Thanks again!

I'll look into the disappearing problem tomorrow (nap time now) - perhaps zip up and attach some files you know this happens with? May be an attribute issue or smth. The buttons falling out of the screen probably has to do with a non-default DPI setting on your system. TBH I didn't actually look at that. I'll check it out.

OS version?
14th January 2009, 07:53 AM |#11  
Phat7's Avatar
Senior Member
Thanks Meter: 126
 
More
Attached a manila file that the problem appears with. I have XP Pro SP2. Stock 2.03 Europe WWE on my Diamond. Will look into the dpi problem.

Thanks!
Attached Files
File Type: zip 4a087e41_manila.zip - [Click for QR Code] (12.5 KB, 136 views)
Post Reply Subscribe to Thread

Tags
cfc gui, editor, image, manila, tf3d

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes