mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 17:56:50 -06:00
Merge pull request #3482 from dotCooCoo/fix/vector-exports-one-decode-note
Export: EPS, legacy .ai, EMF/WMF and DXF give one note for images that can't be decoded
This commit is contained in:
@@ -33,6 +33,9 @@ const WIDE_LINES: &str =
|
||||
const STROKE_EXTRAS: &str = "stroke alignment, width profiles, arrowheads and brushes are left out (Maximize Editability writes strokes as lines)";
|
||||
const CLIPPING: &str = "clipping masks are not applied: the art they clip is written whole";
|
||||
const TYPE_ITEMS: &str = "fills and strokes added to whole type objects are left out of text entities (outline the text to keep them)";
|
||||
/// The warning for an image left out because it can't be decoded: the note raster exports give
|
||||
/// (`vectorcraft-engine`'s `rasterfx::undecoded_warning`).
|
||||
const UNDECODED: &str = "an image couldn't be decoded and is missing from the picture";
|
||||
|
||||
/// One segment of a subpath, cubics for every curve.
|
||||
#[derive(Clone, Copy)]
|
||||
@@ -973,8 +976,8 @@ impl<'a> Scene<'a> {
|
||||
|
||||
/// Image `key` as a file in the chosen format, and its size in pixels.
|
||||
fn encode_image(&self, key: &str) -> Result<(DxfImage, (u32, u32)), String> {
|
||||
let blob = self.doc.images.get(key).filter(|b| !b.bytes.is_empty()).ok_or_else(|| format!("image '{key}' has no pixels and was left out"))?;
|
||||
let img = image::load_from_memory(&blob.bytes).map_err(|_| format!("image '{key}' could not be decoded and was left out"))?;
|
||||
let blob = self.doc.images.get(key).filter(|b| !b.bytes.is_empty()).ok_or_else(|| "an image has no pixels and was left out".to_string())?;
|
||||
let img = image::load_from_memory(&blob.bytes).map_err(|_| UNDECODED.to_string())?;
|
||||
let size = (img.width(), img.height());
|
||||
let mut bytes = vec![];
|
||||
let written = match self.o.raster {
|
||||
@@ -992,7 +995,7 @@ impl<'a> Scene<'a> {
|
||||
rgb.write_with_encoder(image::codecs::jpeg::JpegEncoder::new_with_quality(&mut bytes, 90))
|
||||
}
|
||||
};
|
||||
written.map_err(|e| format!("image '{key}' could not be written: {e}"))?;
|
||||
written.map_err(|e| format!("an image could not be written: {e}"))?;
|
||||
Ok((DxfImage { name: format!("{}.{}", blob.content_key(), self.o.raster.extension()), bytes }, size))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -526,6 +526,24 @@ fn images_link_png_or_jpeg_files() {
|
||||
assert!(r12.warnings.iter().any(|w| w.contains("no images")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn images_without_pixels_are_left_out_with_one_note() {
|
||||
// One image has no data in the document, and the other image's data is empty.
|
||||
let mut d = doc_with(|d| {
|
||||
["raster-1", "raster-2"]
|
||||
.into_iter()
|
||||
.map(|key| {
|
||||
let im = ImageObject { key: key.into(), width: 4, height: 2, xf: Affine::IDENTITY, link: None, placement: Default::default() };
|
||||
Node::new(d.alloc_id(), NodeKind::Image(Box::new(im)))
|
||||
})
|
||||
.collect()
|
||||
});
|
||||
d.images.insert("raster-2".into(), ImageBlob { mime: "image/png".into(), bytes: Arc::new(vec![]), proxy: None });
|
||||
let out = export(&d, &opts(&d)).unwrap();
|
||||
assert!(entities(&out).is_empty() && out.images.is_empty());
|
||||
assert_eq!(out.warnings, ["an image has no pixels and was left out"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn crop_leaves_out_art_outside_the_region() {
|
||||
let d = shapes_doc();
|
||||
|
||||
@@ -125,6 +125,24 @@ fn placed_images_come_back_as_linked_files() {
|
||||
let _ = std::fs::remove_dir_all(dir);
|
||||
}
|
||||
|
||||
/// Two placed images whose pixel data can't be decoded are left out of the drawing and get no
|
||||
/// linked file, and `warnings` holds the note raster exports give, once, without naming either
|
||||
/// image's key.
|
||||
#[test]
|
||||
fn images_that_cant_be_decoded_give_the_raster_note_once() {
|
||||
const NOTE: &str = "an image couldn't be decoded and is missing from the picture";
|
||||
let mut s = session(200.0, 100.0, 1);
|
||||
crate::tests_menucmds::place_undecodable_png(&mut s);
|
||||
crate::tests_menucmds::place_undecodable_png_sized(&mut s, 32, 16);
|
||||
let keys: Vec<String> = s.doc().unwrap().doc.images.keys().cloned().collect();
|
||||
assert_eq!(keys.len(), 2);
|
||||
let r = s.execute("document.export", &json!({"format": "dxf"})).unwrap();
|
||||
let w: Vec<&str> = r["warnings"].as_array().unwrap().iter().filter_map(Value::as_str).collect();
|
||||
assert_eq!(w.iter().filter(|w| **w == NOTE).count(), 1, "{w:?}");
|
||||
assert!(!w.iter().any(|w| keys.iter().any(|k| w.contains(k.as_str()))), "{w:?}");
|
||||
assert!(entities(&text(&r)).is_empty() && r.get("linked").is_none(), "{r}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bad_dxf_options_are_refused() {
|
||||
let mut s = two_boards();
|
||||
|
||||
@@ -156,6 +156,23 @@ fn placed_images_are_written_and_previews_are_black_and_white_on_request() {
|
||||
assert!(l3.contains("/FlateDecode filter >> image"));
|
||||
}
|
||||
|
||||
/// Two placed images whose pixel data can't be decoded are left out of the EPS, and `warnings`
|
||||
/// holds the note raster exports give, once, without naming either image's key.
|
||||
#[test]
|
||||
fn images_that_cant_be_decoded_give_the_raster_note_once() {
|
||||
const NOTE: &str = "an image couldn't be decoded and is missing from the picture";
|
||||
let mut s = session(200.0, 100.0, 1);
|
||||
crate::tests_menucmds::place_undecodable_png(&mut s);
|
||||
crate::tests_menucmds::place_undecodable_png_sized(&mut s, 32, 16);
|
||||
let keys: Vec<String> = s.doc().unwrap().doc.images.keys().cloned().collect();
|
||||
assert_eq!(keys.len(), 2);
|
||||
let r = s.execute("document.exportEps", &json!({"previewFormat": "none"})).unwrap();
|
||||
let w = warnings(&r);
|
||||
assert_eq!(w.iter().filter(|w| *w == NOTE).count(), 1, "{w:?}");
|
||||
assert!(!w.iter().any(|w| keys.iter().any(|k| w.contains(k.as_str()))), "{w:?}");
|
||||
assert!(!postscript(&b64(&r)).contains("filter >> image"), "no image is written");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bad_eps_options_are_refused_and_formats_list_eps() {
|
||||
let mut s = session(100.0, 100.0, 1);
|
||||
|
||||
@@ -95,6 +95,24 @@ fn raster_effects_are_written_as_images() {
|
||||
assert!(kinds.contains(&114), "the shadow is an image with transparency");
|
||||
}
|
||||
|
||||
/// Two placed images whose pixel data can't be decoded are left out of an EMF or WMF, and
|
||||
/// `warnings` holds the note raster exports give, once, without naming either image's key.
|
||||
#[test]
|
||||
fn images_that_cant_be_decoded_give_the_raster_note_once() {
|
||||
const NOTE: &str = "an image couldn't be decoded and is missing from the picture";
|
||||
let mut s = session(200.0, 100.0, 1);
|
||||
crate::tests_menucmds::place_undecodable_png(&mut s);
|
||||
crate::tests_menucmds::place_undecodable_png_sized(&mut s, 32, 16);
|
||||
let keys: Vec<String> = s.doc().unwrap().doc.images.keys().cloned().collect();
|
||||
assert_eq!(keys.len(), 2);
|
||||
for format in ["emf", "wmf"] {
|
||||
let r = s.execute("document.export", &json!({"format": format})).unwrap();
|
||||
let w: Vec<&str> = r["warnings"].as_array().unwrap().iter().filter_map(Value::as_str).collect();
|
||||
assert_eq!(w.iter().filter(|w| **w == NOTE).count(), 1, "{format}: {w:?}");
|
||||
assert!(!w.iter().any(|w| keys.iter().any(|k| w.contains(k.as_str()))), "{format}: {w:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn metafiles_open_and_place() {
|
||||
let mut s = two_boards();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use super::tests_menucmds::place_undecodable_png;
|
||||
use super::tests_menucmds::{place_undecodable_png, place_undecodable_png_sized};
|
||||
use super::*;
|
||||
use crate::tests_links::Folder;
|
||||
|
||||
@@ -362,6 +362,29 @@ fn a_flattened_image_that_cant_be_decoded_is_noted_once() {
|
||||
assert_eq!(undecoded_notes(&r), 1, "{r}");
|
||||
}
|
||||
|
||||
/// Images that can't be decoded and are written as they are get the same note as one that is
|
||||
/// flattened. All of them give one note, and the note names no image's key.
|
||||
#[test]
|
||||
fn images_written_or_flattened_that_cant_be_decoded_are_noted_once() {
|
||||
let mut s = Session::new();
|
||||
s.execute("file.new", &json!({"width": 200, "height": 100})).unwrap();
|
||||
place_undecodable_png(&mut s);
|
||||
place_undecodable_png_sized(&mut s, 48, 24);
|
||||
let keys: Vec<String> = s.doc().unwrap().doc.images.keys().cloned().collect();
|
||||
assert_eq!(keys.len(), 2);
|
||||
let decode_notes = |r: &Value| warnings(r).iter().filter(|w| w.contains("decoded")).count();
|
||||
let named = |r: &Value| warnings(r).iter().any(|w| keys.iter().any(|k| w.contains(k.as_str())));
|
||||
let r = s.execute("file.saveCopy", &json!({"format": "ai", "aiVersion": "7"})).unwrap();
|
||||
assert_eq!((undecoded_notes(&r), decode_notes(&r), named(&r)), (1, 1, false), "{r}");
|
||||
// A third image, at 50% opacity, is flattened. The engine's note and the writer's note come out
|
||||
// as one warning.
|
||||
let cut = place_undecodable_png_sized(&mut s, 32, 16);
|
||||
s.execute("transparency.set", &json!({"ids": [cut.0], "opacity": 50})).unwrap();
|
||||
let r = s.execute("file.saveCopy", &json!({"format": "ai", "aiVersion": "7"})).unwrap();
|
||||
assert!(warnings(&r).iter().any(|w| w.contains("flattened with the art under them")), "{r}");
|
||||
assert_eq!((undecoded_notes(&r), decode_notes(&r), named(&r)), (1, 1, false), "{r}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_image_that_cant_be_decoded_with_an_expanded_effect_is_noted() {
|
||||
let mut s = Session::new();
|
||||
|
||||
@@ -41,8 +41,14 @@ fn sel(s: &mut Session, ids: &[NodeId]) {
|
||||
/// A placed 64 × 32 px PNG whose header reads (so it places at its size) but whose pixel data is
|
||||
/// cut short: the renderer can't decode it and draws nothing.
|
||||
pub(crate) fn place_undecodable_png(s: &mut Session) -> NodeId {
|
||||
place_undecodable_png_sized(s, 64, 32)
|
||||
}
|
||||
|
||||
/// Places a PNG like [`place_undecodable_png`] does, at `w` × `h` px. PNGs of different sizes are
|
||||
/// different images, each stored under its own key.
|
||||
pub(crate) fn place_undecodable_png_sized(s: &mut Session, w: u32, h: u32) -> NodeId {
|
||||
let mut png = Vec::new();
|
||||
image::RgbaImage::from_pixel(64, 32, image::Rgba([200, 30, 30, 255]))
|
||||
image::RgbaImage::from_pixel(w, h, image::Rgba([200, 30, 30, 255]))
|
||||
.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png)
|
||||
.unwrap();
|
||||
let idat = png.windows(4).position(|w| w == b"IDAT").unwrap();
|
||||
|
||||
@@ -98,7 +98,10 @@ const STROKES: &str =
|
||||
"strokes a plain line can't draw (inside or outside the path, variable width, gradients, brushes, arrowheads) are written as filled outlines";
|
||||
const IMAGE_ALPHA: &str = "transparent image pixels are written over white";
|
||||
const LIVE: &str = "symbols, blends, envelopes, meshes, repeats, placed documents and intertwines are written as their art";
|
||||
const UNREADABLE_IMAGE: &str = "an image that can't be decoded or is too large was left out";
|
||||
/// The warning for an image left out because it can't be decoded: the note raster exports give
|
||||
/// (`vectorcraft-engine`'s `rasterfx::undecoded_warning`).
|
||||
const UNDECODED: &str = "an image couldn't be decoded and is missing from the picture";
|
||||
const LARGE_IMAGE: &str = "an image that is empty or too large for legacy .ai was left out";
|
||||
const ELLIPTICAL: &str = "elliptical radial gradients are written circular";
|
||||
|
||||
/// What to write in the header, and how to write what the format can't hold.
|
||||
@@ -1302,13 +1305,18 @@ impl<'a> Writer<'a> {
|
||||
if !invertible(m) {
|
||||
return;
|
||||
}
|
||||
let Some(img) = self.doc.images.get(&im.key).and_then(|b| image::load_from_memory(&b.bytes).ok()) else {
|
||||
self.warn(UNREADABLE_IMAGE);
|
||||
let blob = self.doc.images.get(&im.key);
|
||||
if blob.is_some_and(|b| b.bytes.is_empty()) {
|
||||
self.warn(LARGE_IMAGE);
|
||||
return;
|
||||
}
|
||||
let Some(img) = blob.and_then(|b| image::load_from_memory(&b.bytes).ok()) else {
|
||||
self.warn(UNDECODED);
|
||||
return;
|
||||
};
|
||||
let (w, h) = (img.width(), img.height());
|
||||
if w == 0 || h == 0 || u64::from(w) * u64::from(h) > MAX_IMAGE_PIXELS {
|
||||
self.warn(UNREADABLE_IMAGE);
|
||||
self.warn(LARGE_IMAGE);
|
||||
return;
|
||||
}
|
||||
// The object places the image's own pixel grid (its width × height) wherever the file's is.
|
||||
|
||||
@@ -33,6 +33,10 @@ const TRANSPARENCY: &str =
|
||||
const RASTER_FX: &str = "raster effects (shadows, glows, blurs, feathering) are left out: EPS has no transparency, flatten them first";
|
||||
const IMAGE_ALPHA_L2: &str = "transparent image pixels are written white at PostScript Level 2 (Level 3 masks them out)";
|
||||
const IMAGE_PARTLY: &str = "partly transparent image pixels are written over white";
|
||||
/// The warning for an image left out because it can't be decoded: the note raster exports give
|
||||
/// (`vectorcraft-engine`'s `rasterfx::undecoded_warning`).
|
||||
const UNDECODED: &str = "an image couldn't be decoded and is missing from the picture";
|
||||
const LARGE_IMAGE: &str = "an image that is too large for EPS was left out";
|
||||
const SPOT_GRADIENTS: &str = "gradients of spot colours are written in process colours";
|
||||
const MISSING_PATTERN: &str = "missing patterns are written as mid-grey";
|
||||
|
||||
@@ -859,11 +863,11 @@ impl<'a> Scene<'a> {
|
||||
/// Image `key` as RGBA pixels; `None` (with a warning) when it can't be written.
|
||||
fn decode_image(&mut self, key: &str) -> Option<image::RgbaImage> {
|
||||
let Some(img) = self.doc.images.get(key).and_then(|blob| image::load_from_memory(&blob.bytes).ok()) else {
|
||||
self.warn(&format!("image '{key}' could not be decoded and was left out"));
|
||||
self.warn(UNDECODED);
|
||||
return None;
|
||||
};
|
||||
if u64::from(img.width()) * u64::from(img.height()) > MAX_IMAGE_PIXELS {
|
||||
self.warn(&format!("image '{key}' is too large for EPS and was left out"));
|
||||
self.warn(LARGE_IMAGE);
|
||||
return None;
|
||||
}
|
||||
Some(img.to_rgba8())
|
||||
|
||||
@@ -382,6 +382,28 @@ fn images_are_written_in_the_form_the_specification_shows() {
|
||||
assert!(rgb.iter().zip([247.0, 148.0, 29.0]).all(|(c, want)| (c * 255.0 - want).abs() < 0.1), "{rgb:?}");
|
||||
}
|
||||
|
||||
/// An image whose data is empty is left out with the note for empty or too large images, and an
|
||||
/// image whose data can't be decoded is left out with the decode note.
|
||||
#[test]
|
||||
fn empty_images_get_the_size_note_and_undecodable_ones_the_decode_note() {
|
||||
let notes = |bytes: Vec<u8>| {
|
||||
let mut doc = Document::new(100.0, 100.0);
|
||||
doc.layers.clear();
|
||||
let layer = doc.add_layer(Some("Images"));
|
||||
let blob = ImageBlob::new("image/png", bytes);
|
||||
let key = blob.content_key();
|
||||
doc.images.insert(key.clone(), blob);
|
||||
let im = ImageObject { key, width: 4, height: 2, xf: Affine::IDENTITY, link: None, placement: Default::default() };
|
||||
let node = Node::new(doc.alloc_id(), NodeKind::Image(Box::new(im)));
|
||||
doc.insert(Some(layer), usize::MAX, node).unwrap();
|
||||
let out = export_legacy_ai(&doc, &LegacyAiOptions::default()).unwrap();
|
||||
assert!(rasters(&String::from_utf8(out.bytes).unwrap()).is_empty());
|
||||
out.warnings
|
||||
};
|
||||
assert_eq!(notes(vec![]), [LARGE_IMAGE]);
|
||||
assert_eq!(notes(b"not an image".to_vec()), [UNDECODED]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_gradient_fill_and_its_stroke_are_one_object() {
|
||||
let mut doc = Document::new(100.0, 100.0);
|
||||
|
||||
@@ -33,6 +33,9 @@ const CLIPPING: &str = "clipping masks are not applied: the art they clip is wri
|
||||
const FLAT_GRADIENTS: &str = "gradients are written as one colour, the average of their stops";
|
||||
const FLAT_PATTERNS: &str = "pattern fills are written as one colour";
|
||||
const TOO_MANY_TILES: &str = "pattern fills past 250,000 tiles in all are written as one colour";
|
||||
/// The warning for an image left out because it can't be decoded: the note raster exports give
|
||||
/// (`vectorcraft-engine`'s `rasterfx::undecoded_warning`).
|
||||
const UNDECODED: &str = "an image couldn't be decoded and is missing from the picture";
|
||||
|
||||
/// A stroke as a pen draws it.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
@@ -449,7 +452,7 @@ impl<'a> Scene<'a> {
|
||||
.filter(|i| i.width > 0 && i.height > 0)
|
||||
.map(Arc::new);
|
||||
if img.is_none() {
|
||||
self.warn(&format!("image '{key}' could not be decoded and was left out"));
|
||||
self.warn(UNDECODED);
|
||||
}
|
||||
self.images.insert(key.to_string(), img.clone());
|
||||
img
|
||||
|
||||
@@ -3901,7 +3901,7 @@ axis Both И двете
|
||||
@msg give the path `id` and the width point `index` дайте пътя `id` и точката на ширина `index`
|
||||
@msg guides are locked водачите са заключени
|
||||
@msg handle must be in or out handle трябва да е in или out
|
||||
@msg image '{key}' has no pixels and was left out изображението '{key}' няма пиксели и беше пропуснато
|
||||
@msg an image has no pixels and was left out изображение без пиксели беше пропуснато
|
||||
@msg image data `{_1}` is missing данните за изображение `{_1}` липсват
|
||||
@msg image would be too large; lower the resolution изображението ще бъде твърде голямо; намалете разделителната способност
|
||||
@msg index must be a number or first, previous, next or last индексът трябва да е число или first, previous, next или last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4292,7 +4292,7 @@ imageTrace Outline Obrys
|
||||
@msg give the path `id` and the width point `index` zadejte `id` cesty a `index` bodu šířky
|
||||
@msg guides are locked vodítka jsou zamčená
|
||||
@msg handle must be in or out handle musí být in nebo out
|
||||
@msg image '{key}' has no pixels and was left out obrázek '{key}' nemá žádné obrazové body a byl vynechán
|
||||
@msg an image has no pixels and was left out obrázek bez obrazových bodů byl vynechán
|
||||
@msg image data `{_1}` is missing chybí obrazová data `{_1}`
|
||||
@msg image would be too large; lower the resolution obraz by byl příliš velký; snižte rozlišení
|
||||
@msg index must be a number or first, previous, next or last index musí být číslo nebo first, previous, next či last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4014,7 +4014,7 @@ imageTrace Outline Kontur
|
||||
@msg give horizontal or vertical angiv vandret eller lodret
|
||||
@msg give the path `id` and the width point `index` angiv `id` for kurven og `index` for breddepunktet
|
||||
@msg guides are locked hjælpelinjerne er låst
|
||||
@msg image '{key}' has no pixels and was left out billedet '{key}' har ingen pixels og blev udeladt
|
||||
@msg an image has no pixels and was left out et billede uden pixels blev udeladt
|
||||
@msg image data `{_1}` is missing billeddata `{_1}` mangler
|
||||
@msg image would be too large; lower the resolution billedet ville blive for stort; sænk opløsningen
|
||||
@msg index must be a number or first, previous, next or last indeks skal være et tal eller first, previous, next eller last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3913,7 +3913,7 @@ theme Appearance Erscheinungsbild
|
||||
@msg give the path `id` and the width point `index` geben Sie die `id` des Pfads und den `index` des Breitenpunkts an
|
||||
@msg guides are locked die Hilfslinien sind gesperrt
|
||||
@msg handle must be in or out handle muss in oder out sein
|
||||
@msg image '{key}' has no pixels and was left out das Bild '{key}' hat keine Pixel und wurde ausgelassen
|
||||
@msg an image has no pixels and was left out ein Bild ohne Pixel wurde ausgelassen
|
||||
@msg image data `{_1}` is missing die Bilddaten `{_1}` fehlen
|
||||
@msg image would be too large; lower the resolution das Bild wäre zu groß; verringern Sie die Auflösung
|
||||
@msg index must be a number or first, previous, next or last index muss eine Zahl oder first, previous, next oder last sein
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3970,7 +3970,7 @@ theme Appearance Εμφάνιση
|
||||
@msg give the path `id` and the width point `index` δώστε το `id` διαδρομής και το `index` σημείου πλάτους
|
||||
@msg guides are locked οι οδηγοί είναι κλειδωμένοι
|
||||
@msg handle must be in or out το handle πρέπει να είναι in ή out
|
||||
@msg image '{key}' has no pixels and was left out η εικόνα '{key}' δεν περιέχει εικονοστοιχεία και παραλείφθηκε
|
||||
@msg an image has no pixels and was left out παραλείφθηκε εικόνα χωρίς εικονοστοιχεία
|
||||
@msg image data `{_1}` is missing λείπουν τα δεδομένα εικόνας `{_1}`
|
||||
@msg image would be too large; lower the resolution η εικόνα θα ήταν υπερβολικά μεγάλη· μειώστε την ανάλυση
|
||||
@msg index must be a number or first, previous, next or last ο δείκτης πρέπει να είναι αριθμός ή first, previous, next ή last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2040 and column 19.
|
@@ -3989,7 +3989,7 @@ axis Both Ambos
|
||||
@msg give the path `id` and the width point `index` indica el `id` del trazado y el `index` del punto de anchura
|
||||
@msg guides are locked las guías están bloqueadas
|
||||
@msg handle must be in or out handle debe ser in u out
|
||||
@msg image '{key}' has no pixels and was left out la imagen '{key}' no tiene píxeles y se omitió
|
||||
@msg an image has no pixels and was left out se omitió una imagen sin píxeles
|
||||
@msg image data `{_1}` is missing faltan los datos de imagen `{_1}`
|
||||
@msg image would be too large; lower the resolution la imagen sería demasiado grande; baja la resolución
|
||||
@msg index must be a number or first, previous, next or last index debe ser un número o first, previous, next o last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4207,7 +4207,7 @@ imageTrace Outline Ääriviiva
|
||||
@msg give the path `id` and the width point `index` anna polun `id` ja leveyspisteen `index`
|
||||
@msg guides are locked apuviivat on lukittu
|
||||
@msg handle must be in or out handle-arvon on oltava in tai out
|
||||
@msg image '{key}' has no pixels and was left out kuvassa '{key}' ei ole pikseleitä, joten se jätettiin pois
|
||||
@msg an image has no pixels and was left out kuva, jossa ei ole pikseleitä, jätettiin pois
|
||||
@msg image data `{_1}` is missing kuvan data `{_1}` puuttuu
|
||||
@msg image would be too large; lower the resolution kuvasta tulisi liian suuri; pienennä tarkkuutta
|
||||
@msg index must be a number or first, previous, next or last indeksin on oltava luku tai first, previous, next tai last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3986,7 +3986,7 @@ axis Both Les deux
|
||||
@msg give the path `id` and the width point `index` indiquez l’`id` du tracé et l’`index` du point de largeur
|
||||
@msg guides are locked les repères sont verrouillés
|
||||
@msg handle must be in or out handle doit valoir in ou out
|
||||
@msg image '{key}' has no pixels and was left out l’image « {key} » n’a aucun pixel et a été ignorée
|
||||
@msg an image has no pixels and was left out une image sans aucun pixel a été ignorée
|
||||
@msg image data `{_1}` is missing les données d’image `{_1}` sont manquantes
|
||||
@msg image would be too large; lower the resolution l’image serait trop grande ; réduisez la résolution
|
||||
@msg index must be a number or first, previous, next or last index doit être un nombre ou first, previous, next ou last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4605,7 +4605,7 @@ imageTrace Outline Körvonal
|
||||
@msg column docks a set as a dock column, with no anchor or icon a column egy készletet dokkoszlopként dokkol, anchor és icon nélkül
|
||||
@msg guides are locked a segédvonalak zárolva vannak
|
||||
@msg handle must be in or out handle: in vagy out kell
|
||||
@msg image '{key}' has no pixels and was left out a kép kimaradt, mert nincsenek pixelei: '{key}'
|
||||
@msg an image has no pixels and was left out kimaradt egy kép, mert nincsenek pixelei
|
||||
@msg image data `{_1}` is missing hiányoznak a képadatok: `{_1}`
|
||||
@msg image is empty a kép üres
|
||||
@msg Image Trace: the traced image is missing Képvektorizálás: a vektorizált kép hiányzik
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4014,7 +4014,7 @@ imageTrace Outline Kontur
|
||||
@msg give horizontal or vertical berikan horizontal atau vertikal
|
||||
@msg give the path `id` and the width point `index` berikan jalur `id` dan titik lebar `index`
|
||||
@msg guides are locked panduan terkunci
|
||||
@msg image '{key}' has no pixels and was left out gambar '{key}' tidak memiliki piksel dan dilewati
|
||||
@msg an image has no pixels and was left out gambar tanpa piksel dilewati
|
||||
@msg image data `{_1}` is missing data gambar `{_1}` tidak ada
|
||||
@msg image would be too large; lower the resolution gambar akan menjadi terlalu besar; turunkan resolusinya
|
||||
@msg index must be a number or first, previous, next or last index harus berupa angka atau first, previous, next, atau last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 3811 and column 19.
|
@@ -4029,7 +4029,7 @@ axis Both Entrambi
|
||||
@msg give the path `id` and the width point `index` specifica l'`id` del tracciato e l'`index` del punto di larghezza
|
||||
@msg guides are locked le guide sono bloccate
|
||||
@msg handle must be in or out handle deve essere in o out
|
||||
@msg image '{key}' has no pixels and was left out l'immagine '{key}' non ha pixel ed è stata omessa
|
||||
@msg an image has no pixels and was left out un'immagine senza pixel è stata omessa
|
||||
@msg image data `{_1}` is missing mancano i dati immagine `{_1}`
|
||||
@msg image would be too large; lower the resolution l'immagine sarebbe troppo grande; riduci la risoluzione
|
||||
@msg index must be a number or first, previous, next or last index deve essere un numero oppure first, previous, next o last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3879,7 +3879,7 @@ swatch Bright Violet ビビッドバイオレット
|
||||
@msg the scale is not a usable number 縮尺が有効な数値ではありません
|
||||
@msg the drawing is too large to open 図面が大きすぎて開けません
|
||||
@msg scale must be a number from {_1} to {_2}, not {_3} 縮尺は {_1} から {_2} までの数値にしてください ({_3} は指定できません)
|
||||
@msg image '{key}' has no pixels and was left out 画像「{key}」はピクセルがないため省略しました
|
||||
@msg an image has no pixels and was left out ピクセルがない画像を省略しました
|
||||
@msg Embedded {n} image(s) 画像を {n} 枚埋め込みました
|
||||
@msg object {0} cannot have children オブジェクト {0} には子オブジェクトを含められません
|
||||
@msg range `{s}` is empty 範囲 `{s}` が空です
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3774,7 +3774,7 @@ effect Regular ჩვეულებრივი
|
||||
@msg give horizontal or vertical მიუთითეთ horizontal ან vertical
|
||||
@msg give the path `id` and the width point `index` მიუთითეთ ტრაექტორიის `id` და სიგანის წერტილის `index`
|
||||
@msg guides are locked დამხმარე ხაზები ჩაკეტილია
|
||||
@msg image '{key}' has no pixels and was left out გამოსახულებას '{key}' პიქსელები არ აქვს და გამოტოვდა
|
||||
@msg an image has no pixels and was left out გამოსახულება, რომელსაც პიქსელები არ აქვს, გამოტოვდა
|
||||
@msg image data `{_1}` is missing გამოსახულების მონაცემები `{_1}` აკლია
|
||||
@msg image would be too large; lower the resolution გამოსახულება ზედმეტად დიდი იქნებოდა; შეამცირეთ გარჩევადობა
|
||||
@msg index must be a number or first, previous, next or last index უნდა იყოს რიცხვი ან first, previous, next ან last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3811,7 +3811,7 @@ theme Appearance 외관
|
||||
@msg the scale is not a usable number 배율이 사용할 수 없는 숫자입니다
|
||||
@msg the drawing is too large to open 도면이 너무 커서 열 수 없습니다
|
||||
@msg scale must be a number from {_1} to {_2}, not {_3} 배율은 {_1}에서 {_2} 사이의 숫자여야 합니다: {_3}
|
||||
@msg image '{key}' has no pixels and was left out 이미지 '{key}'에 픽셀이 없어 제외했습니다
|
||||
@msg an image has no pixels and was left out 픽셀이 없는 이미지를 제외했습니다
|
||||
@msg Embedded {n} image(s) 이미지 {n}개를 포함했습니다
|
||||
@msg object {0} cannot have children 개체 {0}에는 하위 항목을 둘 수 없습니다
|
||||
@msg range `{s}` is empty 범위 `{s}`이(가) 비어 있습니다
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4028,7 +4028,7 @@ imageTrace Outline Contour
|
||||
@msg give horizontal or vertical geef horizontaal of verticaal
|
||||
@msg give the path `id` and the width point `index` geef het `id` van het pad en de `index` van het breedtepunt
|
||||
@msg guides are locked de hulplijnen zijn vergrendeld
|
||||
@msg image '{key}' has no pixels and was left out afbeelding '{key}' heeft geen pixels en is weggelaten
|
||||
@msg an image has no pixels and was left out een afbeelding zonder pixels is weggelaten
|
||||
@msg image data `{_1}` is missing afbeeldingsgegevens `{_1}` ontbreken
|
||||
@msg image would be too large; lower the resolution de afbeelding zou te groot worden; verlaag de resolutie
|
||||
@msg index must be a number or first, previous, next or last index moet een getal zijn of first, previous, next of last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4114,7 +4114,7 @@ imageTrace Outline Kontur
|
||||
@msg give the path `id` and the width point `index` podaj `id` ścieżki i `index` punktu szerokości
|
||||
@msg guides are locked linie pomocnicze są zablokowane
|
||||
@msg handle must be in or out handle musi mieć wartość in lub out
|
||||
@msg image '{key}' has no pixels and was left out obraz '{key}' nie ma pikseli i został pominięty
|
||||
@msg an image has no pixels and was left out pominięto obraz bez pikseli
|
||||
@msg image data `{_1}` is missing brak danych obrazu `{_1}`
|
||||
@msg image would be too large; lower the resolution obraz byłby zbyt duży; zmniejsz rozdzielczość
|
||||
@msg index must be a number or first, previous, next or last indeks musi być liczbą lub first, previous, next albo last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3564,7 +3564,7 @@ axis Both Ambos
|
||||
@msg give the path `id` and the width point `index` informe o `id` do traçado e o `index` do ponto de largura
|
||||
@msg guides are locked as guias estão bloqueadas
|
||||
@msg handle must be in or out handle deve ser in ou out
|
||||
@msg image '{key}' has no pixels and was left out a imagem '{key}' não tem pixels e foi omitida
|
||||
@msg an image has no pixels and was left out uma imagem sem pixels foi omitida
|
||||
@msg image data `{_1}` is missing os dados da imagem `{_1}` estão ausentes
|
||||
@msg image would be too large; lower the resolution a imagem ficaria grande demais; reduza a resolução
|
||||
@msg index must be a number or first, previous, next or last index deve ser um número ou first, previous, next ou last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -4025,7 +4025,7 @@ axis Both Оба
|
||||
@msg give the path `id` and the width point `index` укажите `id` контура и `index` точки ширины
|
||||
@msg guides are locked направляющие заблокированы
|
||||
@msg handle must be in or out handle должен быть in или out
|
||||
@msg image '{key}' has no pixels and was left out изображение '{key}' не имеет пикселей и было пропущено
|
||||
@msg an image has no pixels and was left out изображение без пикселей пропущено
|
||||
@msg image data `{_1}` is missing данные изображения `{_1}` отсутствуют
|
||||
@msg image would be too large; lower the resolution изображение было бы слишком большим; уменьшите разрешение
|
||||
@msg index must be a number or first, previous, next or last index должен быть числом или first, previous, next, last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3906,7 +3906,7 @@ axis Both Båda
|
||||
@msg give the path `id` and the width point `index` ange banans `id` och breddpunktens `index`
|
||||
@msg guides are locked stödlinjerna är låsta
|
||||
@msg handle must be in or out handle måste vara in eller out
|
||||
@msg image '{key}' has no pixels and was left out bilden '{key}' har inga pixlar och utelämnades
|
||||
@msg an image has no pixels and was left out en bild utan pixlar utelämnades
|
||||
@msg image data `{_1}` is missing bilddata `{_1}` saknas
|
||||
@msg image would be too large; lower the resolution bilden skulle bli för stor; sänk upplösningen
|
||||
@msg index must be a number or first, previous, next or last index måste vara ett tal eller first, previous, next eller last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 25.
|
@@ -4013,7 +4013,7 @@ axis Both Обидві
|
||||
@msg give the path `id` and the width point `index` вкажіть `id` контуру та `index` точки ширини
|
||||
@msg guides are locked напрямні заблоковані
|
||||
@msg handle must be in or out handle має бути in або out
|
||||
@msg image '{key}' has no pixels and was left out зображення '{key}' не має пікселів і було пропущено
|
||||
@msg an image has no pixels and was left out зображення без пікселів пропущено
|
||||
@msg image data `{_1}` is missing дані зображення `{_1}` відсутні
|
||||
@msg image would be too large; lower the resolution зображення буде завеликим; зменште роздільну здатність
|
||||
@msg index must be a number or first, previous, next or last index має бути числом або first, previous, next, last
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 733 and column 40.
|
@@ -4251,7 +4251,7 @@ theme Appearance Giao diện
|
||||
@msg only a dock group above or below others collapses, not one beside another chỉ thu gọn được nhóm dock nằm trên hoặc dưới các nhóm khác, không phải nhóm nằm cạnh
|
||||
@msg guides are locked đường căn bị khóa
|
||||
@msg handle must be in or out handle phải là in hoặc out
|
||||
@msg image '{key}' has no pixels and was left out ảnh '{key}' không có pixel và bị bỏ qua
|
||||
@msg an image has no pixels and was left out một ảnh không có pixel đã bị bỏ qua
|
||||
@msg image data `{_1}` is missing dữ liệu ảnh `{_1}` bị thiếu
|
||||
@msg image is empty ảnh trống
|
||||
@msg Image Trace: the traced image is missing Vector hóa ảnh: ảnh đã vector hóa bị thiếu
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4023 and column 10.
|
@@ -3624,7 +3624,7 @@ imageTrace Outline 轮廓
|
||||
@msg the scale is not a usable number 比例不是可用的数字
|
||||
@msg the drawing is too large to open 图纸过大,无法打开
|
||||
@msg scale must be a number from {_1} to {_2}, not {_3} 比例必须是 {_1} 到 {_2} 之间的数字,而不是 {_3}
|
||||
@msg image '{key}' has no pixels and was left out 图像 '{key}' 没有像素,已略去
|
||||
@msg an image has no pixels and was left out 已略去没有像素的图像
|
||||
@msg Embedded {n} image(s) 已嵌入 {n} 张图像
|
||||
@msg object {0} cannot have children 对象 {0} 不能包含子对象
|
||||
@msg range `{s}` is empty 范围 `{s}` 为空
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1612,7 +1612,7 @@ file-filter Templates 範本
|
||||
@msg the scale is not a usable number 比例不是可用的數字
|
||||
@msg the drawing is too large to open 圖面過大,無法開啟
|
||||
@msg scale must be a number from {_1} to {_2}, not {_3} 比例必須是 {_1} 到 {_2} 之間的數字,而非 {_3}
|
||||
@msg image '{key}' has no pixels and was left out 影像 '{key}' 沒有像素,已略過
|
||||
@msg an image has no pixels and was left out 已略過沒有像素的影像
|
||||
@msg Embedded {n} image(s) 已內嵌 {n} 個影像
|
||||
@msg object {0} cannot have children 物件 {0} 不能有子物件
|
||||
@msg range `{s}` is empty 範圍 `{s}` 是空的
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
+12
-6
@@ -734,9 +734,9 @@ PostScript form, which keeps layers, groups, compound paths and clipping groups
|
||||
of `range` (default all; `{name}-{artboard}.ai` when several, listed in the result's `files`), with
|
||||
`transparentImages: "flatten"` (default) or `"omit"` for images with see-through pixels, opacity or a blending mode,
|
||||
`hiddenObjects: "layer"` (default: a hidden layer of each layer's hidden objects), `"omit"` or `"visible"`, and
|
||||
`outlineText: true` to write type as outlines instead of text objects. When an image in art that is flattened or whose
|
||||
raster effects are expanded can't be decoded, the result does not show it, and `warnings` carries "an image couldn't
|
||||
be decoded and is missing from the picture" once. From the CLI: `vectorcraft-cli convert in.svg
|
||||
`outlineText: true` to write type as outlines instead of text objects. An image that can't be decoded is left out of
|
||||
the file and does not show in art that is flattened or whose raster effects are expanded; `warnings` carries "an image
|
||||
couldn't be decoded and is missing from the picture" once for all such images. From the CLI: `vectorcraft-cli convert in.svg
|
||||
out.ai --ai-version 7 [--hidden-objects layer|omit|visible] [--transparent-images flatten|omit] [--outline-text]
|
||||
[--range R]`. `document.export`, `serialize`, `exportSelection` and `exportForScreens` refuse a `.ait` path or
|
||||
`format: "ait"` with an error that names `file.saveAsTemplate`, which writes it. The CLI's `run --export x.ait` and
|
||||
@@ -3207,7 +3207,9 @@ width profiles, arrowheads) as filled outlines; `"editability"` keeps type as te
|
||||
`alterPaths` writes every stroke as its filled outline, `outlineText` outlines type, `selectedOnly` writes only the
|
||||
selected objects in their layers (every export takes it), and `useArtboards: true` writes one drawing per chosen
|
||||
artboard holding the art over it. What DXF can't hold (gradients and patterns as one colour, blending, opacity masks,
|
||||
raster effects, clipping) comes back in `warnings`.
|
||||
raster effects, clipping) comes back in `warnings`. In R13 and later, an image that can't be decoded is left out with
|
||||
no linked file, and `warnings` carries "an image couldn't be decoded and is missing from the picture" once for all such
|
||||
images.
|
||||
|
||||
DWG can't be written (no openly licensed writer exists): `document.formats` lists it under `unsupported` with that
|
||||
hint, and exporting to it answers with the hint to export DXF. PICT files are not supported either and say so when
|
||||
@@ -3380,7 +3382,9 @@ per artboard, `{stem}_{artboard}.eps`, each bounded by its artboard. `level: 3`
|
||||
shadings and masks transparent image pixels out; `level: 2` writes gradients as bands of colour (as does
|
||||
`compatibleGradients`) and transparent pixels white. Type is always glyph outlines, so no fonts are needed (`embedFonts`
|
||||
is accepted); spot colours are Separation colour spaces, and overprinting fills and strokes overprint unless
|
||||
`overprints: "discard"`. RGB documents are written in CMYK unless `cmykPostScript: false`.
|
||||
`overprints: "discard"`. RGB documents are written in CMYK unless `cmykPostScript: false`. When the file would hold an
|
||||
image that can't be decoded, the image is left out, and `warnings` carries "an image couldn't be decoded and is missing
|
||||
from the picture" once for all such images.
|
||||
|
||||
PostScript has no transparency: it is flattened first with `flattenerPreset` (`high`, `medium` (default), `low` or a
|
||||
saved preset, see `flattener.presets.list`) and `flattener: {…}` options over it (those of
|
||||
@@ -3513,7 +3517,9 @@ outlines; gradients become images clipped to their shape, pattern fills their ti
|
||||
effects images rendered at the document's raster effects resolution. The header's frame is the artboard in 0.01 mm.
|
||||
WMF flattens curves into polygons in 16-bit units behind a placeable header (1440 units an inch, fewer for pictures
|
||||
over about 22 inches); it has no clipping, transparency or gradients, so clipped art is written whole, images over
|
||||
white and gradients and patterns as one colour. What a format leaves out comes back in `warnings`.
|
||||
white and gradients and patterns as one colour. What a format leaves out comes back in `warnings`. When the picture
|
||||
would hold an image that can't be decoded, the image is left out, and `warnings` carries "an image couldn't be decoded
|
||||
and is missing from the picture" once for all such images.
|
||||
|
||||
`document.open` and `file.place` read `.emf` and `.wmf` (placeable or not) into one artboard, the picture's frame, and
|
||||
one layer: paths with their fills and strokes (pens become strokes with caps, joins and dashes), clipping groups,
|
||||
|
||||
Reference in New Issue
Block a user