mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-03 15:21:17 -05:00
Document Info: Linked Images and Embedded Images show each image's format, resolution and memory
A Linked Images row now gives the image's format, its size in pixels, its resolution at the size it is placed at and its file (`PNG; 1200 × 800 px; 150 ppi — /art/photo.png`, both axes when they differ, `resolution unavailable` when the transform leaves the image no area). An Embedded Images row gives the format, the size and the estimated memory of the 8-bit RGBA pixels the image is drawn from (`PNG; 1200 × 800 px; estimated memory 3.7 MiB`). The format comes from a linked file's extension, else from the type of the pixels the document holds, and reads `Unknown format` when neither is known. document.info's imageObjects entries gain format, effectivePpi, memoryBytes and storedBytes (the encoded bytes an embedded image keeps). The Document Info report and Package's report write the same rows, and the panel shows them in the interface language, with the new templates in every complete catalog.
This commit is contained in:
@@ -845,8 +845,9 @@ pub(crate) const MAX_IMPORTED_PRESETS: usize = 1000;
|
||||
pub(crate) use addons::{DecodedImages, refresh_color_masks};
|
||||
/// Packaging Tools' blanks and the objects their print leaves out, for the Fold Preview window.
|
||||
pub use addons::{fold_source, print_hidden};
|
||||
/// Document Info's category titles and the Objects category's count labels.
|
||||
pub use docinfo::{CATEGORIES, OBJECT_LABELS};
|
||||
/// Document Info's category titles, the Objects category's count labels, and how its image rows
|
||||
/// write a resolution and a number of bytes.
|
||||
pub use docinfo::{CATEGORIES, OBJECT_LABELS, byte_size, ppi_number};
|
||||
pub use docmenu::guide_indexes;
|
||||
pub(crate) use edit::{Unrecorded, settle_interaction, typing_in_progress};
|
||||
pub(crate) use object::bounds_rewrite;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2384,6 +2384,12 @@ font-technology Variable Променливи
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable разделителната способност не е налична
|
||||
estimated memory {memory} приблизителна памет {memory}
|
||||
memory unavailable паметта не е налична
|
||||
Unknown format Неизвестен формат
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3676,6 +3676,12 @@ theme Appearance Izgled
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable rezolucija nije dostupna
|
||||
estimated memory {memory} procijenjena memorija {memory}
|
||||
memory unavailable memorija nije dostupna
|
||||
Unknown format Nepoznat format
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3434,6 +3434,12 @@ digits Malayalam Malaiàlam
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppp
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppp
|
||||
resolution unavailable resolució no disponible
|
||||
estimated memory {memory} memòria estimada {memory}
|
||||
memory unavailable memòria no disponible
|
||||
Unknown format Format desconegut
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3777,6 +3777,12 @@ theme Appearance Motiv
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable rozlišení není k dispozici
|
||||
estimated memory {memory} odhadovaná paměť {memory}
|
||||
memory unavailable paměť není k dispozici
|
||||
Unknown format Neznámý formát
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6257,6 +6257,12 @@ theme Appearance Udseende
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable opløsning ikke tilgængelig
|
||||
estimated memory {memory} anslået hukommelse {memory}
|
||||
memory unavailable hukommelse ikke tilgængelig
|
||||
Unknown format Ukendt format
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2435,6 +2435,12 @@ file-filter Templates Vorlagen
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable Auflösung nicht verfügbar
|
||||
estimated memory {memory} geschätzter Speicher {memory}
|
||||
memory unavailable Speicher nicht verfügbar
|
||||
Unknown format Unbekanntes Format
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2088,6 +2088,12 @@ font-technology Variable Μεταβλητές
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}· {size}· {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable η ανάλυση δεν είναι διαθέσιμη
|
||||
estimated memory {memory} εκτιμώμενη μνήμη {memory}
|
||||
memory unavailable η μνήμη δεν είναι διαθέσιμη
|
||||
Unknown format Άγνωστη μορφή
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2478,6 +2478,12 @@ font-technology Variable Variables
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppp
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppp
|
||||
resolution unavailable resolución no disponible
|
||||
estimated memory {memory} memoria estimada {memory}
|
||||
memory unavailable memoria no disponible
|
||||
Unknown format Formato desconocido
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3714,6 +3714,12 @@ theme Appearance Ulkoasu
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable tarkkuus ei saatavilla
|
||||
estimated memory {memory} arvioitu muisti {memory}
|
||||
memory unavailable muisti ei saatavilla
|
||||
Unknown format Tuntematon muoto
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2466,6 +2466,12 @@ font-technology Variable Variables
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppp
|
||||
{format}; {size}; {detail} {format}, {size}, {detail}
|
||||
{x} × {y} ppi {x} × {y} ppp
|
||||
resolution unavailable résolution indisponible
|
||||
estimated memory {memory} mémoire estimée {memory}
|
||||
memory unavailable mémoire indisponible
|
||||
Unknown format Format inconnu
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5205,6 +5205,12 @@ antiAlias Sharp શાર્પ
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable રિઝોલ્યુશન ઉપલબ્ધ નથી
|
||||
estimated memory {memory} અંદાજિત મેમરી {memory}
|
||||
memory unavailable મેમરી ઉપલબ્ધ નથી
|
||||
Unknown format અજ્ઞાત ફોર્મેટ
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 72 and column 5.
|
@@ -3979,6 +3979,12 @@ arrowhead Feather पंख
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable रिज़ॉल्यूशन उपलब्ध नहीं
|
||||
estimated memory {memory} अनुमानित मेमोरी {memory}
|
||||
memory unavailable मेमोरी उपलब्ध नहीं
|
||||
Unknown format अज्ञात फ़ॉर्मेट
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3316,6 +3316,12 @@ file-filter Templates Sablonok
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable a felbontás nem érhető el
|
||||
estimated memory {memory} becsült memória {memory}
|
||||
memory unavailable a memória nem érhető el
|
||||
Unknown format Ismeretlen formátum
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4125,6 +4125,12 @@ theme Appearance Tampilan
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable resolusi tidak tersedia
|
||||
estimated memory {memory} perkiraan memori {memory}
|
||||
memory unavailable memori tidak tersedia
|
||||
Unknown format Format tidak dikenal
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2520,6 +2520,12 @@ file-filter Templates Modelli
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable risoluzione non disponibile
|
||||
estimated memory {memory} memoria stimata {memory}
|
||||
memory unavailable memoria non disponibile
|
||||
Unknown format Formato sconosciuto
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2703,6 +2703,12 @@ antiAlias Sharp シャープ
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}、{size}、{detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable 解像度を取得できません
|
||||
estimated memory {memory} 推定メモリ {memory}
|
||||
memory unavailable メモリを取得できません
|
||||
Unknown format 不明な形式
|
||||
{kind}, {instances} {kind}、{instances}
|
||||
{kind}, {rows} × {cols} {kind}、{rows} × {cols}
|
||||
{grid}, {instances} {grid}、{instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5535,6 +5535,12 @@ theme Appearance იერსახე
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable გარჩევადობა მიუწვდომელია
|
||||
estimated memory {memory} სავარაუდო მეხსიერება {memory}
|
||||
memory unavailable მეხსიერება მიუწვდომელია
|
||||
Unknown format უცნობი ფორმატი
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2693,6 +2693,12 @@ antiAlias Sharp 날카롭게
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable 해상도를 알 수 없음
|
||||
estimated memory {memory} 예상 메모리 {memory}
|
||||
memory unavailable 메모리를 알 수 없음
|
||||
Unknown format 알 수 없는 형식
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4123,6 +4123,12 @@ theme Appearance Vormgeving
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable resolutie niet beschikbaar
|
||||
estimated memory {memory} geschat geheugen {memory}
|
||||
memory unavailable geheugen niet beschikbaar
|
||||
Unknown format Onbekend formaat
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3656,6 +3656,12 @@ theme Appearance Wygląd
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable rozdzielczość niedostępna
|
||||
estimated memory {memory} szacowana pamięć {memory}
|
||||
memory unavailable pamięć niedostępna
|
||||
Unknown format Nieznany format
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2015,6 +2015,12 @@ antiAlias Sharp Nítido
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppp
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppp
|
||||
resolution unavailable resolução indisponível
|
||||
estimated memory {memory} memória estimada {memory}
|
||||
memory unavailable memória indisponível
|
||||
Unknown format Formato desconhecido
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2504,6 +2504,12 @@ file-filter Templates Шаблоны
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable разрешение недоступно
|
||||
estimated memory {memory} оценка памяти {memory}
|
||||
memory unavailable память недоступна
|
||||
Unknown format Неизвестный формат
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2406,6 +2406,12 @@ font-technology Variable Variabla
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} – {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable upplösning inte tillgänglig
|
||||
estimated memory {memory} uppskattat minne {memory}
|
||||
memory unavailable minne inte tillgängligt
|
||||
Unknown format Okänt format
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1061,12 +1061,12 @@ fn document_info_labels_are_in_complete_catalogs() {
|
||||
}
|
||||
|
||||
/// The values Document Info makes and shows in the interface language: the font states and
|
||||
/// embedding permissions, the templates of the font, image, raster effects and Repeat object
|
||||
/// values, the names of gradients named by their kind, the counted uses, instances, rows and
|
||||
/// embedding permissions, the templates of the font, image (format, size, resolution and memory),
|
||||
/// raster effects and Repeat object values, the names of gradients named by their kind, the counted uses, instances, rows and
|
||||
/// columns, and the transparency settings' values.
|
||||
#[test]
|
||||
fn document_info_values_are_in_complete_catalogs() {
|
||||
const VALUES: [&str; 22] = [
|
||||
const VALUES: [&str; 28] = [
|
||||
"unknown type",
|
||||
"{type}; {uses}",
|
||||
"built in",
|
||||
@@ -1081,6 +1081,12 @@ fn document_info_values_are_in_complete_catalogs() {
|
||||
"{width} × {height} px",
|
||||
"{size} — {file}",
|
||||
"{n} ppi",
|
||||
"{format}; {size}; {detail}",
|
||||
"{x} × {y} ppi",
|
||||
"resolution unavailable",
|
||||
"estimated memory {memory}",
|
||||
"memory unavailable",
|
||||
"Unknown format",
|
||||
"{kind}, {instances}",
|
||||
"{kind}, {rows} × {cols}",
|
||||
"{grid}, {instances}",
|
||||
|
||||
@@ -7178,6 +7178,12 @@ theme Appearance Görünüm
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable çözünürlük kullanılamıyor
|
||||
estimated memory {memory} tahmini bellek {memory}
|
||||
memory unavailable bellek kullanılamıyor
|
||||
Unknown format Bilinmeyen biçim
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2512,6 +2512,12 @@ file-filter Templates Шаблони
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable роздільна здатність недоступна
|
||||
estimated memory {memory} орієнтовна пам’ять {memory}
|
||||
memory unavailable пам’ять недоступна
|
||||
Unknown format Невідомий формат
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3139,6 +3139,12 @@ digits Hindi Hindi
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format}; {size}; {detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable không có độ phân giải
|
||||
estimated memory {memory} bộ nhớ ước tính {memory}
|
||||
memory unavailable không có thông tin bộ nhớ
|
||||
Unknown format Định dạng không xác định
|
||||
{kind}, {instances} {kind}, {instances}
|
||||
{kind}, {rows} × {cols} {kind}, {rows} × {cols}
|
||||
{grid}, {instances} {grid}, {instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2367,6 +2367,12 @@ file-filter Templates 模板
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format};{size};{detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable 分辨率不可用
|
||||
estimated memory {memory} 估计内存 {memory}
|
||||
memory unavailable 内存不可用
|
||||
Unknown format 未知格式
|
||||
{kind}, {instances} {kind},{instances}
|
||||
{kind}, {rows} × {cols} {kind},{rows} × {cols}
|
||||
{grid}, {instances} {grid},{instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3805,6 +3805,12 @@ liquify-list-end {0}, {1} {0}和{1}
|
||||
{width} × {height} px {width} × {height} px
|
||||
{size} — {file} {size} — {file}
|
||||
{n} ppi {n} ppi
|
||||
{format}; {size}; {detail} {format};{size};{detail}
|
||||
{x} × {y} ppi {x} × {y} ppi
|
||||
resolution unavailable 解析度無法使用
|
||||
estimated memory {memory} 估計記憶體 {memory}
|
||||
memory unavailable 記憶體無法使用
|
||||
Unknown format 未知格式
|
||||
{kind}, {instances} {kind},{instances}
|
||||
{kind}, {rows} × {cols} {kind},{rows} × {cols}
|
||||
{grid}, {instances} {grid},{instances}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -226,11 +226,32 @@ fn font_detail_value(e: &Value) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
/// An `imageObjects` entry as Linked Images and Embedded Images show it: its size in pixels, and
|
||||
/// for a linked image the file it shows.
|
||||
/// An `imageObjects` entry as Linked Images and Embedded Images show it: its format, its size in
|
||||
/// pixels, and for a linked image its resolution and the file it shows, for an embedded one the
|
||||
/// memory its pixels take. Format names and file names stay as they are.
|
||||
fn image_value(o: &Value) -> Option<String> {
|
||||
use vectorcraft_engine::cmd::{byte_size, ppi_number};
|
||||
let format = match &o["format"] {
|
||||
Value::Null => tl!("Unknown format"),
|
||||
f => f.as_str()?,
|
||||
};
|
||||
let size = fill(tl!("{width} × {height} px"), &[("width", &o["width"].as_u64()?.to_string()), ("height", &o["height"].as_u64()?.to_string())]);
|
||||
if o["linked"] == true { Some(fill(tl!("{size} — {file}"), &[("size", &size), ("file", o["file"].as_str()?)])) } else { Some(size) }
|
||||
let detail = if o["linked"] == true {
|
||||
match &o["effectivePpi"] {
|
||||
Value::Null => tl!("resolution unavailable").to_string(),
|
||||
ppi => {
|
||||
let (x, y) = (ppi_number(ppi.get(0)?.as_f64()?), ppi_number(ppi.get(1)?.as_f64()?));
|
||||
if x == y { fill(tl!("{n} ppi"), &[("n", &x)]) } else { fill(tl!("{x} × {y} ppi"), &[("x", &x), ("y", &y)]) }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
match &o["memoryBytes"] {
|
||||
Value::Null => tl!("memory unavailable").to_string(),
|
||||
bytes => fill(tl!("estimated memory {memory}"), &[("memory", &byte_size(bytes.as_u64()?))]),
|
||||
}
|
||||
};
|
||||
let shown = fill(tl!("{format}; {size}; {detail}"), &[("format", format), ("size", &size), ("detail", &detail)]);
|
||||
if o["linked"] == true { Some(fill(tl!("{size} — {file}"), &[("size", &shown), ("file", o["file"].as_str()?)])) } else { Some(shown) }
|
||||
}
|
||||
|
||||
/// A `repeatObjects` entry as Repeat Objects shows it: its kind and the number of instances it
|
||||
@@ -597,7 +618,7 @@ mod tests {
|
||||
let gone = fonts.iter().find(|(l, _)| l.starts_with("Qx Absent Family")).unwrap_or_else(|| panic!("{fonts:?}")).1.clone();
|
||||
assert!(gone == "fehlt" || gone.starts_with("fehlt: angezeigt in "), "{gone}");
|
||||
assert_eq!(images.len(), 1);
|
||||
assert!(images[0].1.ends_with(" px") && images[0].1.contains(" × "), "{images:?}");
|
||||
assert!(images[0].1.contains(" × ") && images[0].1.contains(" px; geschätzter Speicher ") && images[0].1.ends_with(" B"), "{images:?}");
|
||||
// A swatch named like a kind keeps its name; the gradient named by its kind is translated.
|
||||
assert_eq!(value(&gradients, "Glow"), "Linear gradient, Radialer Verlauf");
|
||||
assert_eq!(value(&selected, "Glow"), "Linear gradient, Radialer Verlauf");
|
||||
@@ -650,6 +671,54 @@ mod tests {
|
||||
assert!(report.contains("Source Sans 3 Regular: TrueType; 2 uses\n"), "{report}");
|
||||
}
|
||||
|
||||
/// Linked Images and Embedded Images show each image's format, size, resolution or memory in
|
||||
/// the interface language, the format and file names as they are; values that do not fit an
|
||||
/// image entry are shown as `document.info` gives the row.
|
||||
#[test]
|
||||
fn image_details_show_in_the_interface_language() {
|
||||
let linked = |format: Value, ppi: Value| json!({"name": "a.png", "width": 3, "height": 2, "linked": true, "file": "/art/a.png", "format": format, "effectivePpi": ppi});
|
||||
let embedded =
|
||||
|memory: Value| json!({"name": "Image", "width": 3, "height": 2, "linked": false, "file": null, "format": "PNG", "memoryBytes": memory});
|
||||
let shown = || {
|
||||
[
|
||||
linked(json!("PNG"), json!([150.0, 150.0])),
|
||||
linked(json!(null), json!([144.0, 72.0])),
|
||||
linked(json!("TIFF"), json!(null)),
|
||||
embedded(json!(1536)),
|
||||
embedded(json!(null)),
|
||||
]
|
||||
.map(|o| image_value(&o))
|
||||
};
|
||||
assert_eq!(
|
||||
shown(),
|
||||
[
|
||||
"PNG; 3 × 2 px; 150 ppi — /art/a.png",
|
||||
"Unknown format; 3 × 2 px; 144 × 72 ppi — /art/a.png",
|
||||
"TIFF; 3 × 2 px; resolution unavailable — /art/a.png",
|
||||
"PNG; 3 × 2 px; estimated memory 1.5 KiB",
|
||||
"PNG; 3 × 2 px; memory unavailable",
|
||||
]
|
||||
.map(|v| Some(v.to_string()))
|
||||
);
|
||||
let Some(de) = crate::i18n::Lang::from_code("de") else { panic!("no German catalog") };
|
||||
crate::i18n::set_current(de);
|
||||
let german = shown();
|
||||
crate::i18n::set_current(crate::i18n::Lang::EN);
|
||||
assert_eq!(
|
||||
german,
|
||||
[
|
||||
"PNG; 3 × 2 px; 150 ppi – /art/a.png",
|
||||
"Unbekanntes Format; 3 × 2 px; 144 × 72 ppi – /art/a.png",
|
||||
"TIFF; 3 × 2 px; Auflösung nicht verfügbar – /art/a.png",
|
||||
"PNG; 3 × 2 px; geschätzter Speicher 1.5 KiB",
|
||||
"PNG; 3 × 2 px; Speicher nicht verfügbar",
|
||||
]
|
||||
.map(|v| Some(v.to_string()))
|
||||
);
|
||||
assert_eq!(image_value(&linked(json!("PNG"), json!([150.0]))), None);
|
||||
assert_eq!(image_value(&embedded(json!("big"))), None);
|
||||
}
|
||||
|
||||
/// Document shows the transparency settings with their values in the interface language (two
|
||||
/// custom grid colors as they are), and while the Artboard tool is the current tool the
|
||||
/// artboards it has selected, following its selection without an edit to the document.
|
||||
|
||||
+9
-3
@@ -9948,9 +9948,15 @@ type in a mask or in a symbol's or pattern's art once however many objects show
|
||||
(`[{font, match, family, style, file, embedding}]`: each font of `fonts`, in order, as the fontDetails category's rows give it: `match` is `exact`, `style` (a style the family lacks, shown in
|
||||
`family` `style`), `missingWithFallback` (not installed, shown in `family` `style`) or `missing`; `file` is the face's
|
||||
file name, null for a built-in face; `embedding` is `allowed`, `editing`, `previewPrint` or `forbidden`, null when no
|
||||
face is found), `imageObjects` (`[{name, width, height, linked, file}]`: the image objects in the order the
|
||||
linkedImages and embeddedImages categories list them, with the file a linked image's row shows and null for an
|
||||
embedded one), `document.unitId` (the document's units as Preferences › Units names them, such as `millimeters`, beside
|
||||
face is found), `imageObjects` (`[{name, width, height, linked, file, format, effectivePpi, memoryBytes,
|
||||
storedBytes}]`: the image objects in the order the linkedImages and embeddedImages categories list them, with the file
|
||||
a linked image's row shows and null for an embedded one; `format` is a linked image's file format by its extension,
|
||||
else the format of the pixels the document holds, null when neither is known; `effectivePpi` is `[x, y]`, the pixels
|
||||
per inch at the size the image is placed at (a distorted image measured at its middle), null when it has no area;
|
||||
`memoryBytes` is, for an embedded image, width × height × 4, the bytes of the 8-bit RGBA pixels it is drawn from, and
|
||||
`storedBytes` is the bytes of the encoded image the document holds; both are null for a linked image; a linkedImages row reads
|
||||
`PNG; 1200 × 800 px; 150 ppi — /art/photo.png` and an embeddedImages row `PNG; 1200 × 800 px; estimated memory 3.7 MiB`,
|
||||
with `Unknown format`, `resolution unavailable` or `memory unavailable` for a value that is null), `document.unitId` (the document's units as Preferences › Units names them, such as `millimeters`, beside
|
||||
the English `document.units`), `document.transparency` (`{gridSize, gridColors, gridColorsName, simulatePaper,
|
||||
flattenerPreset}`: File › Document Setup's transparency settings, the grid's size (`small`, `medium` or `large`), its
|
||||
two colors as `#rrggbb`, their preset's name or `Custom`, Simulate Colored Paper and the flattener preset, which the
|
||||
|
||||
@@ -2071,6 +2071,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
The Brushes panel's Delete Brush button and panel menu item ask "Delete the selected brushes?" with Yes and No when none of the brushes is in use. Alt-click (Option-click on macOS) on the button deletes them without asking, as the [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) page lists for panel deletion outside the Layers panel (archived copy). When a stroke uses one of the brushes, the button, Alt-click and the menu item all ask with Remove Strokes and Cancel; Remove Strokes deletes the brushes and the strokes that used them become plain strokes. Tests: `panels::brushes::tests`, `dialogs::brush_delete::tests`.
|
||||
Document Info has a Brushes category after Graphic Styles. It lists the names and types of the brushes applied to the artwork, as the [Document Info panel](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/document-info-panel.html) page describes, or with Selection Only the brushes that the selected objects' strokes use. The Document Info report and Package's report list them too (`document.info {category: "brushes"}`, `brushNames`, `brushes`). Listing each brush once, leaving out the Brushes panel's brushes no art uses (`panelBrushNames` lists the panel's brushes), hidden strokes, strokes at an opacity of 0, strokes with no paint or width, guides, paths with no segment, type that draws no characters, a group's or layer's own strokes, a compound path member's own strokes and an image's strokes without a shape, and listing a brush the panel does not hold as missing, are VectorCraft's own rules. Tests: `cmd::docinfo::tests::info_lists_the_brushes` and `info_brushes_skip_undrawn_strokes_and_name_missing_brushes` (vectorcraft-engine).
|
||||
Document Info's Fonts category gives each font's type and number of uses beside its name, as the [help page](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/document-info-panel.html) describes, for the whole document or with Selection Only for the selected type. The Document Info report and Package's report give them too (`document.info {category: "fonts"}`, `fontUses`), and the panel shows the type and count in the interface language. Counting a use as a text object set in the font (once however many of its runs use it, and the type in a mask or in a symbol's or pattern's art once however many objects show it), naming the type by the face's outlines (TrueType for `glyf`, OpenType for `CFF` or `CFF2`) and showing an unknown type for a font that is not installed in the family and style the type names are VectorCraft's own rules. Tests: `cmd::docinfo::tests::info_fonts_give_each_font_s_type_and_uses` (vectorcraft-engine), `panels::doc_info::tests::font_types_and_uses_show_in_the_interface_language` (vectorcraft-ui-egui), `fontdb::face::tests::outline_format_follows_the_outline_tables` (vectorcraft-text).
|
||||
Document Info's Linked Images category gives each linked image's format, size in pixels, resolution and file, and its Embedded Images category gives each embedded image's format, size in pixels and memory size, as the [help page](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/document-info-panel.html) describes, for the whole document or with Selection Only for the selected images. The Document Info report and Package's report give them too (`document.info {category: "linkedImages"}`, `imageObjects`' `format`, `effectivePpi`, `memoryBytes` and `storedBytes`), and the panel shows them in the interface language. Taking the format from a linked file's extension or else from the pixels the document holds, measuring the resolution at the size the image is placed at, counting the memory as the 8-bit RGBA pixels the image is drawn from (width × height × 4), and showing `Unknown format` or `resolution unavailable` when those are not known are VectorCraft's own rules. Tests: `cmd::docinfo::tests::image_rows_give_format_resolution_and_memory` and `byte_sizes_and_resolutions_read_to_a_tenth` (vectorcraft-engine), `panels::doc_info::tests::image_details_show_in_the_interface_language` (vectorcraft-ui-egui).
|
||||
Document Info has a Repeat Objects category after Embedded Images. It lists each radial, grid and mirror Repeat object by name with its kind and the number of instances it makes. For a grid it gives the rows and columns instead, followed by the number of instances it draws when that is fewer. With Selection Only it lists the Repeat objects in the selection. The Document Info report and Package's report list them too (`document.info {category: "repeats"}`, `repeatObjects`).
|
||||
Document Info's Pattern Objects category lists the objects whose fill or stroke is a pattern, the category the [Document Info panel](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/document-info-panel.html) page describes, each by name with the patterns it uses. With Selection Only it lists those in the selection, and the Document Info report and Package's report list them too (`document.info {category: "patterns"}`, `patternObjects`). Listing an object with a pattern fill and a pattern stroke once, listing objects inside groups and type objects whose characters use a pattern, and leaving out hidden fills and strokes, fills and strokes at an opacity of 0, strokes with no width, guides, a compound path member's own fills and strokes, an image's fills and strokes without a shape, characters the type does not draw and patterns no art uses, and counting the listed objects in Objects, are VectorCraft's own rules. Test: `cmd::docinfo::tests::info_lists_the_pattern_objects` (vectorcraft-engine).
|
||||
Document Info's Gradient Objects category lists the objects whose fill or stroke is a gradient, the category the [Document Info panel](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/document-info-panel.html) page describes as the count of objects with gradient fills or strokes. Each object is listed by name with the gradients it uses. With Selection Only it lists those in the selection, and the Document Info report and Package's report list them too (`document.info {category: "gradients"}`, `gradientObjects`). Naming a linked gradient by its swatch and any other gradient by its kind, and leaving out paint that draws nothing by the rules Pattern Objects follows, gradient swatches no art uses, gradient meshes and gradients drawn by effects, are VectorCraft's own rules. Objects counts the listed objects as Gradient Objects. Test: `cmd::docinfo::tests::info_lists_the_gradient_objects` (vectorcraft-engine).
|
||||
|
||||
Reference in New Issue
Block a user