feat(app): add image input support and bump to 1.5.0

Allow PNG/JPG/TIFF/BMP/GIF/WebP alongside PDF for preview and DXF conversion.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michael-A-SloanandCursor committed 2026-09-03 17:05:17 -04:00
1 parent 19696937df
commit 2c9829ef8c
9 files changed
+88 -28

No files matched your search

+5 -4
View File
@@ -13,6 +13,7 @@ import ezdxf
import fitz
from ezdxf import units
from app.input_document import open_input_document
from app.raster_vectorize import vectorize_page
@@ -142,13 +143,13 @@ def classify_page(
def classify_pdf_pages(
pdf_path: str | Path,
input_path: str | Path,
pages: list[int] | None = None,
*,
vector_threshold: int = 20,
) -> list[PageClassification]:
"""Classify selected pages of a PDF for the pre-convert review dialog."""
pdf = fitz.open(str(pdf_path))
"""Classify selected pages of a PDF or image for pre-convert review."""
pdf = open_input_document(input_path)
try:
indices = _page_indices(pdf, pages)
return [
@@ -1134,7 +1135,7 @@ def convert_pdf_to_dxf(
pdf_path = Path(pdf_path)
output_path = Path(output_path)
pdf = fitz.open(str(pdf_path))
pdf = open_input_document(pdf_path)
try:
indices = _page_indices(pdf, options.pages)
if not indices: