PS3 [Research] Modifying the Gaia Visualization (custom_render_plugin/earth.qrc)

I call this MONO-BOOB! Imagine you are lost in space for years....then out of the blackness appears:

boob1.jpg

boob2.jpg

boob3.jpg
Dont let anyone ever say I dont do important things for the PS3 scene :-p

Even though its just one boob, it actually has 2 nipples, but due to the laws of physics you can never see both at the same time. :D

I actually dont know how it turned out so round..I even used the flatten option :D

upload_2020-1-27_16-57-55.png
 

Attachments

Last edited:
I injected your cubemap sandungas. Not sure if its useful, but its so easy to do now I thought why not. All I had to do was rotate it, resize it to 4096x3072. :)

Also see the video, I only just noticed, if you pause the then keep hitting R1, it cycles through all available presets. :)

preview4.jpg


preview1.jpg preview2.jpg preview3.jpg

 

Attachments

Im not sure if there is some way to use it in command line though, but the .dll can be included in your program @pink1 compiled as static, right ?
In the zlib web they have source code and zlib versions compiled in all colors and flavours
I'm using the dotnet version of zlib it's about the same thing and it's easier to use with c#.

Getting really close on the replacing files and rebuilding the qrc. I need to get it reading the new info into the list and we can start the testing If everything goes well with that we'll start working on building from a folder and adding the image tools.

As soon as we know if we can get the replacing working we'll let everyone know.
 
I'm using the dotnet version of zlib it's about the same thing and it's easier to use with c#.

Getting really close on the replacing files and rebuilding the qrc. I need to get it reading the new info into the list and we can start the testing If everything goes well with that we'll start working on building from a folder and adding the image tools.

As soon as we know if we can get the replacing working we'll let everyone know.
Awesome sauce man, I'm excited!! The .bats do the job for now but it will be great to see what you end up with!!
 
I am still playing around with the batch files. I never knew how easy it was. :)
 

Attachments

  • upload_2020-1-28_3-31-8.png
    upload_2020-1-28_3-31-8.png
    38.5 KB · Views: 329
  • upload_2020-1-28_3-31-55.png
    upload_2020-1-28_3-31-55.png
    39.3 KB · Views: 336
  • upload_2020-1-28_3-34-26.png
    upload_2020-1-28_3-34-26.png
    35.9 KB · Views: 108
  • upload_2020-1-28_3-37-27.png
    upload_2020-1-28_3-37-27.png
    43.9 KB · Views: 90
Last edited:
Here is my latest bat, QRC injector BAT v1.2

Up over 600 lines already :)

Code:
cls
@echo off
echo                         +----------------------+
echo                               QRC Injector
echo                                   v1.2
echo                           Created at PSX-Place
echo                         +----------------------+
echo.
echo                                  USAGE:
echo            Place the correctly named+sized jpeg next to this bat   
echo.         
echo                           JPG REQUIREMENTS:
echo.  If using tile.jpg it must be 512x512 (Seamless texture recommended)
echo   If using face.jpg it must be 1024x1024 (Seamless texture recommended)
echo   If using cubemap.jpg it must be 4096x3072 (Proper cubemap recommended)
echo   If using logo.jpg and fill.jpg they must be 1024x1024 (Avoid using corners)
echo   If using 0.jpg to 5.jpg they must be 1024x1024 (individual cubemap faces)
echo   If using banner.jpg it must be 4096x512 and fill.jpg must be 1024x1024
echo.
echo +------------------------------------------------------------------------------+
echo   Warning: The temp folder and and the last created earth.qrc will be cleared
echo                  when you chose an option from 1 to 9
echo +------------------------------------------------------------------------------+
echo.                       
@pause
:options
echo.
echo.
echo +------------------------------------------------------------------------------+
echo                            QRC Injector v1.2
echo.
echo                               OPTIONS MENU
echo.
echo +------------------------------------------------------------------------------+
echo                       SELECT AN OPTION FROM 1 to 9
echo +------------------------------------------------------------------------------+
echo 1) Apply tile.jpg to every one of the 24 slots
echo 2) Apply face.jpg to every one of the 6 "cube" faces
echo 3) Apply cubemap.jpg all the way around the "cube"
echo 4) Apply logo.jpg to only 2 opposite faces on the equator, fill.jpg the rest
echo 5) Apply logo.jpg to 4 faces around the equator, fill.jpg north+south
echo 6) Apply individual 0.jpg to 5.jpg to the 6 faces
echo 7) Apply banner.jpg all around the equator like a belt
echo 8) Clone tile.jpg into tiled 4096x2048 jpeg ready for cubemap generator
echo 9) Clone tile.jpg into tiled 8192x4096 jpeg ready for cubemap generator
echo.
echo.
echo.
echo.
set /p op=Type option:
if "%op%"=="1" goto tile_to_qrc_info
if "%op%"=="2" goto face_to_qrc_info
if "%op%"=="3" goto cubemap_to_qrc_info
if "%op%"=="4" goto logo1_info
if "%op%"=="5" goto logo2_info
if "%op%"=="6" goto 6_sides_info
if "%op%"=="7" goto banner_info
if "%op%"=="8" goto create_4k_from_512x512_info
if "%op%"=="9" goto create_8k_from_512x512_info
:tile_to_qrc_info
echo.
echo You chose to inject tile.jpg (512x512) to earth.qrc
echo The jpg will be applied to every one of the 24 slots in the cloud layer
if not exist tile.jpg goto file_not_found_tile
echo Working....
goto tile_to_qrc
:face_to_qrc_info
echo.
echo You chose to inject face.jpg (1024x1024) to earth.qrc
echo The jpg will be applied to every one of the 6 cube faces in the cloud layer
if not exist face.jpg goto file_not_found_face
echo Working....
goto face_to_qrc
:cubemap_to_qrc_info
echo.
echo You chose to inject cubemap.jpg (4096x3072) to earth.qrc
echo The jpg will be applied all around the cube in the cloud layer.
if not exist cubemap.jpg goto file_not_found_cubemap
echo Working....
goto cubemap_to_qrc
:logo1_info
echo.
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied front + back faces, fill.jpg on sides + top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo_to_qrc
:logo2_info
echo.
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied to front + back + side faces, fill.jpg to top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo2_to_qrc
:banner_info
echo.
echo You chose to inject banner.jpg (4096x512) to earth.qrc
echo The banner.jpg will be applied all around the equator lke a belt
if not exist banner.jpg goto file_not_found_banner
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto banner_to_qrc
:6_sides_info
echo.
echo You chose to inject 6 individual sides 0.jpg to 5.jpg (1024x1024) to earth.qrc
echo These will be applied to every face using official numbering of the faces
if not exist 0.jpg goto file_not_found_0
if not exist 1.jpg goto file_not_found_1
if not exist 2.jpg goto file_not_found_2
if not exist 3.jpg goto file_not_found_3
if not exist 4.jpg goto file_not_found_4
if not exist 5.jpg goto file_not_found_5
echo Working....
goto 6_sides_to_qrc
:create_4k_from_512x512_info
echo.
echo You chose to clone tile.jpg (512x512) into a 4096x2048 jpg
echo The tile.jpg will be prepared into 4k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_4k_from_512x512
:create_8k_from_512x512_info
echo.
echo You chose to clone tile.jpg (512x512) into a 8192x4096 jpg.
echo The tile.jpg will be prepared into 8k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_8k_from_512x512
:create_4k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile 4096x2048.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo.
bin\jpegtran -drop +2048+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 1 of 4 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo.
bin\jpegtran -drop +2048+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 2 of 4 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 3 of 4 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 4 of 4 completed successfully
echo .
if exist 4096x2048.jpg echo PROCESS COMPLETED
if not exist 4096x2048.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:create_8k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile temp.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile temp.jpg temp.jpg
echo Step 1 of 8 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile temp.jpg temp.jpg
echo Step 2 of 8 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile temp.jpg temp.jpg
echo Step 3 of 8 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile temp.jpg temp.jpg
echo Step 4 of 8 completed successfully
bin\jpegtran -crop 8192x4096+0+0 -outfile 8192x4096.jpg temp.jpg
echo .
echo Step 5 of 8 completed successfully
bin\jpegtran -drop +4096+0 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 6 of 8 completed successfully
bin\jpegtran -drop +0+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 7 of 8 completed successfully
bin\jpegtran -drop +4096+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 8 of 8 completed successfully
DEL "temp.jpg" /Q /S
echo .
if exist 8192x4096.jpg echo PROCESS COMPLETED
if not exist 8192x4096.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:tile_to_qrc
echo .
@if exist earth.qrc DEL "earth.qrc" /Q /S
echo earth.qrc cleared
@if exist "bin\temp\" DEL "bin\temp" /Q /S
echo .
@if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
echo .
@if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
echo .
bin\jpegtran -drop +512+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -drop +0+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg bin\temp\face.jpg
echo Completed: tile cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -drop +1024+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: face cloned into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:face_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg face.jpg
echo .
bin\jpegtran -drop +1024+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: face cloned into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:cubemap_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
echo .
bin\jpegtran -rotate 180 "cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:logo_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:logo2_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and logo.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:6_sides_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg 4.jpg
echo .
bin\jpegtran -drop +3072+1024 0.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 1.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+1024 2.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 3.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 5.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: 0.jpg to 5.jpg made into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:banner_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1280 banner.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: banner.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:optimize_24_parts
echo .
@copy "bin\temp\Tiles\*.jpg" "bin\temp\Tiles\optimized\*.jpg"
echo Completed: Files copied ready for optimizing
@bin\jpegoptim --size=60k "bin\temp\Tiles\optimized\01.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\02.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\03.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\04.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\05.jpg"
@bin\jpegoptim --size=41k "bin\temp\Tiles\optimized\06.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\07.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\08.jpg"
@bin\jpegoptim --size=61k "bin\temp\Tiles\optimized\09.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\10.jpg"
@bin\jpegoptim --size=43k "bin\temp\Tiles\optimized\11.jpg"
@bin\jpegoptim --size=37k "bin\temp\Tiles\optimized\12.jpg"
echo.
@bin\jpegoptim --size=51k "bin\temp\Tiles\optimized\13.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\14.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\15.jpg"
@bin\jpegoptim --size=52k "bin\temp\Tiles\optimized\16.jpg"
@bin\jpegoptim --size=60k "bin\temp\Tiles\optimized\17.jpg"
@bin\jpegoptim --size=55k "bin\temp\Tiles\optimized\18.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\19.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\20.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\21.jpg"
@bin\jpegoptim --size=48k "bin\temp\Tiles\optimized\22.jpg"
@bin\jpegoptim --size=52k "bin\temp\Tiles\optimized\23.jpg"
@bin\jpegoptim --size=53k "bin\temp\Tiles\optimized\24.jpg"
echo Completed: Optimized jpgs to correct size for each available slot
:inject_24_parts
@copy bin\earth_ofw.bin bin\temp\earth.bin
echo .
@copy bin\earth_header.bin bin\temp\earth.qrc
echo Completed: template and header files created
@bin\binsert 0x000658F0 bin\temp\Tiles\optimized\01.jpg bin\temp\earth.bin
@bin\binsert 0x00075B10 bin\temp\Tiles\optimized\02.jpg bin\temp\earth.bin
@bin\binsert 0x00083C90 bin\temp\Tiles\optimized\03.jpg bin\temp\earth.bin
@bin\binsert 0x00090B10 bin\temp\Tiles\optimized\04.jpg bin\temp\earth.bin
@bin\binsert 0x0009E390 bin\temp\Tiles\optimized\05.jpg bin\temp\earth.bin
@bin\binsert 0x000ABC20 bin\temp\Tiles\optimized\06.jpg bin\temp\earth.bin
@bin\binsert 0x000B7060 bin\temp\Tiles\optimized\07.jpg bin\temp\earth.bin
@bin\binsert 0x000C3620 bin\temp\Tiles\optimized\08.jpg bin\temp\earth.bin
@bin\binsert 0x000D0570 bin\temp\Tiles\optimized\09.jpg bin\temp\earth.bin
@bin\binsert 0x000E0CA0 bin\temp\Tiles\optimized\10.jpg bin\temp\earth.bin
@bin\binsert 0x000ED3D0 bin\temp\Tiles\optimized\11.jpg bin\temp\earth.bin
echo .
@bin\binsert 0x000F8E60 bin\temp\Tiles\optimized\12.jpg bin\temp\earth.bin
@bin\binsert 0x00102FF0 bin\temp\Tiles\optimized\13.jpg bin\temp\earth.bin
@bin\binsert 0x00110FD0 bin\temp\Tiles\optimized\14.jpg bin\temp\earth.bin
@bin\binsert 0x0011F950 bin\temp\Tiles\optimized\15.jpg bin\temp\earth.bin
@bin\binsert 0x0012C650 bin\temp\Tiles\optimized\16.jpg bin\temp\earth.bin
@bin\binsert 0x0013A890 bin\temp\Tiles\optimized\17.jpg bin\temp\earth.bin
@bin\binsert 0x0014AAF0 bin\temp\Tiles\optimized\18.jpg bin\temp\earth.bin
@bin\binsert 0x001598B0 bin\temp\Tiles\optimized\19.jpg bin\temp\earth.bin
@bin\binsert 0x001681D0 bin\temp\Tiles\optimized\20.jpg bin\temp\earth.bin
@bin\binsert 0x001745C0 bin\temp\Tiles\optimized\21.jpg bin\temp\earth.bin
@bin\binsert 0x00182FC0 bin\temp\Tiles\optimized\22.jpg bin\temp\earth.bin
@bin\binsert 0x001902E0 bin\temp\Tiles\optimized\23.jpg bin\temp\earth.bin
@bin\binsert 0x0019E360 bin\temp\Tiles\optimized\24.jpg bin\temp\earth.bin
echo Completed: jpgs injected into base QRC
:compress_qrc
echo .
@bin\zdrop bin\temp\earth.bin
echo .
echo Completed: QRC compressed with zlib
:add_qrc_header
echo .
@bin\binsert 0x0000000008 bin\temp\earth.bin.zlib bin\temp\earth.qrc
echo Completed: QRC Header injected
@Move bin\temp\earth.qrc earth.qrc
echo .
if exist earth.qrc echo QRC successfully created - PROCESS COMPLETED
if not exist earth.qrc echo ERROR - PROCESS FAILED
echo Do you want to return to the options menu
@pause
goto options
:file_not_found_tile
echo Check your files - tile.jpg not found
@pause
goto options
:file_not_found_face
echo Check your files - face.jpg not found
@pause
goto options
:file_not_found_cubemap
echo Check your files - cubemap.jpg not found
@pause
goto options
:file_not_found_logo
echo Check your files - logo.jpg not found
@pause
goto options
:file_not_found_fill
echo Check your files - fill.jpg not found
@pause
goto options
:file_not_found_banner
echo Check your files - banner.jpg not found
@pause
goto options
:file_not_found_0
echo Check your files - 0.jpg not found
@pause
goto options
:file_not_found_1
echo Check your files - 1.jpg not found
@pause
goto options
:file_not_found_2
echo Check your files - 2.jpg not found
@pause
goto options
:file_not_found_3
echo Check your files - 3.jpg not found
@pause
goto options
:file_not_found_4
echo Check your files - 4.jpg not found
@pause
goto options
:file_not_found_5
echo Check your files - 5.jpg not found
@pause
goto options

New options as seen here, this really makes creating earth.qrc simple. I have included example images in the folder so it can be demoed on all options easily.

upload_2020-1-28_3-31-55-png.23235



Usage:
upload_2020-1-28_3-31-8-png.23234


Here are some examples of what it can do. I have included these example images in the folder. You can use those to demo the features if you want to.

Option 1 if used on this tile.jpg:
tile.jpg

Will give this effect:
option1.jpg
Option 2 if used on this face.jpg:
face.jpg

Will give this effect:
option2.jpg
Option 3 when used on a cubemap.jpg like this:
cubemap.jpg

Will give an effect like this:
option3.jpg
Options 4 when used on a logo.jpg and fill.jpg like these:
logo.jpg fill.jpg

Will give this effect:
option4.jpg
Option 5 when used on a logo.jpg and fill.jpg like these:
logo.jpg fill.jpg

Will give this effect:
option5.jpg
Option 6 when used on 0.jpg to 5.jpg like these:
0.jpg 1.jpg 2.jpg
3.jpg 4.jpg 5.jpg

Will give an effect like this (same as cubemap)
option3.jpg
Option 7 when used on a banner.jpg and fill.jpg like these:
banner.jpg fill.jpg

Will give an effect like this:
option7.jpg
Option 8 when used on a tile.jpg like this:
tile.jpg

Will convert it into a tiled 4096x2048 image like this ready for a cubemap generator:
4096x2048.jpg

Which will give an effect like this when you use a cubemap generator on it
option8.jpg
Option 9 when used on a tile.jpg image like this:
tile.jpg

Will convert it into a tiled 8192x4096 image which is ready for a cubemap generator.

8192x4096.jpg

Which will give an effect like this when you use a cubemap generator on it.
option9.jpg
 

Attachments

Last edited:
It's not looking very good so far :sorrow:

I have it replacing files & rebuilding the qrc but in the test that DeViL303 ran the new qrcs aren't working.
They look okay to me & the cxmldecompiler runs fine on them. I'm a little lost right now & it's getting late so I'll post what we have & if anyone wants to play with it to see if you find something I've missed. So far they've been kicking to recovery :hororr:
We can still do some nice stuff with this but may not be as cool as I was hopping.

Just to say it one more time before I post.
This is not fully working I'm only posting to get help with testing & debugging.
 

Attachments

It's not looking very good so far :sorrow:

I have it replacing files & rebuilding the qrc but in the test that DeViL303 ran the new qrcs aren't working.
They look okay to me & the cxmldecompiler runs fine on them. I'm a little lost right now & it's getting late so I'll post what we have & if anyone wants to play with it to see if you find something I've missed. So far they've been kicking to recovery :hororr:
We can still do some nice stuff with this but may not be as cool as I was hopping.

Just to say it one more time before I post.
This is not fully working I'm only posting to get help with testing & debugging.
Tomorrow when my head is clearer I will try inject the same image manually and with your tool and then hex compare. Its probably very close.

It did actually work for me once, I injected a 160kb jpg into one of the cloud slots. but it was such a quick test I am not sure which slot I injected it into and since then its been kicking me to recovery when I try the first few slots.

Also my PC has seen a lot of new apps recently and may not be running the best so its possible it will work for someone else.
 
Last edited:
I'm going to spend some time tomorrow cleaning the code up that may help it run a little better.
When I first opened the qrc you sent me some of the file data was showing backwards but when I reloaded it they were right. I'm wondering if I don't have a bug causing it to write some of the byte arrays backwards.

I'm just hoping it's something I've got messed up.

Edit: I think I know what I need to do. I'll let everyone know something in the morning.
 
Last edited:
Here is my latest bat, QRC injector BAT v1.2

Up over 600 lines already :)

