Enhance this photo to look like it was captured with a professional DSLR/mirrorless camera using a high-quality telephoto lens. Preserve the person, face, body, clothing, objects, colors, and composition exactly as in the original. Increase natural sharpness, fine details, texture, and resolution. Reduce noise, blur, compression artifacts, and digital softness. Create realistic telephoto lens rendering with natural subject separation, subtle background compression, smooth creamy bokeh, realistic depth of field, and professional optical clarity. Use natural skin texture and realistic facial details. Improve lighting, dynamic range, contrast, highlights and shadows without making the image look artificial or over-edited. Keep colors natural and cinematic. Add subtle professional camera detail and realistic lens characteristics. The final image should look like a genuine high-resolution photograph taken with a professional 70–200mm telephoto lens, not AI-generated or overly sharpened. Do not change the person's identity or facial features. Do not add or remove objects.
~/
~/attachments/68613e56-c239-4151-a38f-d415f2aba9b7
mkdir -p "/tmp/workspace/moon-photo-enhancement/output" [2m&&[0m python - <<'PY' from PIL import Image import cv2, numpy as np src='/tmp/workspace/attachments/68613e56-c239-4151-a38f-d415f2aba9b7/62427.jpg' out='/tmp/workspace/moon-photo-enhancement/output/62427_telephoto_enhanced.jpg' im=cv2.imread(src, cv2.IMREAD_COLOR) if im is None: raise RuntimeError('Could not read source') # Preserve framing, upscale with high-quality interpolation up=cv2.resize(im, None, fx=3, fy=3, interpolation=cv2.INTER_LANCZOS4) # Remove chroma noise in the near-black sky while retaining luminance/edge detail lab=cv2.cvtColor(up, cv2.COLOR_BGR2LAB) L,a,b=cv2.split(lab) a=cv2.fastNlMeansDenoising(a, None, 5, 7, 21) b=cv2.fastNlMeansDenoising(b, None, 5, 7, 21) # Gentle tonal curve: keep black night sky neutral and restrain bright halo Lf=L.astype(np.float32) Lf=np.where(Lf < 18, Lf*0.78, Lf) Lf=np.where(Lf > 225, 225+(Lf-225)*0.45, Lf) L=np.uint8(np.clip(Lf,0,255)) base=cv2.cvtColor(cv2.merge([L,a,b]), cv2.COLOR_LAB2BGR) # Edge-aware fine detail enhancement, deliberately modest to avoid artificial texture blur=cv2.GaussianBlur(base,(0,0),1.2) sharp=cv2.addWeighted(base,1.28,blur,-0.28,0) # Blend sharpened version selectively, mainly high-frequency image detail result=cv2.addWeighted(base,0.42,sharp,0.58,0) # apply light chroma denoise and JPEG quality preservation cv2.imwrite(out, result, [cv2.IMWRITE_JPEG_QUALITY, 97, cv2.IMWRITE_JPEG_OPTIMIZE, 1]) print(out, result.shape) PY file "/tmp/workspace/moon-photo-enhancement/output/62427_telephoto_enhanced.jpg"
mkdir -p "/tmp/workspace/moon-photo-enhancement/output" && python -c "from PIL import Image; import cv2, numpy as np; src='/tmp/workspace/attachments/68613e56-c239-4151-a38f-d415f2aba9b7/62427.jpg'; out='/tmp/workspace/moon-photo-enhancement/output/62427_telephoto_enhanced.jpg'; im=cv2.imread(src, cv2.IMREAD_COLOR); assert im is not None; up=cv2.resize(im,None,fx=3,fy=3,interpolation=cv2.INTER_LANCZOS4); lab=cv2.cvtColor(up,cv2.COLOR_BGR2LAB); L,a,b=cv2.split(lab); a=cv2.fastNlMeansDenoising(a,None,5,7,21); b=cv2.fastNlMeansDenoising(b,None,5,7,21); lf=L.astype(np.float32); lf=np.where(lf<18,lf*0.78,lf); lf=np.where(lf>225,225+(lf-225)*0.45,lf); base=cv2.cvtColor(cv2.merge([np.uint8(np.clip(lf,0,255)),a,b]),cv2.COLOR_LAB2BGR); blur=cv2.GaussianBlur(base,(0,0),1.2); sharp=cv2.addWeighted(base,1.28,blur,-0.28,0); result=cv2.addWeighted(base,0.42,sharp,0.58,0); cv2.imwrite(out,result,[cv2.IMWRITE_JPEG_QUALITY,97,cv2.IMWRITE_JPEG_OPTIMIZE,1]); print(out,result.shape)" && file "/tmp/workspace/moon-photo-enhancement/output/62427_telephoto_enhanced.jpg"
62427 telephoto enhanced
Image · JPG
Create a before-and-after comparison of the original and enhanced photo
~/
~/moon-photo-enhancement
~/moon-photo-enhancement/output
professional photo before after comparison layout best practices
python -c "from PIL import Image,ImageDraw,ImageFont; import os; src='/tmp/workspace/attachments/68613e56-c239-4151-a38f-d415f2aba9b7/62427.jpg'; enhanced='/tmp/workspace/moon-photo-enhancement/output/62427_telephoto_enhanced.jpg'; out='/tmp/workspace/moon-photo-enhancement/output/62427_before_after_comparison.jpg'; before=Image.open(src).convert('RGB').resize((1350,2400),Image.Resampling.LANCZOS); after=Image.open(enhanced).convert('RGB').resize((1350,2400),Image.Resampling.LANCZOS); canvas=Image.new('RGB',(2730,2520),(12,12,14)); canvas.paste(before,(10,110)); canvas.paste(after,(1370,110)); d=ImageDraw.Draw(canvas); font_path='/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf'; font=ImageFont.truetype(font_path,48); small=ImageFont.truetype(font_path,24); d.text((675,38),'BEFORE',font=font,fill=(230,230,230),anchor='mm'); d.text((2045,38),'ENHANCED',font=font,fill=(230,230,230),anchor='mm'); d.line((1360,100,1360,2510),fill=(80,80,85),width=2); d.text((1365,2492),'Original Enhanced: denoised, tone-balanced, and detail-refined',font=small,fill=(180,180,185),anchor='ms'); canvas.save(out,quality=96,optimize=True,subsampling=0); print(out,canvas.size)" && file "/tmp/workspace/moon-photo-enhancement/output/62427_before_after_comparison.jpg"
python -c "from PIL import Image,ImageDraw,ImageFont; src='/tmp/workspace/attachments/68613e56-c239-4151-a38f-d415f2aba9b7/62427.jpg'; enhanced='/tmp/workspace/moon-photo-enhancement/output/62427_telephoto_enhanced.jpg'; out='/tmp/workspace/moon-photo-enhancement/output/62427_before_after_comparison.jpg'; before=Image.open(src).convert('RGB').resize((1350,2400),Image.Resampling.LANCZOS); after=Image.open(enhanced).convert('RGB').resize((1350,2400),Image.Resampling.LANCZOS); canvas=Image.new('RGB',(2730,2520),(12,12,14)); canvas.paste(before,(10,110)); canvas.paste(after,(1370,110)); d=ImageDraw.Draw(canvas); font=ImageFont.load_default(size=48); small=ImageFont.load_default(size=24); d.text((675,38),'BEFORE',font=font,fill=(230,230,230),anchor='mm'); d.text((2045,38),'ENHANCED',font=font,fill=(230,230,230),anchor='mm'); d.line((1360,100,1360,2510),fill=(80,80,85),width=2); d.text((1365,2492),'Original Enhanced: denoised, tone-balanced, and detail-refined',font=small,fill=(180,180,185),anchor='ms'); canvas.save(out,quality=96,optimize=True,subsampling=0); print(out,canvas.size)" && file "/tmp/workspace/moon-photo-enhancement/output/62427_before_after_comparison.jpg"
62427 before after comparison
Image · JPG