لوجيك | Logic
Ir al canal en Telegram
#لوجيك | Logic وجهتك البرمجية الأولى بالوطن العربي شروحات - أكواد - وأحدث تقنيات برمجية - وحلول تقنية بواسطه: @TopVeGa
Mostrar más4 855
Suscriptores
-924 horas
+1 0307 días
+4 38430 días
Archivo de publicaciones
4 854
➕ Remove Sign Check ➕ Delete sponsor tracker ➕ Unlock Premium ➕ Remove screenshot restrictions ➕ Save stories button ➕ Enable forward & save media on restricted groups/channel ➕ View once media in ghost mode ➕ Self-destruct timer photo in ghost mode ➕ Download Boost [DNS]
4 854
النسخة ساده غير القديمه محبتش اضيف فيها الشغل بتاع النسخه القديمه ع شان اكسب وقت لاكن لو حابين اجهزهالكم ذي اللي فاتت👍
4 854
4 854
ولا يبن الهطله يعبيط بلاش انا لقبي اللي ذكرته في بوست ليك دا شرف ليك يبن المحترم ووريني شغلك
بالعكس أنا اتمنالكم الخير بس انتوا اللي عاوزيني اركبكم انت والخامسة اللي حواليك👍
4 854
كود تحويل الصور و ملصقات بصيغه PNG
from PIL import Image
import os
from pyrogram import filters, Client
from pyrogram.types import Message
from asyncio import gather
@app.on_message(filters.command(["png تحويل", "تحويل لصوره", "تحويل الصوره"], ""))
async def kailpng(client: Client, message: Message):
reply = message.reply_to_message
if not reply:
return await message.reply("يرجى الرد على صورة أو ملصق لتحويله إلى صيغة PNG")
if not (reply.sticker or reply.photo or reply.document):
return await message.reply(" الملف المرد عليه ليس صورة أو ملصق")
m = await message.reply(" جاري معالجة الصورة وتحويلها إلى PNG...")
try:
if reply.photo:
f = await reply.download(f"photo_{message.id}")
elif reply.sticker:
f = await reply.download(f"sticker_{message.id}")
elif reply.document and reply.document.mime_type.split('/')[0] == 'image':
f = await reply.download(f"doc_{message.id}")
else:
return await m.edit("الملف غير مدعوم. يرجى إرسال صورة أو ملصق")
with Image.open(f) as img:
if img.mode in ('RGBA', 'LA'):
background = Image.new('RGB', img.size, (255, 255, 255))
background.paste(img, mask=img.split()[-1])
img = background
output_path = f"{os.path.splitext(f)[0]}.png"
img.save(output_path, "PNG", optimize=True, quality=95)
while os.path.getsize(output_path) > 128 * 1024:
with Image.open(output_path) as img:
new_size = (int(img.size[0] * 0.9), int(img.size[1] * 0.9))
img = img.resize(new_size, Image.LANCZOS)
img.save(output_path, "PNG", optimize=True, quality=95)
await gather(
message.reply_photo(output_path, caption="تم تحويل الصورة إلى PNG بحجم مضبوط"),
message.reply_document(output_path, caption=" PNG الناتج")
)
except Exception as e:
await message.reply(f"حدث خطأ أثناء المعالجة: {str(e)}")
finally:
await m.delete()
if 'f' in locals() and os.path.exists(f):
os.remove(f)
if 'output_path' in locals() and os.path.exists(output_path):
os.remove(output_path)
بنسبه لي فولت ابو شخه اللي عامل نفسه مبرمج و هو بيتسعين بي عمه شات جبتي متجيش تجيب سيره عمك
كيمي او عمك فوكس او مستر كالي يعبيط
و جدد في الاكواد اللي انت بتعملها بطل عبط نسوان
و بشكر الراجل الجدع اللي علمني و تعلمت منه حاجات كتير اووي بجد اللي زيك قليلين في عالم كله اوساخ
شكر بجد : @TopVeGa
وليا شرف ان مرفوع معاكم هنا وتشرف بمعرفه فيجا
حياتي ؛ @KAILHELL4 854
بالمناسبة اي حد محتاج اي بي اي لوحده يضيفه لملف معين قولي ابعتهولك لو م هتعرف تستخرجة من الكود 👍👍
4 854
البوت شغال بمكتبة yt_dlp المكتبة محتاجه كوكيز اليوتيوب و فيسبوك فقط
هتيجي تقولي يسطا ديي مكتبة يوتيوب هقولك عريها العبلك فيها اتعلم وادرس المكاتب هتفهم انت بتعمل اي كويس
#متحولش_تقلدني_انا_انفذ_وانت_تشتغل_دا_اخرك😎