Code:
cls
@echo off
echo                         +----------------------+
echo                               QRC Injector
echo                                   v1.2
echo                           Created at PSX-Place
echo                         +----------------------+
echo.
echo                                  USAGE:
echo            Place the correctly named+sized jpeg next to this bat  
echo.        
echo                           JPG REQUIREMENTS:
echo.  If using tile.jpg it must be 512x512 (Seamless texture recommended)
echo   If using face.jpg it must be 1024x1024 (Seamless texture recommended)
echo   If using cubemap.jpg it must be 4096x3072 (Proper cubemap recommended)
echo   If using logo.jpg and fill.jpg they must be 1024x1024 (Avoid using corners)
echo   If using 0.jpg to 5.jpg they must be 1024x1024 (individual cubemap faces)
echo   If using banner.jpg it must be 4096x512 and fill.jpg must be 1024x1024
echo.
echo +------------------------------------------------------------------------------+
echo   Warning: The temp folder and and the last created earth.qrc will be cleared
echo                  when you chose an option from 1 to 9
echo +------------------------------------------------------------------------------+
echo.                      
@pause
:options
echo.
echo.
echo +------------------------------------------------------------------------------+
echo                            QRC Injector v1.2
echo.
echo                               OPTIONS MENU
echo.
echo +------------------------------------------------------------------------------+
echo                       SELECT AN OPTION FROM 1 to 9
echo +------------------------------------------------------------------------------+
echo 1) Apply tile.jpg to every one of the 24 slots
echo 2) Apply face.jpg to every one of the 6 "cube" faces
echo 3) Apply cubemap.jpg all the way around the "cube"
echo 4) Apply logo.jpg to only 2 opposite faces on the equator, fill.jpg the rest
echo 5) Apply logo.jpg to 4 faces around the equator, fill.jpg north+south
echo 6) Apply individual 0.jpg to 5.jpg to the 6 faces
echo 7) Apply banner.jpg all around the equator like a belt
echo 8) Clone tile.jpg into tiled 4096x2048 jpeg ready for cubemap generator
echo 9) Clone tile.jpg into tiled 8192x4096 jpeg ready for cubemap generator
echo.
echo.
echo.
echo.
set /p op=Type option:
if "%op%"=="1" goto tile_to_qrc_info
if "%op%"=="2" goto face_to_qrc_info
if "%op%"=="3" goto cubemap_to_qrc_info
if "%op%"=="4" goto logo1_info
if "%op%"=="5" goto logo2_info
if "%op%"=="6" goto 6_sides_info
if "%op%"=="7" goto banner_info
if "%op%"=="8" goto create_4k_from_512x512_info
if "%op%"=="9" goto create_8k_from_512x512_info
:tile_to_qrc_info
echo.
echo You chose to inject tile.jpg (512x512) to earth.qrc
echo The jpg will be applied to every one of the 24 slots in the cloud layer
if not exist tile.jpg goto file_not_found_tile
echo Working....
goto tile_to_qrc
:face_to_qrc_info
echo.
echo You chose to inject face.jpg (1024x1024) to earth.qrc
echo The jpg will be applied to every one of the 6 cube faces in the cloud layer
if not exist face.jpg goto file_not_found_face
echo Working....
goto face_to_qrc
:cubemap_to_qrc_info
echo.
echo You chose to inject cubemap.jpg (4096x3072) to earth.qrc
echo The jpg will be applied all around the cube in the cloud layer.
if not exist cubemap.jpg goto file_not_found_cubemap
echo Working....
goto cubemap_to_qrc
:logo1_info
echo.
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied front + back faces, fill.jpg on sides + top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo_to_qrc
:logo2_info
echo.
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied to front + back + side faces, fill.jpg to top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo2_to_qrc
:banner_info
echo.
echo You chose to inject banner.jpg (4096x512) to earth.qrc
echo The banner.jpg will be applied all around the equator lke a belt
if not exist banner.jpg goto file_not_found_banner
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto banner_to_qrc
:6_sides_info
echo.
echo You chose to inject 6 individual sides 0.jpg to 5.jpg (1024x1024) to earth.qrc
echo These will be applied to every face using official numbering of the faces
if not exist 0.jpg goto file_not_found_0
if not exist 1.jpg goto file_not_found_1
if not exist 2.jpg goto file_not_found_2
if not exist 3.jpg goto file_not_found_3
if not exist 4.jpg goto file_not_found_4
if not exist 5.jpg goto file_not_found_5
echo Working....
goto 6_sides_to_qrc
:create_4k_from_512x512_info
echo.
echo You chose to clone tile.jpg (512x512) into a 4096x2048 jpg
echo The tile.jpg will be prepared into 4k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_4k_from_512x512
:create_8k_from_512x512_info
echo.
echo You chose to clone tile.jpg (512x512) into a 8192x4096 jpg.
echo The tile.jpg will be prepared into 8k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_8k_from_512x512
:create_4k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile 4096x2048.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo.
bin\jpegtran -drop +2048+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 1 of 4 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo.
bin\jpegtran -drop +2048+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 2 of 4 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 3 of 4 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 4 of 4 completed successfully
echo .
if exist 4096x2048.jpg echo PROCESS COMPLETED
if not exist 4096x2048.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:create_8k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile temp.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile temp.jpg temp.jpg
echo Step 1 of 8 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile temp.jpg temp.jpg
echo Step 2 of 8 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile temp.jpg temp.jpg
echo Step 3 of 8 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile temp.jpg temp.jpg
echo Step 4 of 8 completed successfully
bin\jpegtran -crop 8192x4096+0+0 -outfile 8192x4096.jpg temp.jpg
echo .
echo Step 5 of 8 completed successfully
bin\jpegtran -drop +4096+0 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 6 of 8 completed successfully
bin\jpegtran -drop +0+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 7 of 8 completed successfully
bin\jpegtran -drop +4096+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 8 of 8 completed successfully
DEL "temp.jpg" /Q /S
echo .
if exist 8192x4096.jpg echo PROCESS COMPLETED
if not exist 8192x4096.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:tile_to_qrc
echo .
@if exist earth.qrc DEL "earth.qrc" /Q /S
echo earth.qrc cleared
@if exist "bin\temp\" DEL "bin\temp" /Q /S
echo .
@if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
echo .
@if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
echo .
bin\jpegtran -drop +512+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -drop +0+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg bin\temp\face.jpg
echo Completed: tile cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -drop +1024+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: face cloned into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:face_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg face.jpg
echo .
bin\jpegtran -drop +1024+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: face cloned into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:cubemap_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
echo .
bin\jpegtran -rotate 180 "cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:logo_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:logo2_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and logo.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:6_sides_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg 4.jpg
echo .
bin\jpegtran -drop +3072+1024 0.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 1.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+1024 2.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 3.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 5.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: 0.jpg to 5.jpg made into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:banner_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1280 banner.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: banner.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:optimize_24_parts
echo .
@copy "bin\temp\Tiles\*.jpg" "bin\temp\Tiles\optimized\*.jpg"
echo Completed: Files copied ready for optimizing
@bin\jpegoptim --size=60k "bin\temp\Tiles\optimized\01.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\02.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\03.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\04.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\05.jpg"
@bin\jpegoptim --size=41k "bin\temp\Tiles\optimized\06.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\07.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\08.jpg"
@bin\jpegoptim --size=61k "bin\temp\Tiles\optimized\09.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\10.jpg"
@bin\jpegoptim --size=43k "bin\temp\Tiles\optimized\11.jpg"
@bin\jpegoptim --size=37k "bin\temp\Tiles\optimized\12.jpg"
echo.
@bin\jpegoptim --size=51k "bin\temp\Tiles\optimized\13.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\14.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\15.jpg"
@bin\jpegoptim --size=52k "bin\temp\Tiles\optimized\16.jpg"
@bin\jpegoptim --size=60k "bin\temp\Tiles\optimized\17.jpg"
@bin\jpegoptim --size=55k "bin\temp\Tiles\optimized\18.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\19.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\20.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\21.jpg"
@bin\jpegoptim --size=48k "bin\temp\Tiles\optimized\22.jpg"
@bin\jpegoptim --size=52k "bin\temp\Tiles\optimized\23.jpg"
@bin\jpegoptim --size=53k "bin\temp\Tiles\optimized\24.jpg"
echo Completed: Optimized jpgs to correct size for each available slot
:inject_24_parts
@copy bin\earth_ofw.bin bin\temp\earth.bin
echo .
@copy bin\earth_header.bin bin\temp\earth.qrc
echo Completed: template and header files created
@bin\binsert 0x000658F0 bin\temp\Tiles\optimized\01.jpg bin\temp\earth.bin
@bin\binsert 0x00075B10 bin\temp\Tiles\optimized\02.jpg bin\temp\earth.bin
@bin\binsert 0x00083C90 bin\temp\Tiles\optimized\03.jpg bin\temp\earth.bin
@bin\binsert 0x00090B10 bin\temp\Tiles\optimized\04.jpg bin\temp\earth.bin
@bin\binsert 0x0009E390 bin\temp\Tiles\optimized\05.jpg bin\temp\earth.bin
@bin\binsert 0x000ABC20 bin\temp\Tiles\optimized\06.jpg bin\temp\earth.bin
@bin\binsert 0x000B7060 bin\temp\Tiles\optimized\07.jpg bin\temp\earth.bin
@bin\binsert 0x000C3620 bin\temp\Tiles\optimized\08.jpg bin\temp\earth.bin
@bin\binsert 0x000D0570 bin\temp\Tiles\optimized\09.jpg bin\temp\earth.bin
@bin\binsert 0x000E0CA0 bin\temp\Tiles\optimized\10.jpg bin\temp\earth.bin
@bin\binsert 0x000ED3D0 bin\temp\Tiles\optimized\11.jpg bin\temp\earth.bin
echo .
@bin\binsert 0x000F8E60 bin\temp\Tiles\optimized\12.jpg bin\temp\earth.bin
@bin\binsert 0x00102FF0 bin\temp\Tiles\optimized\13.jpg bin\temp\earth.bin
@bin\binsert 0x00110FD0 bin\temp\Tiles\optimized\14.jpg bin\temp\earth.bin
@bin\binsert 0x0011F950 bin\temp\Tiles\optimized\15.jpg bin\temp\earth.bin
@bin\binsert 0x0012C650 bin\temp\Tiles\optimized\16.jpg bin\temp\earth.bin
@bin\binsert 0x0013A890 bin\temp\Tiles\optimized\17.jpg bin\temp\earth.bin
@bin\binsert 0x0014AAF0 bin\temp\Tiles\optimized\18.jpg bin\temp\earth.bin
@bin\binsert 0x001598B0 bin\temp\Tiles\optimized\19.jpg bin\temp\earth.bin
@bin\binsert 0x001681D0 bin\temp\Tiles\optimized\20.jpg bin\temp\earth.bin
@bin\binsert 0x001745C0 bin\temp\Tiles\optimized\21.jpg bin\temp\earth.bin
@bin\binsert 0x00182FC0 bin\temp\Tiles\optimized\22.jpg bin\temp\earth.bin
@bin\binsert 0x001902E0 bin\temp\Tiles\optimized\23.jpg bin\temp\earth.bin
@bin\binsert 0x0019E360 bin\temp\Tiles\optimized\24.jpg bin\temp\earth.bin
echo Completed: jpgs injected into base QRC
:compress_qrc
echo .
@bin\zdrop bin\temp\earth.bin
echo .
echo Completed: QRC compressed with zlib
:add_qrc_header
echo .
@bin\binsert 0x0000000008 bin\temp\earth.bin.zlib bin\temp\earth.qrc
echo Completed: QRC Header injected
@Move bin\temp\earth.qrc earth.qrc
echo .
if exist earth.qrc echo QRC successfully created - PROCESS COMPLETED
if not exist earth.qrc echo ERROR - PROCESS FAILED
echo Do you want to return to the options menu
@pause
goto options
:file_not_found_tile
echo Check your files - tile.jpg not found
@pause
goto options
:file_not_found_face
echo Check your files - face.jpg not found
@pause
goto options
:file_not_found_cubemap
echo Check your files - cubemap.jpg not found
@pause
goto options
:file_not_found_logo
echo Check your files - logo.jpg not found
@pause
goto options
:file_not_found_fill
echo Check your files - fill.jpg not found
@pause
goto options
:file_not_found_banner
echo Check your files - banner.jpg not found
@pause
goto options
:file_not_found_0
echo Check your files - 0.jpg not found
@pause
goto options
:file_not_found_1
echo Check your files - 1.jpg not found
@pause
goto options
:file_not_found_2
echo Check your files - 2.jpg not found
@pause
goto options
:file_not_found_3
echo Check your files - 3.jpg not found
@pause
goto options
:file_not_found_4
echo Check your files - 4.jpg not found
@pause
goto options
:file_not_found_5
echo Check your files - 5.jpg not found
@pause
goto options

