# ----------------------------- # Resolve Base Directory (Sandbox Safe) # ----------------------------- try: BASE_DIR = os.path.dirname(os.path.abspath(__file__)) except NameError: BASE_DIR = os.getcwd() ASSETS_DIR = os.path.join(BASE_DIR, "assets") OUTPUT_DIR = os.path.join(BASE_DIR, "output") # ----------------------------- # Configuration # ----------------------------- MOCKUP_PATH = os.path.join(ASSETS_DIR, "shirt_mockup.png") DESIGN_PATH = os.path.join(ASSETS_DIR, "design.png") OUTPUT_PATH = os.path.join(OUTPUT_DIR, "shirt_mockup_result.png") # Position and size of the design on the shirt DESIGN_WIDTH_RATIO = 0.45 DESIGN_X_RATIO = 0.275 DESIGN_Y_RATIO = 0.32 DESIGN_OPACITY = 0.95 # ----------------------------- # Asset Creation Helpers # ----------------------------- def ensure_directories(): os.makedirs(ASSETS_DIR, exist_ok=True) os.makedirs(OUTPUT_DIR, exist_ok=True) def create_placeholder_mockup(path): img = Image.new("RGBA", (1200, 1600), (245, 245, 245, 255)) draw = ImageDraw.Draw(img) draw.rectangle([300, 400, 900, 1300], outline=(180, 180, 180), width=6) draw.text((460, 820), "SHIRT MOCKUP", fill=(150, 150, 150)) img.save(path) def create_placeholder_design(path): img = Image.new("RGBA", (800, 600), (0, 0, 0, 0)) draw = ImageDraw.Draw(img) draw.rectangle([100, 100, 700, 500], outline=(0, 0, 0), width=6) draw.text((260, 260), "DESIGN", fill=(0, 0, 0)) img.save(path) # ----------------------------- # Ensure Assets Exist (Sandbox Safe) # ----------------------------- ensure_directories() if not os.path.isfile(MOCKUP_PATH): create_placeholder_mockup(MOCKUP_PATH) if not os.path.isfile(DESIGN_PATH): create_placeholder_design(DESIGN_PATH) # ----------------------------- # Load Images # ----------------------------- mockup = Image.open(MOCKUP_PATH).convert("RGBA") design = Image.open(DESIGN_PATH).convert("RGBA") # ----------------------------- # Resize Design # ----------------------------- shirt_width, shirt_height = mockup.size new_width = int(shirt_width * DESIGN_WIDTH_RATIO) new_height = int(new_width * design.height / design.width) design = design.resize((new_width, new_height), Image.LANCZOS) # ----------------------------- # Adjust Design Opacity # ----------------------------- alpha = design.split()[3] alpha = ImageEnhance.Brightness(alpha).enhance(DESIGN_OPACITY) design.putalpha(alpha) # ----------------------------- # Position Design # ----------------------------- x_pos = int(shirt_width * DESIGN_X_RATIO) y_pos = int(shirt_height * DESIGN_Y_RATIO) # ----------------------------- # Composite Images # ----------------------------- final_image = mockup.copy() final_image.paste(design, (x_pos, y_pos), design) # ----------------------------- # Save Output # ----------------------------- final_image.save(OUTPUT_PATH, "PNG") print("Mockup generated successfully") print(f"Base directory: {BASE_DIR}") print(f"Output file: {OUTPUT_PATH}") # ----------------------------- # Runtime Tests (Do Not Remove) # ----------------------------- def _self_test(): # Directory checks assert os.path.isdir(ASSETS_DIR), "Assets directory missing" assert os.path.isdir(OUTPUT_DIR), "Output directory missing" # File checks assert os.path.isfile(MOCKUP_PATH), "Mockup image missing" assert os.path.isfile(DESIGN_PATH), "Design image missing" assert os.path.isfile(OUTPUT_PATH), "Output image missing" # Image sanity with Image.open(OUTPUT_PATH) as img: assert img.width > 0 and img.height > 0, "Invalid output image" # Placeholder integrity with Image.open(MOCKUP_PATH) as m: assert m.mode == "RGBA", "Mockup image mode invalid" _self_test() """
top of page

About Me

 I absolutely love to make art of any kind. Art to me is a window to your soul. It shows what the artist is trying to convey without actually saying anything. It reflects not only someone's mind but what could be going on in their day to day life that just isn't recognized in any other way. It's a place to be free and express yourself in more ways than one. Art, music, gaming, dancing, producing, rapping, etc. They're all ways to escape the reality that we may or may not be happy in. In my opinion, without the ability to "imagine", this world would be dull.
export202210171831047104_orig.png
1738543900998_f631s9_2_1 (1).jpg

I think it's important for me to keep a healthy relationship with my customers so they share and come back to my art after they've purchased my products. I strive to have an impact on my customer's lives so I think it's important to give my all in each artwork I produce!

An amateur artist trying to earn a name for myself. Being a perfectionist in my craft, I'm meticulous when it comes to my work because I want to make sure everything looks alright, not only to me but to my customers as well. Quality over Quantity is what I always say.
 

I'm always open to opinions and critiques of any kind, even if it's a suggestion or a different point of view. You'll never know who can surprise you with their ideas.

bottom of page