Skip to content

Commit d6574fa

Browse files
committed
Final Commit Before Release
1 parent 2f24b73 commit d6574fa

16 files changed

+120
-60
lines changed
Binary file not shown.
-22.7 KB
Binary file not shown.
Binary file not shown.
-8.18 KB
Binary file not shown.
-5.83 KB
Binary file not shown.
-3.09 KB
Binary file not shown.
Binary file not shown.

assets/optimized/main-window-0.png

29.5 KB
Loading

assets/optimized/main-window-1.png

206 KB
Loading

assets/optimized/main-window-2.png

217 KB
Loading

compress_and_optimize_images.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from PIL import Image
22
import os
3-
import subprocess
43

54
def compress_image(image_path, output_path, quality=85):
65
"""
7-
Compress JPEG and PNG images using Pillow and optipng for PNG.
6+
Compress JPEG and PNG images using Pillow.
87
:param image_path: Input path of the image.
98
:param output_path: Output path where compressed image will be saved.
109
:param quality: Compression quality for JPEG (1-100). Default is 85.
@@ -18,20 +17,16 @@ def compress_image(image_path, output_path, quality=85):
1817
img.save(output_path, 'JPEG', optimize=True, quality=quality)
1918
print(f"JPEG image compressed and saved to {output_path}")
2019
elif img.format == 'PNG':
21-
# Save PNG image (use Pillow's save method)
20+
# Save PNG image with Pillow's built-in optimization
2221
img.save(output_path, 'PNG', optimize=True)
23-
print(f"PNG image saved to {output_path}")
24-
25-
# Further compress PNG using optipng for better optimization
26-
subprocess.run(['optipng', '-o2', output_path], check=True)
27-
print(f"PNG optimized with optipng and saved to {output_path}")
22+
print(f"PNG image compressed and saved to {output_path}")
2823
else:
2924
print(f"Unsupported image format: {img.format}")
30-
25+
3126
# Remove the original file after compression
3227
os.remove(image_path)
3328
print(f"Original file {image_path} deleted.")
34-
29+
3530
except Exception as e:
3631
print(f"Error compressing image: {e}")
3732

@@ -46,13 +41,19 @@ def optimize_images_in_directory(input_directory, output_directory):
4641

4742
# Iterate over all files in the input directory
4843
for filename in os.listdir(input_directory):
49-
if filename.endswith('.jpg') or filename.endswith('.jpeg') or filename.endswith('.png'):
44+
if filename.lower().endswith(('.jpg', '.jpeg', '.png')):
5045
input_path = os.path.join(input_directory, filename)
5146
output_path = os.path.join(output_directory, filename)
5247

48+
# Ensure proper path handling for different operating systems
49+
input_path = os.path.normpath(input_path)
50+
output_path = os.path.normpath(output_path)
51+
5352
compress_image(input_path, output_path)
5453

5554
# Example usage
56-
input_dir = './assets' # Folder with original images
57-
output_dir = './assets/optimized' # Folder to store optimized images
58-
optimize_images_in_directory(input_dir, output_dir)
55+
if __name__ == "__main__":
56+
input_dir = os.path.normpath('./assets') # Folder with original images
57+
output_dir = os.path.normpath('./assets/optimized') # Folder to store optimized images
58+
59+
optimize_images_in_directory(input_dir, output_dir)

screenshots/screenshot1-main.png

-221 KB
Binary file not shown.

screenshots/screenshot2-about.png

-31.3 KB
Binary file not shown.

screenshots/screenshot3-main.png

-92.4 KB
Binary file not shown.
-7.47 KB
Binary file not shown.

war-thunder-camouflage-installer/index.html

Lines changed: 105 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ <h1 class="text-2xl font-bold neon-text">War Thunder Camouflage Installer</h1>
8383
<a href="#features" class="text-lg hover:text-blue-300">Features</a>
8484
<a href="#download" class="text-lg hover:text-blue-300">Download</a>
8585
<a href="#about" class="text-lg hover:text-blue-300">About</a>
86-
<a href="registration.html" class="text-lg hover:text-blue-300">Register</a>
8786
</nav>
8887
</div>
8988
</header>
@@ -97,7 +96,6 @@ <h2 class="text-6xl md:text-7xl lg:text-8xl font-extrabold neon-text mb-6">War T
9796
<div class="highlight-box">
9897
<h3 class="text-2xl md:text-3xl text-yellow-300 font-bold mb-4">🚀 Open Source Project 🚀</h3>
9998
<p class="text-lg md:text-xl text-white mb-4">Join our community and contribute to this exciting project!</p>
100-
<a href="registration.html" class="inline-block bg-yellow-600 hover:bg-yellow-700 text-white font-semibold py-4 px-8 rounded-lg shadow-lg text-xl transition duration-300 ease-in-out transform hover:scale-105 mt-6">Learn More and Register</a>
10199
</div>
102100

103101
<p class="text-xl md:text-2xl text-gray-400 max-w-3xl mx-auto my-8">Transform your vehicles with ease. Browse, manage, and apply custom skins in just a few clicks.</p>
@@ -106,55 +104,100 @@ <h3 class="text-2xl md:text-3xl text-yellow-300 font-bold mb-4">🚀 Open Source
106104
</div>
107105
</section>
108106

109-
<!-- Features Section -->
110-
<section id="features" class="bg-black bg-opacity-75 py-16">
111-
<div class="container mx-auto px-4">
112-
<h3 class="text-3xl md:text-4xl font-bold mb-8 neon-text text-center">Key Features</h3>
113-
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
114-
<div class="bg-gray-800 p-6 rounded shadow-md transform transition duration-500 hover:scale-105">
115-
<h4 class="text-2xl font-bold mb-4">Extensive Database</h4>
116-
<ul class="list-disc list-inside text-gray-400">
117-
<li>Browse through a vast collection of custom camouflages</li>
118-
<li>Supports various War Thunder vehicles</li>
119-
<li>Regularly updated with new skins</li>
120-
</ul>
121-
</div>
122-
<div class="bg-gray-800 p-6 rounded shadow-md transform transition duration-500 hover:scale-105">
123-
<h4 class="text-2xl font-bold mb-4">Advanced Search</h4>
124-
<ul class="list-disc list-inside text-gray-400">
125-
<li>Powerful search functionality</li>
126-
<li>Filter by tags and custom tags</li>
127-
<li>Sort and organize camouflages easily</li>
128-
</ul>
129-
</div>
130-
<div class="bg-gray-800 p-6 rounded shadow-md transform transition duration-500 hover:scale-105">
131-
<h4 class="text-2xl font-bold mb-4">Easy Installation</h4>
132-
<ul class="list-disc list-inside text-gray-400">
133-
<li>One-click installation process</li>
134-
<li>Customizable directory structure</li>
135-
<li>Import local skins with ease</li>
136-
</ul>
137-
</div>
107+
<!-- Features Section -->
108+
<section id="features" class="bg-black bg-opacity-75 py-16">
109+
<div class="container mx-auto px-4">
110+
<h3 class="text-3xl md:text-4xl font-bold mb-8 neon-text text-center">Key Features</h3>
111+
112+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
113+
<!-- Card 1: Camouflage Database Management -->
114+
<div class="bg-gray-800 p-6 rounded shadow-md">
115+
<h4 class="text-2xl font-bold mb-4">Camouflage Database Management</h4>
116+
<ul class="list-disc list-inside text-gray-400">
117+
<li>Browse and search through a database of War Thunder camouflages</li>
118+
<li>View detailed information about each camouflage, including descriptions, and file size</li>
119+
<li>Display camouflage images in a grid layout</li>
120+
</ul>
121+
</div>
122+
123+
<!-- Card 2: Advanced Search & Filtering -->
124+
<div class="bg-gray-800 p-6 rounded shadow-md">
125+
<h4 class="text-2xl font-bold mb-4">Advanced Search & Filtering</h4>
126+
<ul class="list-disc list-inside text-gray-400">
127+
<li>Search camouflages by name or description</li>
128+
<li>Filter camouflages using tags and hashtags</li>
129+
<li>Customizable tag system with the ability to add custom tags</li>
130+
</ul>
131+
</div>
132+
133+
<!-- Card 3: User-Friendly Interface -->
134+
<div class="bg-gray-800 p-6 rounded shadow-md">
135+
<h4 class="text-2xl font-bold mb-4">User-Friendly Interface</h4>
136+
<ul class="list-disc list-inside text-gray-400">
137+
<li>Intuitive navigation between camouflages</li>
138+
<li>Detailed view and main view options for browsing camouflages</li>
139+
<li>Pagination for easy navigation through large sets of results</li>
140+
</ul>
141+
</div>
142+
143+
<!-- Card 4: Skin Installation & Management -->
144+
<div class="bg-gray-800 p-6 rounded shadow-md">
145+
<h4 class="text-2xl font-bold mb-4">Skin Installation & Management</h4>
146+
<ul class="list-disc list-inside text-gray-400">
147+
<li>One-click installation of selected camouflages</li>
148+
<li>Custom directory structure support for organized skin management</li>
149+
<li>Option to import local skin files</li>
150+
</ul>
151+
</div>
152+
153+
<!-- Card 5: Performance & Customization Options -->
154+
<div class="bg-gray-800 p-6 rounded shadow-md">
155+
<h4 class="text-2xl font-bold mb-4">Performance & Customization Options</h4>
156+
<ul class="list-disc list-inside text-gray-400">
157+
<li>Multithreaded image loading for smooth performance</li>
158+
<li>Ability to set and change the War Thunder skins directory</li>
159+
<li>Customizable file structure for installed skins</li>
160+
</ul>
161+
</div>
162+
163+
<!-- Card 6: Error Handling & Utilities -->
164+
<div class="bg-gray-800 p-6 rounded shadow-md">
165+
<h4 class="text-2xl font-bold mb-4">Error Handling & Utilities</h4>
166+
<ul class="list-disc list-inside text-gray-400">
167+
<li>Clear error messages and status updates</li>
168+
<li>Export and import tag collections for backup or sharing</li>
169+
<li>About section with version information</li>
170+
</ul>
138171
</div>
139172
</div>
140-
</section>
173+
</div>
174+
</section>
141175

142-
<!-- Screenshots Section -->
143-
<section class="py-16 bg-black bg-opacity-75">
144-
<div class="container mx-auto px-4 text-center">
145-
<h3 class="text-3xl md:text-4xl font-bold mb-8 neon-text">User Interface</h3>
146-
<div class="grid-container">
147-
<div class="grid-item">
148-
<img src="../screenshots/screenshot1-main.png" alt="Main Interface" class="rounded shadow-lg">
149-
<p class="mt-2 text-gray-400">Main application interface</p>
150-
</div>
151-
<div class="grid-item">
152-
<img src="../screenshots/screenshot2-about.png" alt="About Section" class="rounded shadow-lg">
153-
<p class="mt-2 text-gray-400">About section with developer information</p>
154-
</div>
176+
<!-- Screenshots Section -->
177+
<section class="py-16 bg-black bg-opacity-75">
178+
<div class="container mx-auto text-center">
179+
<h3 class="text-3xl md:text-4xl font-bold mb-8 neon-text">User Interface</h3>
180+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 justify-center items-center">
181+
<!-- Image 1: The window on initial load -->
182+
<div class="grid-item">
183+
<img src="../assets/optimized/main-window-0.png" alt="Window on initial load" class="rounded shadow-lg mx-auto">
184+
<p class="mt-4 text-lg md:text-xl text-gray-400">The window on initial load</p>
185+
</div>
186+
187+
<!-- Image 2: Main Window -->
188+
<div class="grid-item">
189+
<img src="../assets/optimized/main-window-1.png" alt="Main Window" class="rounded shadow-lg mx-auto">
190+
<p class="mt-4 text-lg md:text-xl text-gray-400">Main window</p>
191+
</div>
192+
193+
<!-- Image 3: Detailed View -->
194+
<div class="grid-item">
195+
<img src="../assets/optimized/main-window-2.png" alt="Detailed View" class="rounded shadow-lg mx-auto">
196+
<p class="mt-4 text-lg md:text-xl text-gray-400">Detailed view with sidebar, tagging, and search</p>
155197
</div>
156198
</div>
157-
</section>
199+
</div>
200+
</section>
158201

159202
<!-- Download Section -->
160203
<section id="download" class="py-16">
@@ -167,6 +210,22 @@ <h3 class="text-3xl md:text-4xl font-bold mb-8 neon-text">Get Started</h3>
167210
</div>
168211
</section>
169212

213+
<!-- Installation Instructions Section -->
214+
<section id="installation" class="bg-black bg-opacity-75 py-16">
215+
<div class="container mx-auto px-4 text-center">
216+
<h3 class="text-3xl md:text-4xl font-bold mb-8 neon-text">How to Install</h3>
217+
<p class="text-xl mb-4 text-gray-400">To install the War Thunder Camouflage Installer, follow these steps:</p>
218+
<div class="highlight-box bg-gray-800 p-6 rounded shadow-md mx-auto text-left">
219+
<ul class="list-disc list-inside text-gray-300">
220+
<li>Download the latest <strong>.exe</strong> and <strong>.db</strong> files from the <a href="#download" class="text-blue-400 underline hover:text-blue-600">Download</a> section.</li>
221+
<li>Ensure both files are in the **same directory**.</li>
222+
<li>Navigate to the folder and run the <strong>.exe</strong> file to start the application.</li>
223+
<li>If you're using the source code, you'll need to <strong>compile the project</strong> manually. Instructions are provided on the <a href="https://github.com/hasnocool/war_thunder_camouflage_installer" class="text-blue-400 underline hover:text-blue-600">GitHub page</a>.</li>
224+
</ul>
225+
</div>
226+
</div>
227+
</section>
228+
170229
<!-- About Section -->
171230
<section id="about" class="bg-black bg-opacity-75 py-16">
172231
<div class="container mx-auto px-4 text-center">

0 commit comments

Comments
 (0)