forked from 1b-agent/opencadstudio-upstream
feat: bounded huge-image decoding, webp/gif, remote rasters, Georgian/Armenian fonts
Giant rasters (500 MB aerial/GIS TIFFs) decoded whole: multiple GB of RGBA on a wasm heap is tab death, and even desktop silently failed past the image crate's 512 MiB default allocation cap. Decoding now probes the header for dimensions first and runs in tiers — full decode under a per-target budget (512 MB wasm / 4 GB native, enforced through the decoder's allocation limits so oversize fails fast instead of ballooning), Lanczos3 downsample to a display cap (4096² wasm / 8192² native) when the decode fits but the buffer is oversized, and a clear localized refusal naming the dimensions and the limit when it cannot. The probed source dimensions stay the entity's sizing truth, so a downsampled buffer never shrinks the on-paper footprint; PDF export self-corrects (effective DPI derives from placement × stored pixels). Refusals surface once per image through the pick, open, and drop/re-resolve paths. Decode coverage gains webp and gif (pure Rust in image 0.25 — no C, no lockfile churn), with the attach picker and drop filters matching. Remote http(s) raster references now fetch on web: CORS-classified failures name CORS, HTTP errors name the status, bodies over 64 MB and 8 s deadlines are bounded, and fetched bytes join the session source registry (so ARCHIVE can package them and re-resolution reads cache). Georgian and Armenian Noto subsets ship (generation blocks included), so those scripts render instead of skipping; scripts still without subsets remain silently skipped, unchanged.
This commit is contained in:
1 parent
f70d3fda44
commit
ca0d7b962d
31 files changed
+841
-40
No files matched your search
@@ -1874,6 +1874,10 @@ common =
|
||||
.geometric = Geometryczne
|
||||
.dimensional = Wymiarowe
|
||||
.show-hide = Pokaż/Ukryj
|
||||
.remote-image-url-could-not-be-fetched-the-network-request-failed-offline-dns-or-cors = Nie można pobrać zdalnego obrazu „__ocs_fmt_0__”: żądanie sieciowe nie powiodło się (brak połączenia, DNS lub CORS).
|
||||
.remote-image-url-could-not-be-fetched-the-server-returned-http-status = Nie można pobrać zdalnego obrazu „__ocs_fmt_0__”: serwer zwrócił HTTP __ocs_fmt_1__.
|
||||
.remote-image-url-was-not-loaded-it-exceeds-the-64-mb-remote-image-limit = Zdalny obraz „__ocs_fmt_0__” nie został wczytany: przekracza limit 64 MB dla zdalnych obrazów.
|
||||
.remote-image-url-could-not-be-fetched-the-request-timed-out = Nie można pobrać zdalnego obrazu „__ocs_fmt_0__”: upłynął limit czasu żądania.
|
||||
|
||||
errors =
|
||||
.save-warning = Zapisz ostrzeżenie
|
||||
@@ -1991,6 +1995,7 @@ file =
|
||||
.pick-the-file-again-to-load-its-contents = Wybierz plik ponownie, aby załadować jego zawartość do przeglądarki.
|
||||
.adding-folders-is-not-available-in-the-browser = Dodawanie folderów nie jest dostępne w przeglądarce. Zamiast tego dodaj pliki rysunków.
|
||||
.drawing-not-loaded-in-the-browser = Rysunek nie został załadowany w przeglądarce: __ocs_fmt_0__.
|
||||
.image-over-the-decode-limit-cannot-be-attached = "__ocs_fmt_0__" ma __ocs_fmt_1__×__ocs_fmt_2__ px, a jej dekodowanie wymagałoby __ocs_fmt_3__ MB — ponad __ocs_fmt_4__ MB limit obrazu w tej wersji — więc nie może być dołączona. Obrazy w ramach limitu są w razie potrzeby dołączane automatycznie w obniżonej rozdzielczości wyświetlania.
|
||||
|
||||
selection =
|
||||
.cmd-select-objects-count-selected-enter-to-app = __ocs_arg_cmd__ Wybierz obiekty (wybrano __ocs_arg_count__, zastosowano Enter):
|
||||
|
||||
Reference in new issue
Block a user