New options as seen here, this really makes creating earth.qrc simple. I have included example images in the folder so it can be demoed on all options easily.

upload_2020-1-28_3-31-55-png.23235



Usage:
upload_2020-1-28_3-31-8-png.23234


Here are some examples of what it can do. I have included these example images in the folder. You can use those to demo the features if you want to.

Option 1 if used on this tile.jpg:
View attachment 23242

Will give this effect:
View attachment 23243
Option 2 if used on this face.jpg:
View attachment 23244

Will give this effect:
View attachment 23245
Option 3 when used on a cubemap.jpg like this:
View attachment 23246

Will give an effect like this:
View attachment 23247
Options 4 when used on a logo.jpg and fill.jpg like these:
View attachment 23248 View attachment 23249

Will give this effect:
View attachment 23250
Option 5 when used on a logo.jpg and fill.jpg like these:
View attachment 23248 View attachment 23249

Will give this effect:
View attachment 23259
Option 6 when used on 0.jpg to 5.jpg like these:
View attachment 23253 View attachment 23254 View attachment 23255
View attachment 23256 View attachment 23257 View attachment 23258

Will give an effect like this (same as cubemap)
View attachment 23247
Option 7 when used on a banner.jpg and fill.jpg like these:
View attachment 23260 View attachment 23249

Will give an effect like this:
View attachment 23261
Option 8 when used on a tile.jpg like this:
View attachment 23242

Will convert it into a tiled 4096x2048 image like this ready for a cubemap generator:
View attachment 23262

Which will give an effect like this when you use a cubemap generator on it
View attachment 23266
Option 9 when used on a tile.jpg image like this:
View attachment 23242

Will convert it into a tiled 8192x4096 image which is ready for a cubemap generator.

View attachment 23264

Which will give an effect like this when you use a cubemap generator on it.
View attachment 23267
Amazing
 
I injected your cubemap sandungas. Not sure if its useful, but its so easy to do now I thought why not. All I had to do was rotate it, resize it to 4096x3072. :)

Also see the video, I only just noticed, if you pause the then keep hitting R1, it cycles through all available presets. :)

View attachment 23224

View attachment 23221 View attachment 23222 View attachment 23223

Hehe, cool, i had an idea while looking at it... the text on top of the equator cube faces are disaligned with the equator (because are not distorted)
The texts of the polar cube faces handles well the distortion though (not sure, but i think they have the same problem, but is not much notable)

But i guess i could correct the alignments in the equator faces by drawing the texts in the pattern i made :)
https://www.psx-place.com/threads/r...er_plugin-earth-qrc.27756/page-12#post-224471
zI80Ixf.jpg

I see you have been playing with that trick, heheh... i been thinking in it the past couple of days, trying to imagine how to create different "tile" geometries derivated from that, eventually i will try to draw something in photoshop and i will post it here for experiments :)


*i need to re-do that pattern btw... geometrically is ok (it have the subdivisions exactly as i wanted, with the small squares representing 5º degrees width and 5º degrees height
The problem is i created it by using a grid of 40x40 pixels so the resulting image doesnt have 4096 pixels width (is smaller... so at the time are created the cube faces is scaled up... and this lowers his quality)
 
Last edited:
I'm going to spend some time tomorrow cleaning the code up that may help it run a little better.
When I first opened the qrc you sent me some of the file data was showing backwards but when I reloaded it they were right. I'm wondering if I don't have a bug causing it to write some of the byte arrays backwards.

I'm just hoping it's something I've got messed up.

Edit: I think I know what I need to do. I'll let everyone know something in the morning.
I wouldn't worry too much man, people don't really seem to care about these earth.qrc modz anyway. Take your time and don't worry too much about hurrying to get it finished!!
 
Btw, take a look at this web http://paulbourke.net/miscellaneous/cubemaps/

When we take an image from places like the NASA "blue marble" web with a complete image of the earth at dimmensions width=2*height
That image is already distorted (specially notable in the poles where the distortion is brutal... is imposible to "paint" on top of that area)

The distortion pattern we really have in that images seems to be something like this (maybe not exactly, im not completly sure, but pretty much the same)
grid_00000.jpg



Im trying to find how to create that distortion pattern used in the NASA blue marble images (that seems to be named "spherical map") from a image without any distortion
As far i see/understand... this would allow us to have full control of the distortions (it seems to be the only way to have full control of disortions)
 
Last edited:
I'm using the dotnet version of zlib it's about the same thing and it's easier to use with c#.

Getting really close on the replacing files and rebuilding the qrc. I need to get it reading the new info into the list and we can start the testing If everything goes well with that we'll start working on building from a folder and adding the image tools.

As soon as we know if we can get the replacing working we'll let everyone know.
Nice, the zlib support is a milestone in itself, now the tool can deal with the .qrc files in his original format :)
 
