Spaces:
Running

axeronis commited on
Commit
2eb04f9
·
1 Parent(s): 758e80a

Restore original logo with transparency fix

Browse files
frontend/app/page.tsx CHANGED
@@ -368,7 +368,7 @@ export default function HomePage() {
368
  <div className="relative h-full bg-[#0F111A] border border-indigo-500/30 rounded-3xl p-8 md:p-10 shadow-2xl shadow-indigo-500/10 ring-1 ring-indigo-500/20">
369
  <div className="flex items-center gap-4 mb-8">
370
  <div className="w-12 h-12 flex items-center justify-center">
371
- <img src="/logo-symbol.svg" alt="MicroFunnel" className="w-full h-full object-contain drop-shadow-[0_0_15px_rgba(99,102,241,0.5)]" />
372
  </div>
373
  <div>
374
  <h3 className="text-2xl font-bold text-white">MicroFunnel AI</h3>
@@ -591,7 +591,7 @@ export default function HomePage() {
591
  <div className="md:col-span-2">
592
  <div className="flex items-center gap-2 mb-6">
593
  <div className="w-8 h-8 flex items-center justify-center">
594
- <img src="/logo-symbol.svg" alt="MicroFunnel Logo" className="w-full h-full object-contain" />
595
  </div>
596
  <span className="text-white font-bold text-xl tracking-tight">MicroFunnel</span>
597
  </div>
 
368
  <div className="relative h-full bg-[#0F111A] border border-indigo-500/30 rounded-3xl p-8 md:p-10 shadow-2xl shadow-indigo-500/10 ring-1 ring-indigo-500/20">
369
  <div className="flex items-center gap-4 mb-8">
370
  <div className="w-12 h-12 flex items-center justify-center">
371
+ <img src="/logo-symbol-transparent.png" alt="MicroFunnel" className="w-full h-full object-contain drop-shadow-[0_0_15px_rgba(99,102,241,0.5)]" />
372
  </div>
373
  <div>
374
  <h3 className="text-2xl font-bold text-white">MicroFunnel AI</h3>
 
591
  <div className="md:col-span-2">
592
  <div className="flex items-center gap-2 mb-6">
593
  <div className="w-8 h-8 flex items-center justify-center">
594
+ <img src="/logo-symbol-transparent.png" alt="MicroFunnel Logo" className="w-full h-full object-contain" />
595
  </div>
596
  <span className="text-white font-bold text-xl tracking-tight">MicroFunnel</span>
597
  </div>
frontend/public/logo-symbol-transparent.png ADDED

Git LFS Details

  • SHA256: 18a1652413f40fdf1d17ea71c07588ebbbd647877e96e70f3f98110dbfd75d49
  • Pointer size: 131 Bytes
  • Size of remote file: 524 kB
remove_bg.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+ import numpy as np
3
+
4
+ def remove_black_background(input_path, output_path):
5
+ try:
6
+ img = Image.open(input_path).convert("RGBA")
7
+ data = np.array(img)
8
+
9
+ # Calculate distance from black
10
+ # We'll use a threshold. If r,g,b are all low, make it transparent.
11
+ # Or better: use the brightness as alpha?
12
+ # Let's try a simple threshold first, or a linear interpolation for smoothness.
13
+
14
+ red, green, blue, alpha = data.T
15
+
16
+ # Define what is "black"
17
+ # We want to keep the colored parts (purple/blue) and remove the dark background.
18
+ # Let's say if (r+g+b) is low, it's background.
19
+
20
+ # A better approach for "glowing" logos on black:
21
+ # Set alpha based on lightness.
22
+ # But the logo has white/bright parts too.
23
+
24
+ # Let's try to just mask out pure black and near black.
25
+ # (0,0,0) -> Alpha 0
26
+
27
+ # Create a mask where pixels are close to black
28
+ black_areas = (red < 20) & (green < 20) & (blue < 20)
29
+
30
+ # Set alpha to 0 for black areas
31
+ data[..., 3][black_areas.T] = 0
32
+
33
+ # Save
34
+ new_img = Image.fromarray(data)
35
+ new_img.save(output_path)
36
+ print(f"Successfully saved to {output_path}")
37
+
38
+ except Exception as e:
39
+ print(f"Error: {e}")
40
+
41
+ if __name__ == "__main__":
42
+ remove_black_background("frontend/public/logo-symbol.png", "frontend/public/logo-symbol-transparent.png")