This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from PIL import Image, ImageEnhance, ImageOps | |
from pathlib import Path | |
import numpy as np | |
def apply_custom_curve(img): | |
"""Aplică o curbă similară cu cea din PhotoScape X Pro""" | |
# Convertește în numpy array | |
img_array = np.array(img) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"color": { | |
"_t": "map", | |
"_v": { | |
"Color": { | |
"_t": "map", | |
"_v": { | |
"autoColor": { | |
"_t": "int", | |
"_v": "3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from PIL import Image, ImageEnhance, ImageFilter, ImageOps | |
from pathlib import Path | |
import numpy as np | |
def enhance_text_clarity(img): | |
"""Îmbunătățește claritatea textului dintr-o imagine""" | |
# Convertește imaginea în numpy array pentru procesare | |
img_array = np.array(img) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageEnhance | |
def make_old_book_style(image_path, output_path): | |
# Deschide imaginea | |
img = Image.open(image_path) | |
# Convertește la RGB dacă nu este deja | |
if img.mode != 'RGB': | |
img = img.convert('RGB') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyPDF2 import PdfReader, PdfWriter | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import letter | |
import io | |
def add_old_paper_background(input_pdf, output_pdf): | |
# Citește PDF-ul original | |
reader = PdfReader(input_pdf) | |
writer = PdfWriter() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inventeaza o SCENA DECLANȘATOARE | |
Instructiuni: | |
1. ANALIZA TEXTULUI ORIGINAL | |
- Identifică tema principală și atmosfera textului | |
- Găsește frazele cheie care transmit esența narațiunii | |
- Observă stările și sentimentele personajului principal | |
- Identifică elementele mistice sau neobișnuite din text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from PyPDF2 import PdfMerger | |
from bs4 import BeautifulSoup | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import A4 | |
from reportlab.pdfbase.ttfonts import TTFont | |
from reportlab.pdfbase import pdfmetrics | |
def convert_html_to_pdf(html_folder_path): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from PyPDF2 import PdfMerger | |
from bs4 import BeautifulSoup | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import A4 | |
from reportlab.pdfbase import pdfmetrics | |
from reportlab.pdfbase.ttfonts import TTFont | |
# Dictionary of common HTML entities and their proper Unicode characters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from PyPDF2 import PdfMerger | |
from bs4 import BeautifulSoup | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import A4 | |
from reportlab.pdfbase import pdfmetrics | |
from reportlab.pdfbase.ttfonts import TTFont | |
# Dictionary of common HTML entities and their proper Unicode characters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from PyPDF2 import PdfMerger | |
from bs4 import BeautifulSoup | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import A4 | |
# Dictionary to convert Romanian diacritics to standard ASCII | |
CHAR_MAP = { | |
# Romanian specific |
NewerOlder