Page 10 of 34
Re: Apply custom images to Ford Convers+
Posted: 22 Dec 2019, 21:32
by DGAlexandru
Hi all.
I found the sources for Convers Hacker this morning and all day I added some changes to it:
ConversHacker.jpg
Fixes:
Now it will find all the images, not only the ones that use the standard color palette (defined by the Theme).
Extras:
- You can choose to decode the found images using the internal color palette, if it's included in the file and at least one image has a reference to it - Still in development!!! (it will only save and use the color palette of the last image that it finds AND it only works if you load BIN file, not VBF file, as it needs to have correct file offsets)
- You can load an external file that contains a color palette to be used with all the found images.
Usage:
In order to use it, you have to extract the file in the same folder of IPC Updater - as it needs the same DLL resource files.
The archive is PassWord protected. I'll give the password only to those who contributed to this forum with real data, not only questions
In the archive is the ConversHacker.exe program, logo.bin - a simple image, logo_with_RGB.bin - same logo but with it's color palette embedded in the file and custom.rgb - the color palate for logo.bin as a separate file - all of this in order to understand how everything works.
Next Steps:
- Add the possibility to convert an image with custom color palette
- Maybe modify "Show image from offset" - Ursadon implemented this in a way that makes you do some math before knowing what offset to write here. It also works only for BIN files, not VBF files.
Ursadon, I hope you're OK with all of this.
If you want I can give you the sources for all of this.
Re: Apply custom images to Ford Convers+
Posted: 22 Dec 2019, 23:24
by Gwe89
This is what I get from mods with cm logos
Re: Apply custom images to Ford Convers+
Posted: 22 Dec 2019, 23:48
by Gwe89
Gwe89 wrote: ↑22 Dec 2019, 23:24
This is what I get from mods with cm logos
Forgot to remove the vbf header
15770585844235837986384787234844.jpg
This one is still not right tho
Re: Apply custom images to Ford Convers+
Posted: 23 Dec 2019, 08:58
by Gwe89
Gotta love this one but some reason it's in main m0tral normally puts them in flash but maybe as it was to test he put in main
Re: Apply custom images to Ford Convers+
Posted: 23 Dec 2019, 12:57
by hanssi
Good job DGAlexandru,
I miss function "custom resolution". Maybe this is a good suggestion for the next update
Re: Apply custom images to Ford Convers+
Posted: 23 Dec 2019, 14:03
by DGAlexandru
Why do you need a custom resolution?
The CPU of Convers+ is very low in power and everything has to be optimised. You don't want to use images that it has to resize.
Re: Apply custom images to Ford Convers+
Posted: 23 Dec 2019, 14:28
by tomy75
DGAlexandru
Custom resolution for any other pictures
Re: Apply custom images to Ford Convers+
Posted: 23 Dec 2019, 14:40
by DGAlexandru
I still don't understand
Custom resolution for Logo:
As explained before, the CPU needs to have this image at the same resolution as the display, as it can't and doesn't have any engine for image resize.
If you want to be able to add to ConversHacker an image of a different resolution and have CH do the resize for you, then this might be possible, but it's easier to do this with another image editor.. something as easy to use as IrfanView.
Custom resolution for Icons and other Images that are used by Convers:
This is way beyond the scope of this tool. You'll have to edit the entire external flash memory in order to modify them and then to modify the main flash in order to let it know the new offsets.
Re: Apply custom images to Ford Convers+
Posted: 23 Dec 2019, 17:35
by hanssi
DGAlexandru wrote: ↑23 Dec 2019, 14:03
Why do you need a custom resolution?
The CPU of Convers+ is very low in power and everything has to be optimised. You don't want to use images that it has to resize.
Maybe you misunderstood me. I don´t want to change the resolution of pictures. I want put to the C. Hacker another Picture than 400x198 pix. I want modify the structure and farbic of pictrures only.
For exapmle this :
Re: Apply custom images to Ford Convers+
Posted: 24 Dec 2019, 03:51
by DGAlexandru
New version
ConversHacker.jpg
- Added the possibility to load custom BGR (Blue Green Red) also for "Image Converter".
- Fixed Image Converter to work for more than one image converted, without the need to close it and open again.
- Fixed automated function of saving the found images when you open them and also added a button to have all of them saved (it will take a while, be patient! )
- Some other minor fixes; naming convention from RGB to BGR - just to keep remembering that Red and Blue are swapped in Convers+
- - WIP - Theme 1 FL is the same with Theme 1 M and 2 FL with 2 M.. for now, as I didn't have time to extract and convert them - but this is needed in order to be able to extract images or convert new images using the correct embedded themes.
Usage:
For Image Converter you have to select first the Theme you want to use and then load the image you want to convert; press "Encode" then "Make .BIN"
Take encoded BIN file in a hex editor and modify it's header to add starting offset address of custom BGR, modify also its ending to add offset address on where it will be placed in External / Internal Flash, add custom BGR to it, calculate Checksum, write it at the end, add VBF header and modify it according to the starting offset where you want to put this in main flash or external flash and space that it needs.
Write VBF with UC DS / IPC Update / other tool.
In order to have the logo taken into consideration you must have main Firmware with custom logo enabled. You either put this new logo at the same address of the old logo or you modify FW in order to load this logo from new offset.
Test OK:
Logo.jpg
Image is not shown OK on screen because I have FaceLift FW on PreFL Convers; also having a white background that was configured to be transparent makes the image not perfect... but the colors are there!
Example files in archive:
- PNG - file to be converted
- BGR - Custom theme for this PNG file
- PAL - Color palette for PNG in "JASC-PAL" format, with Red and Blue swapped (to have it in BGR format). From this file you can generate BGR file: remove first 3 lines, convert all Decimals to Hex , add leading 00 on each line, make sure that all the converted decimals are now in 2 byte format - add leading 0 for those who are not; remove CRLF from file; make sure all the values have only one space between them (all of this can be done in Notepad++); copy all values in HxD as HEX values and save file - it should be 0x400 in length (256 colors in palette, each with 4 values: 00, Blue, Green, Red)
- VBF - file that contains only the new logo and its custom BGR
- BIN - file to show you how external flash should look like after flashing VBF
I recommend to first resize the image to 400x192 then decrease the number of colors of the image to 256. Next swap bytes, save palette. --> I'm using IrfanView for this steps:
Swap Red with Blue.jpg
Export Palette.jpg
Same image, swapped Red with Blue - see the difference:
Diff in Palettes.jpg