Small update. This bat now also creates the official QRC file structure in the temp folder. If you do not need that feature you will not need to bother with this update.

Code:
cls
@echo off
echo                         +----------------------+
echo                               QRC Injector 
echo                                   v1.3
echo                           Created at PSX-Place
echo                         +----------------------+
echo.
echo                                  USAGE:
echo            Place the correctly named+sized jpeg next to this bat     
echo.           
echo                           JPG REQUIREMENTS:
echo.  If using tile.jpg it must be 512x512 (Seamless texture recommended)
echo   If using face.jpg it must be 1024x1024 (Seamless texture recommended)
echo   If using cubemap.jpg it must be 4096x3072 (Proper cubemap recommended)
echo   If using logo.jpg and fill.jpg they must be 1024x1024 (Avoid using corners)
echo   If using 0.jpg to 5.jpg they must be 1024x1024 (individual cubemap faces)
echo   If using banner.jpg it must be 4096x512 and fill.jpg must be 1024x1024
echo.
echo.
echo +------------------------------------------------------------------------------+
echo   Warning: The temp folder and and the last created earth.qrc will be cleared 
echo                  when you chose an option from 1 to 10 
echo +------------------------------------------------------------------------------+
echo.                         
@pause
:options
echo. 
echo. 
echo +------------------------------------------------------------------------------+
echo                            QRC Injector v1.3 
echo.
echo                               OPTIONS MENU
echo. 
echo +------------------------------------------------------------------------------+
echo                       SELECT AN OPTION FROM 1 to 10
echo +------------------------------------------------------------------------------+
echo 1) Apply tile.jpg to every one of the 24 slots 
echo 2) Apply face.jpg to every one of the 6 "cube" faces 
echo 3) Apply cubemap.jpg all the way around the "cube" 
echo 4) Apply logo.jpg to only 2 opposite faces on the equator, fill.jpg the rest 
echo 5) Apply logo.jpg to 4 faces around the equator, fill.jpg north+south
echo 6) Apply individual 0.jpg to 5.jpg to the 6 faces
echo 7) Apply banner.jpg all around the equator like a belt
echo 8) Clone tile.jpg into tiled 4096x2048 jpeg ready for cubemap generator
echo 9) Clone tile.jpg into tiled 8192x4096 jpeg ready for cubemap generator
echo.
echo.
echo.
echo.
set /p op=Type option:
if "%op%"=="1" goto tile_to_qrc_info
if "%op%"=="2" goto face_to_qrc_info
if "%op%"=="3" goto cubemap_to_qrc_info
if "%op%"=="4" goto logo1_info
if "%op%"=="5" goto logo2_info
if "%op%"=="6" goto 6_sides_info
if "%op%"=="7" goto banner_info
if "%op%"=="8" goto create_4k_from_512x512_info
if "%op%"=="9" goto create_8k_from_512x512_info
:tile_to_qrc_info
echo .
echo You chose to inject tile.jpg (512x512) to earth.qrc
echo The jpg will be applied to every one of the 24 slots in the cloud layer
if not exist tile.jpg goto file_not_found_tile
echo Working....
goto tile_to_qrc
:face_to_qrc_info
echo .
echo You chose to inject face.jpg (1024x1024) to earth.qrc
echo The jpg will be applied to every one of the 6 cube faces in the cloud layer
if not exist face.jpg goto file_not_found_face
echo Working....
goto face_to_qrc
:cubemap_to_qrc_info
echo .
echo You chose to inject cubemap.jpg (4096x3072) to earth.qrc
echo The jpg will be applied all around the cube in the cloud layer.
if not exist cubemap.jpg goto file_not_found_cubemap
echo Working....
goto cubemap_to_qrc
:logo1_info
echo .
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied front + back faces, fill.jpg on sides + top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo_to_qrc
:logo2_info
echo .
echo You chose to inject logo.jpg and fill.jpg (1024x1024) to earth.qrc
echo The logo.jpg will be applied to front + back + side faces, fill.jpg to top + bottom
if not exist logo.jpg goto file_not_found_logo
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto logo2_to_qrc
:banner_info
echo .
echo You chose to inject banner.jpg (4096x512) to earth.qrc
echo The banner.jpg will be applied all around the equator lke a belt
if not exist banner.jpg goto file_not_found_banner
if not exist fill.jpg goto file_not_found_fill
echo Working....
goto banner_to_qrc
:6_sides_info
echo .
echo You chose to inject 6 individual sides 0.jpg to 5.jpg (1024x1024) to earth.qrc
echo These will be applied to every face using official numbering of the faces
if not exist 0.jpg goto file_not_found_0
if not exist 1.jpg goto file_not_found_1
if not exist 2.jpg goto file_not_found_2
if not exist 3.jpg goto file_not_found_3
if not exist 4.jpg goto file_not_found_4
if not exist 5.jpg goto file_not_found_5
echo Working....
goto 6_sides_to_qrc
:create_4k_from_512x512_info
echo .
echo You chose to clone tile.jpg (512x512) into a 4096x2048 jpg
echo The tile.jpg will be prepared into 4k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_4k_from_512x512
:create_8k_from_512x512_info
echo .
echo You chose to clone tile.jpg (512x512) into a 8192x4096 jpg.
echo The tile.jpg will be prepared into 8k for using with a cubemap generator
if not exist tile.jpg goto file_not_found_tile
echo.
echo Working....
goto create_8k_from_512x512
:create_4k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile 4096x2048.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 1 of 4 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 2 of 4 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 3 of 4 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile 4096x2048.jpg 4096x2048.jpg
echo Step 4 of 4 completed successfully
echo .
if exist 4096x2048.jpg echo PROCESS COMPLETED
if not exist 4096x2048.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:create_8k_from_512x512
bin\jpegtran -crop 4096x2048+0+0 -outfile temp.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+0 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+0 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+0 tile.jpg -outfile temp.jpg temp.jpg
echo Step 1 of 8 completed successfully
bin\jpegtran -drop +0+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+512 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+512 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+512 tile.jpg -outfile temp.jpg temp.jpg
echo Step 2 of 8 completed successfully
bin\jpegtran -drop +0+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1024 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1024 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1024 tile.jpg -outfile temp.jpg temp.jpg
echo Step 3 of 8 completed successfully
bin\jpegtran -drop +0+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +512+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1024+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +1536+1536 tile.jpg -outfile temp.jpg temp.jpg
echo .
bin\jpegtran -drop +2048+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +2560+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3072+1536 tile.jpg -outfile temp.jpg temp.jpg
bin\jpegtran -drop +3584+1536 tile.jpg -outfile temp.jpg temp.jpg
echo Step 4 of 8 completed successfully
bin\jpegtran -crop 8192x4096+0+0 -outfile 8192x4096.jpg temp.jpg
echo .
echo Step 5 of 8 completed successfully
bin\jpegtran -drop +4096+0 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 6 of 8 completed successfully
bin\jpegtran -drop +0+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 7 of 8 completed successfully
bin\jpegtran -drop +4096+2048 temp.jpg -outfile 8192x4096.jpg 8192x4096.jpg
echo .
echo Step 8 of 8 completed successfully
DEL "temp.jpg" /Q /S
echo .
if exist 8192x4096.jpg echo PROCESS COMPLETED
if not exist 8192x4096.jpg echo ERROR
echo .
echo Do you want to go back to the options menu?
@pause
goto options
:tile_to_qrc
echo .
@if exist earth.qrc DEL "earth.qrc" /Q /S
echo earth.qrc cleared
@if exist "bin\temp\" DEL "bin\temp" /Q /S
echo .
@if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
echo .
@if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 1024x1024+0+0 -outfile bin\temp\face.jpg tile.jpg
bin\jpegtran -drop +512+0 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -drop +512+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
echo .
bin\jpegtran -drop +512+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -drop +0+512 tile.jpg -outfile bin\temp\face.jpg bin\temp\face.jpg
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg bin\temp\face.jpg
echo Completed: tile cloned into 1024x1024 for each of the 6 faces
bin\jpegtran -drop +1024+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo .
bin\jpegtran -drop +2048+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 bin\temp\face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: face cloned into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
echo .
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:face_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg face.jpg
echo .
bin\jpegtran -drop +1024+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 face.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: face cloned into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:cubemap_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared 
echo .
bin\jpegtran -rotate 180 "cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:logo_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:logo2_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 logo.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: logo.jpg and logo.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:6_sides_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg 4.jpg
echo .
bin\jpegtran -drop +3072+1024 0.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 1.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+1024 2.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 3.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 5.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: 0.jpg to 5.jpg made into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:banner_to_qrc
if exist "bin\temp\" DEL "bin\temp" /Q /S
if exist earth.qrc DEL "earth.qrc" /Q /S
if not exist "bin\temp\Cube_faces" MkDir "bin\temp\Cube_faces"
if not exist "bin\temp\Tiles\optimized" MkDir "bin\temp\Tiles\optimized"
echo Completed: bin\temp folder cleared
bin\jpegtran -crop 4096x3072+1024+0 -outfile bin\temp\cubemap.jpg fill.jpg
echo .
bin\jpegtran -drop +1024+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +1024+2048 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +2048+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +3072+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1024 fill.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
bin\jpegtran -drop +0+1280 banner.jpg -outfile bin\temp\cubemap.jpg bin\temp\cubemap.jpg
echo Completed: banner.jpg and fill.jpg applied into 4096x3072 cubemap cross
echo .
bin\jpegtran -rotate 180 "bin\temp\cubemap.jpg" "bin\temp\Cube_faces\cubemap_rotated.jpg"
echo Completed: cubemap rotated to suit PS3 orientation
bin\jpegtran -crop 1024x1024+0+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face0.jpg"
bin\jpegtran -crop 1024x1024+3072+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face1.jpg"
bin\jpegtran -crop 1024x1024+2048+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face2.jpg"
bin\jpegtran -crop 1024x1024+1024+1024 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face3.jpg"
bin\jpegtran -crop 1024x1024+2048+0 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face4.jpg"
bin\jpegtran -crop 1024x1024+2048+2048 "bin\temp\Cube_faces\cubemap_rotated.jpg" "bin\temp\Cube_faces\face5.jpg"
echo .
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\01.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\02.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\03.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face0.jpg" "bin\temp\Tiles\04.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\05.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\06.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\07.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face1.jpg" "bin\temp\Tiles\08.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\09.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\10.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\11.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face2.jpg" "bin\temp\Tiles\12.jpg"
echo Completed: 12 out of 24 jpgs cut
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\13.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\14.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\15.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face3.jpg" "bin\temp\Tiles\16.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\17.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\18.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\19.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face4.jpg" "bin\temp\Tiles\20.jpg"
bin\jpegtran -crop 512x512+0+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\21.jpg"
bin\jpegtran -crop 512x512+512+0 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\22.jpg"
bin\jpegtran -crop 512x512+0+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\23.jpg"
bin\jpegtran -crop 512x512+512+512 "bin\temp\Cube_faces\face5.jpg" "bin\temp\Tiles\24.jpg"
echo Completed: 24 out of 24 jpgs cut
goto optimize_24_parts
:optimize_24_parts
echo .
@copy "bin\temp\Tiles\*.jpg" "bin\temp\Tiles\optimized\*.jpg"
echo Completed: Files copied ready for optimizing
@bin\jpegoptim --size=60k "bin\temp\Tiles\optimized\01.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\02.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\03.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\04.jpg"
@bin\jpegoptim --size=50k "bin\temp\Tiles\optimized\05.jpg"
@bin\jpegoptim --size=41k "bin\temp\Tiles\optimized\06.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\07.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\08.jpg"
@bin\jpegoptim --size=61k "bin\temp\Tiles\optimized\09.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\10.jpg"
@bin\jpegoptim --size=43k "bin\temp\Tiles\optimized\11.jpg"
@bin\jpegoptim --size=37k "bin\temp\Tiles\optimized\12.jpg"
echo .
@bin\jpegoptim --size=51k "bin\temp\Tiles\optimized\13.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\14.jpg"
@bin\jpegoptim --size=47k "bin\temp\Tiles\optimized\15.jpg"
@bin\jpegoptim --size=52k "bin\temp\Tiles\optimized\16.jpg"
@bin\jpegoptim --size=60k "bin\temp\Tiles\optimized\17.jpg"
@bin\jpegoptim --size=55k "bin\temp\Tiles\optimized\18.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\19.jpg"
@bin\jpegoptim --size=45k "bin\temp\Tiles\optimized\20.jpg"
@bin\jpegoptim --size=54k "bin\temp\Tiles\optimized\21.jpg"
@bin\jpegoptim --size=48k "bin\temp\Tiles\optimized\22.jpg"
@bin\jpegoptim --size=52k "bin\temp\Tiles\optimized\23.jpg"
@bin\jpegoptim --size=53k "bin\temp\Tiles\optimized\24.jpg"
echo Completed: Optimized jpgs to correct size for each available slot
goto create_file_structure
:create_file_structure
if not exist "bin\temp\earth\flashrom\clouds\0\1\" MkDir "bin\temp\earth\flashrom\clouds\0\1\" && copy "bin\temp\Tiles\optimized\01.jpg" "bin\temp\earth\flashrom\clouds\0\1\000_000.jpg"
copy "bin\temp\Tiles\optimized\02.jpg" "bin\temp\earth\flashrom\clouds\0\1\000_001.jpg"
copy "bin\temp\Tiles\optimized\03.jpg" "bin\temp\earth\flashrom\clouds\0\1\001_000.jpg"
copy "bin\temp\Tiles\optimized\04.jpg" "bin\temp\earth\flashrom\clouds\0\1\001_001.jpg"
if not exist "bin\temp\earth\flashrom\clouds\1\1\" MkDir "bin\temp\earth\flashrom\clouds\1\1\" && copy "bin\temp\Tiles\optimized\05.jpg" "bin\temp\earth\flashrom\clouds\1\1\000_000.jpg"
copy "bin\temp\Tiles\optimized\06.jpg" "bin\temp\earth\flashrom\clouds\1\1\000_001.jpg"
copy "bin\temp\Tiles\optimized\07.jpg" "bin\temp\earth\flashrom\clouds\1\1\001_000.jpg"
copy "bin\temp\Tiles\optimized\08.jpg" "bin\temp\earth\flashrom\clouds\1\1\001_001.jpg"
if not exist "bin\temp\earth\flashrom\clouds\2\1\" MkDir "bin\temp\earth\flashrom\clouds\2\1\" && copy "bin\temp\Tiles\optimized\09.jpg" "bin\temp\earth\flashrom\clouds\2\1\000_000.jpg"
copy "bin\temp\Tiles\optimized\10.jpg" "bin\temp\earth\flashrom\clouds\2\1\000_001.jpg"
copy "bin\temp\Tiles\optimized\11.jpg" "bin\temp\earth\flashrom\clouds\2\1\001_000.jpg"
copy "bin\temp\Tiles\optimized\12.jpg" "bin\temp\earth\flashrom\clouds\2\1\001_001.jpg"
if not exist "bin\temp\earth\flashrom\clouds\3\1\" MkDir "bin\temp\earth\flashrom\clouds\3\1\" && copy "bin\temp\Tiles\optimized\13.jpg" "bin\temp\earth\flashrom\clouds\3\1\000_000.jpg"
copy "bin\temp\Tiles\optimized\14.jpg" "bin\temp\earth\flashrom\clouds\3\1\000_001.jpg"
copy "bin\temp\Tiles\optimized\15.jpg" "bin\temp\earth\flashrom\clouds\3\1\001_000.jpg"
copy "bin\temp\Tiles\optimized\16.jpg" "bin\temp\earth\flashrom\clouds\3\1\001_001.jpg"
if not exist "bin\temp\earth\flashrom\clouds\4\1\" MkDir "bin\temp\earth\flashrom\clouds\4\1\" && copy "bin\temp\Tiles\optimized\17.jpg" "bin\temp\earth\flashrom\clouds\4\1\000_000.jpg"
copy "bin\temp\Tiles\optimized\18.jpg" "bin\temp\earth\flashrom\clouds\4\1\000_001.jpg"
copy "bin\temp\Tiles\optimized\19.jpg" "bin\temp\earth\flashrom\clouds\4\1\001_000.jpg"
copy "bin\temp\Tiles\optimized\20.jpg" "bin\temp\earth\flashrom\clouds\4\1\001_001.jpg"
if not exist "bin\temp\earth\flashrom\clouds\5\1\" MkDir "bin\temp\earth\flashrom\clouds\5\1\" && copy "bin\temp\Tiles\optimized\21.jpg" "bin\temp\earth\flashrom\clouds\5\1\000_000.jpg"
copy "bin\temp\Tiles\optimized\22.jpg" "bin\temp\earth\flashrom\clouds\5\1\000_001.jpg"
copy "bin\temp\Tiles\optimized\23.jpg" "bin\temp\earth\flashrom\clouds\5\1\001_000.jpg"
copy "bin\temp\Tiles\optimized\24.jpg" "bin\temp\earth\flashrom\clouds\5\1\001_001.jpg"
echo Earth QRC file structure successfully created
:inject_24_parts
@copy bin\earth_ofw.bin bin\temp\earth.bin
echo .
@copy bin\earth_header.bin bin\temp\earth.qrc
echo Completed: template and header files created
@bin\binsert 0x000658F0 bin\temp\Tiles\optimized\01.jpg bin\temp\earth.bin
@bin\binsert 0x00075B10 bin\temp\Tiles\optimized\02.jpg bin\temp\earth.bin
@bin\binsert 0x00083C90 bin\temp\Tiles\optimized\03.jpg bin\temp\earth.bin
@bin\binsert 0x00090B10 bin\temp\Tiles\optimized\04.jpg bin\temp\earth.bin
@bin\binsert 0x0009E390 bin\temp\Tiles\optimized\05.jpg bin\temp\earth.bin
@bin\binsert 0x000ABC20 bin\temp\Tiles\optimized\06.jpg bin\temp\earth.bin
@bin\binsert 0x000B7060 bin\temp\Tiles\optimized\07.jpg bin\temp\earth.bin
@bin\binsert 0x000C3620 bin\temp\Tiles\optimized\08.jpg bin\temp\earth.bin
@bin\binsert 0x000D0570 bin\temp\Tiles\optimized\09.jpg bin\temp\earth.bin
@bin\binsert 0x000E0CA0 bin\temp\Tiles\optimized\10.jpg bin\temp\earth.bin
@bin\binsert 0x000ED3D0 bin\temp\Tiles\optimized\11.jpg bin\temp\earth.bin
echo .
@bin\binsert 0x000F8E60 bin\temp\Tiles\optimized\12.jpg bin\temp\earth.bin
@bin\binsert 0x00102FF0 bin\temp\Tiles\optimized\13.jpg bin\temp\earth.bin
@bin\binsert 0x00110FD0 bin\temp\Tiles\optimized\14.jpg bin\temp\earth.bin
@bin\binsert 0x0011F950 bin\temp\Tiles\optimized\15.jpg bin\temp\earth.bin
@bin\binsert 0x0012C650 bin\temp\Tiles\optimized\16.jpg bin\temp\earth.bin
@bin\binsert 0x0013A890 bin\temp\Tiles\optimized\17.jpg bin\temp\earth.bin
@bin\binsert 0x0014AAF0 bin\temp\Tiles\optimized\18.jpg bin\temp\earth.bin
@bin\binsert 0x001598B0 bin\temp\Tiles\optimized\19.jpg bin\temp\earth.bin
@bin\binsert 0x001681D0 bin\temp\Tiles\optimized\20.jpg bin\temp\earth.bin
@bin\binsert 0x001745C0 bin\temp\Tiles\optimized\21.jpg bin\temp\earth.bin
@bin\binsert 0x00182FC0 bin\temp\Tiles\optimized\22.jpg bin\temp\earth.bin
@bin\binsert 0x001902E0 bin\temp\Tiles\optimized\23.jpg bin\temp\earth.bin
@bin\binsert 0x0019E360 bin\temp\Tiles\optimized\24.jpg bin\temp\earth.bin
echo Completed: jpgs injected into base QRC
:compress_qrc
echo .
@bin\zdrop bin\temp\earth.bin
echo .
echo Completed: QRC compressed with zlib
:add_qrc_header
echo .
@bin\binsert 0x0000000008 bin\temp\earth.bin.zlib bin\temp\earth.qrc 
echo Completed: QRC Header injected
@Move bin\temp\earth.qrc earth.qrc 
echo .
if exist earth.qrc echo QRC successfully created - PROCESS COMPLETED
if not exist earth.qrc echo ERROR - PROCESS FAILED
echo Do you want to return to the options menu
@pause
goto options
:file_not_found_tile
echo Check your files - tile.jpg not found
@pause
goto options
:file_not_found_face
echo Check your files - face.jpg not found
@pause
goto options
:file_not_found_cubemap
echo Check your files - cubemap.jpg not found
@pause
goto options
:file_not_found_logo
echo Check your files - logo.jpg not found
@pause
goto options
:file_not_found_fill
echo Check your files - fill.jpg not found
@pause
goto options
:file_not_found_banner
echo Check your files - banner.jpg not found
@pause
goto options
:file_not_found_0
echo Check your files - 0.jpg not found
@pause
goto options
:file_not_found_1
echo Check your files - 1.jpg not found
@pause
goto options
:file_not_found_2
echo Check your files - 2.jpg not found
@pause
goto options
:file_not_found_3
echo Check your files - 3.jpg not found
@pause
goto options
:file_not_found_4
echo Check your files - 4.jpg not found
@pause
goto options
:file_not_found_5
echo Check your files - 5.jpg not found
@pause
goto options
:files_not_found_tiles
echo Check your files - 01.jpg to 24.jpg not found in bin\temp\optimized\
@pause
goto options
 

Attachments

Last edited:

Similar threads

Back
Top