Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,38 @@ numbers on pictures (`ImageOptions.Annotations`): points are parts of the pictur
- `AnnotateTool.ConversionOf` (Core) turns the tool into a conversion in the picture's own format (as Pixelate / blur),
run by the job queue; `ReworksPixels` includes the marks.

## Add background tool

"Add background" (`tool-background`, palette only, settings schema 64) sets pictures on a gradient, a colour or a
picture of one's own, with padding, rounded corners, a shadow and a canvas shape (`BackdropOptions`). Sizes are parts of
the picture (padding of its longer side, corners of its shorter side), so a look suits any picture.

- `BackgroundTool.ConversionOf` (Core) turns the tool into a PNG conversion with `ImageOptions.Backdrop`, run by the job
queue like Pixelate / blur's areas: `ReworksPixels` includes it, so it is applied once, in the first transform step.
The tool keeps the last look apart, in `ImageOptions.BackdropLook`; an export or import leaves out the path of a
picture of one's own.
- `Engines/Magick/BackdropComposer` composes it in `ImageEncoder.ApplyOptions`, after resizing, background removal and
grayscale and before the density, metadata and alpha steps. The picture is brought to sRGB as it is seen (through its
profile, or by formula for CMYK and grey); the canvas grows round it to the shape (never crops) and stays within a
pixel limit (`PictureSizeOn`). It is drawn by Skia as the window draws it: a linear gradient shader, a colour, or
one's own picture covering (`ReadPictureBehind`: a raster picture of a few kinds, by extension or by its first bytes,
its size checked before it is decoded, read as large as covering the canvas takes and cropped to it, in sRGB, white
where see-through; one that can't be read refuses the file); the picture with its corners cut round in its own pixels;
Skia's drop shadow of what shows of it, blurred at most at a sigma of 100 (a wider one drawn smaller and scaled up,
where Skia's blur stays Gaussian). The canvas is drawn in tiles at most 2048 px wide, a band at a time, as RGB: a blur
is never larger than a tile and the shadow's reach round it (a wider shadow is blurred once, scaled down until its
sigma is 100 or less). The EXIF thumbnail is dropped.
- `BackgroundViewModel` draws the same composition live with Avalonia: the layout and shadow from the composer's
formulas (an Avalonia drop shadow is Skia's), the picture and the one behind read through the composer's functions,
the preview never mirrored in a right-to-left UI. A picture behind is read when it is chosen, and again when it is
picked again; Save waits for one that can be read, and one whose file changed since it was read (time written or
length) is read again and shown before it is saved. The conversion carries that stamp, and the composer refuses the
file (`error.background_picture_changed`, which the toast offers no Retry for) when the picture behind changed since,
before it is read or after: a change after Save gives no file rather than one with a picture behind the window didn't
show. A change that keeps both the time and the length (a copy that keeps the time, of a picture of the same size)
isn't told apart, and the picture itself edited meanwhile isn't looked for (as in Pixelate / blur and Annotate). One
look for all pictures or one each; failures end on a summary, as in Pixelate / blur.

## Crop overlay and PDF page editor

The image Crop tool (`tool-crop`) and PDF Crop (`tool-pdf-crop`) open `Views/CropOverlayWindow` instead of running a job:
Expand Down
40 changes: 40 additions & 0 deletions src/Filee.App/Assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@
"preset.hide": "بكسلة / تمويه",
"preset.hide.donut": "بكسلة",
"error.cannot_hide": "البكسلة والتمويه متاحان للصور فقط",
"error.background_picture": "تعذّرت قراءة الصورة المراد وضعها في الخلفية",
"error.background_picture_changed": "تغيّرت الصورة المراد وضعها في الخلفية بعد عرضها. أضف الخلفية مرة أخرى.",
"hide.save": "إخفاء وحفظ",
"hide.save_next": "إخفاء والتالي",
"hide.pixelate": "بكسلة",
Expand Down Expand Up @@ -412,6 +414,7 @@
"preset.rotate_180.short": "180°",
"preset.group_flip": "انعكاس",
"preset.annotate": "تعليقات",
"preset.background": "إضافة خلفية",
"preset.flip_horizontal": "انعكاس أفقي",
"preset.flip_horizontal.short": "أفقي",
"preset.flip_vertical": "انعكاس عمودي",
Expand Down Expand Up @@ -1006,6 +1009,43 @@
"annotate.keys": "V للتحديد · Tab لاختيار علامة والأسهم لتحريكها · P A B H T N لاختيار أداة · Del للإزالة · Ctrl+Z للتراجع · Esc للإغلاق",
"annotate.save": "حفظ",
"annotate.save_next": "حفظ والتالي",
"background.background": "الخلفية",
"background.gradient": "تدرّج",
"background.color": "لون",
"background.picture": "صورة",
"background.from": "اللون الأول",
"background.to": "اللون الثاني",
"background.choose": "اختيار…",
"background.no_picture": "لم تُختر صورة",
"background.padding": "الهامش",
"background.corners": "الزوايا",
"background.shadow": "الظل",
"background.shadow_none": "بلا",
"background.shadow_light": "خفيف",
"background.shadow_soft": "ناعم",
"background.shadow_strong": "قوي",
"background.canvas": "اللوحة",
"background.auto": "تلقائي",
"background.square": "مربع",
"background.landscape": "أفقي (16:9)",
"background.portrait": "عمودي (4:5)",
"background.same_look": "المظهر نفسه لكل الصور",
"background.save": "حفظ",
"background.save_next": "حفظ والتالي",
"background.gradient_sunset": "غروب",
"background.gradient_sky": "سماء",
"background.gradient_mint": "نعناع",
"background.gradient_peach": "خوخ",
"background.gradient_ocean": "محيط",
"background.gradient_lilac": "ليلكي",
"background.color_white": "أبيض",
"background.color_paper": "ورقي",
"background.color_charcoal": "فحمي",
"background.color_navy": "كحلي",
"background.color_sand": "رملي",
"background.color_sage": "مريمية",
"background.picture_unreadable": "تعذّرت قراءة هذه الصورة. اختر صورة أخرى، أو تدرّجًا أو لونًا.",
"background.keys": "Enter يحفظ · Esc يغلق · Tab يتنقّل بين خيارات المظهر · الأسهم تختار أو تحرّك شريط التمرير",
"presets.editor_title": "تعديل الإعداد المسبق",
"presets.delete_confirm": "هل تريد حذف «{0}»؟ سيُزال أيضًا من جميع أشرطة الأدوات والمجموعات.",
"presets.name_required": "أدخل اسمًا",
Expand Down
40 changes: 40 additions & 0 deletions src/Filee.App/Assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@
"preset.hide": "Verpixeln / Weichzeichnen",
"preset.hide.donut": "Verpixeln",
"error.cannot_hide": "Verpixeln und Weichzeichnen ist nur bei Bildern möglich",
"error.background_picture": "Das Bild für den Hintergrund kann nicht gelesen werden",
"error.background_picture_changed": "Das Bild für den Hintergrund hat sich geändert, nachdem es angezeigt wurde. Füge den Hintergrund noch einmal hinzu.",
"hide.save": "Verbergen & Speichern",
"hide.save_next": "Verbergen & Weiter",
"hide.pixelate": "Verpixeln",
Expand Down Expand Up @@ -412,6 +414,7 @@
"preset.rotate_180.short": "180°",
"preset.group_flip": "Spiegeln",
"preset.annotate": "Beschriften",
"preset.background": "Hintergrund hinzufügen",
"preset.flip_horizontal": "Horizontal spiegeln",
"preset.flip_horizontal.short": "Horizontal",
"preset.flip_vertical": "Vertikal spiegeln",
Expand Down Expand Up @@ -1006,6 +1009,43 @@
"annotate.keys": "V wählt aus · Tab wählt eine Markierung, Pfeiltasten verschieben sie · P A B H T N wählen ein Werkzeug · Entf entfernt · Strg+Z macht rückgängig · Esc schließt",
"annotate.save": "Speichern",
"annotate.save_next": "Speichern & weiter",
"background.background": "Hintergrund",
"background.gradient": "Verlauf",
"background.color": "Farbe",
"background.picture": "Bild",
"background.from": "Erste Farbe",
"background.to": "Zweite Farbe",
"background.choose": "Auswählen…",
"background.no_picture": "Kein Bild ausgewählt",
"background.padding": "Abstand",
"background.corners": "Ecken",
"background.shadow": "Schatten",
"background.shadow_none": "Keiner",
"background.shadow_light": "Leicht",
"background.shadow_soft": "Weich",
"background.shadow_strong": "Stark",
"background.canvas": "Leinwand",
"background.auto": "Automatisch",
"background.square": "Quadrat",
"background.landscape": "Querformat (16:9)",
"background.portrait": "Hochformat (4:5)",
"background.same_look": "Gleicher Look für alle Bilder",
"background.save": "Speichern",
"background.save_next": "Speichern & weiter",
"background.gradient_sunset": "Sonnenuntergang",
"background.gradient_sky": "Himmel",
"background.gradient_mint": "Minze",
"background.gradient_peach": "Pfirsich",
"background.gradient_ocean": "Ozean",
"background.gradient_lilac": "Flieder",
"background.color_white": "Weiß",
"background.color_paper": "Papier",
"background.color_charcoal": "Anthrazit",
"background.color_navy": "Marineblau",
"background.color_sand": "Sand",
"background.color_sage": "Salbei",
"background.picture_unreadable": "Dieses Bild kann nicht gelesen werden. Wähle ein anderes, einen Verlauf oder eine Farbe.",
"background.keys": "Eingabe speichert · Esc schließt · Tab geht durch den Look · Pfeiltasten wählen oder bewegen einen Regler",
"presets.editor_title": "Vorlage bearbeiten",
"presets.delete_confirm": "„{0}“ löschen? Die Vorlage wird auch aus allen Werkzeugleisten und Gruppen entfernt.",
"presets.name_required": "Namen eingeben",
Expand Down
40 changes: 40 additions & 0 deletions src/Filee.App/Assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@
"preset.hide": "Pixelate / blur",
"preset.hide.donut": "Pixelate",
"error.cannot_hide": "Only pictures can be pixelated or blurred",
"error.background_picture": "The picture to put behind can't be read",
"error.background_picture_changed": "The picture to put behind changed after it was shown. Add the background again.",
"hide.save": "Hide & Save",
"hide.save_next": "Hide & Next",
"hide.pixelate": "Pixelate",
Expand Down Expand Up @@ -422,6 +424,7 @@
"preset.rotate_180.short": "180°",
"preset.group_flip": "Flip",
"preset.annotate": "Annotate",
"preset.background": "Add background",
"preset.flip_horizontal": "Flip horizontal",
"preset.flip_horizontal.short": "Horizontal",
"preset.flip_vertical": "Flip vertical",
Expand Down Expand Up @@ -1021,6 +1024,43 @@
"annotate.keys": "V selects · Tab picks a mark, arrows move it · P A B H T N pick a tool · Del removes · Ctrl+Z undoes · Esc closes",
"annotate.save": "Save",
"annotate.save_next": "Save & next",
"background.background": "Background",
"background.gradient": "Gradient",
"background.color": "Colour",
"background.picture": "Picture",
"background.from": "First colour",
"background.to": "Second colour",
"background.choose": "Choose…",
"background.no_picture": "No picture chosen",
"background.padding": "Padding",
"background.corners": "Corners",
"background.shadow": "Shadow",
"background.shadow_none": "None",
"background.shadow_light": "Light",
"background.shadow_soft": "Soft",
"background.shadow_strong": "Strong",
"background.canvas": "Canvas",
"background.auto": "Auto",
"background.square": "Square",
"background.landscape": "Landscape (16:9)",
"background.portrait": "Portrait (4:5)",
"background.same_look": "Same look for all pictures",
"background.save": "Save",
"background.save_next": "Save & next",
"background.gradient_sunset": "Sunset",
"background.gradient_sky": "Sky",
"background.gradient_mint": "Mint",
"background.gradient_peach": "Peach",
"background.gradient_ocean": "Ocean",
"background.gradient_lilac": "Lilac",
"background.color_white": "White",
"background.color_paper": "Paper",
"background.color_charcoal": "Charcoal",
"background.color_navy": "Navy",
"background.color_sand": "Sand",
"background.color_sage": "Sage",
"background.picture_unreadable": "This picture can't be read. Choose another one, or a gradient or a colour.",
"background.keys": "Enter saves · Esc closes · Tab goes through the look · arrows choose or move a slider",
"presets.editor_title": "Edit preset",
"presets.delete_confirm": "Delete “{0}”? It will also be removed from every toolbar and group.",
"presets.name_required": "Enter a name",
Expand Down
40 changes: 40 additions & 0 deletions src/Filee.App/Assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@
"preset.hide": "Pixelar / difuminar",
"preset.hide.donut": "Pixelar",
"error.cannot_hide": "Solo se pueden pixelar o difuminar imágenes",
"error.background_picture": "No se puede leer la imagen para el fondo",
"error.background_picture_changed": "La imagen para el fondo cambió después de mostrarse. Vuelve a añadir el fondo.",
"hide.save": "Ocultar y guardar",
"hide.save_next": "Ocultar y seguir",
"hide.pixelate": "Pixelar",
Expand Down Expand Up @@ -412,6 +414,7 @@
"preset.rotate_180.short": "180°",
"preset.group_flip": "Voltear",
"preset.annotate": "Anotar",
"preset.background": "Añadir fondo",
"preset.flip_horizontal": "Volteo horizontal",
"preset.flip_horizontal.short": "Horizontal",
"preset.flip_vertical": "Volteo vertical",
Expand Down Expand Up @@ -1006,6 +1009,43 @@
"annotate.keys": "V selecciona · Tab elige una marca, las flechas la mueven · P A B H T N eligen herramienta · Supr quita · Ctrl+Z deshace · Esc cierra",
"annotate.save": "Guardar",
"annotate.save_next": "Guardar y siguiente",
"background.background": "Fondo",
"background.gradient": "Degradado",
"background.color": "Color",
"background.picture": "Imagen",
"background.from": "Primer color",
"background.to": "Segundo color",
"background.choose": "Elegir…",
"background.no_picture": "No se ha elegido imagen",
"background.padding": "Margen",
"background.corners": "Esquinas",
"background.shadow": "Sombra",
"background.shadow_none": "Ninguna",
"background.shadow_light": "Ligera",
"background.shadow_soft": "Suave",
"background.shadow_strong": "Fuerte",
"background.canvas": "Lienzo",
"background.auto": "Auto",
"background.square": "Cuadrado",
"background.landscape": "Horizontal (16:9)",
"background.portrait": "Vertical (4:5)",
"background.same_look": "Mismo aspecto para todas las imágenes",
"background.save": "Guardar",
"background.save_next": "Guardar y siguiente",
"background.gradient_sunset": "Atardecer",
"background.gradient_sky": "Cielo",
"background.gradient_mint": "Menta",
"background.gradient_peach": "Melocotón",
"background.gradient_ocean": "Océano",
"background.gradient_lilac": "Lila",
"background.color_white": "Blanco",
"background.color_paper": "Papel",
"background.color_charcoal": "Carbón",
"background.color_navy": "Azul marino",
"background.color_sand": "Arena",
"background.color_sage": "Salvia",
"background.picture_unreadable": "No se puede leer esta imagen. Elige otra, o un degradado o un color.",
"background.keys": "Intro guarda · Esc cierra · Tab recorre el aspecto · las flechas eligen o mueven un control deslizante",
"presets.editor_title": "Editar ajuste preestablecido",
"presets.delete_confirm": "¿Eliminar «{0}»? También se quitará de todos los menús circulares y grupos.",
"presets.name_required": "Escribe un nombre",
Expand Down
40 changes: 40 additions & 0 deletions src/Filee.App/Assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@
"preset.hide": "Pixeliser / flouter",
"preset.hide.donut": "Pixeliser",
"error.cannot_hide": "Seules les images peuvent être pixelisées ou floutées",
"error.background_picture": "Impossible de lire l'image à mettre en arrière-plan",
"error.background_picture_changed": "L'image à mettre en arrière-plan a changé après avoir été affichée. Ajoutez de nouveau l'arrière-plan.",
"hide.save": "Masquer et enregistrer",
"hide.save_next": "Masquer et suivant",
"hide.pixelate": "Pixeliser",
Expand Down Expand Up @@ -422,6 +424,7 @@
"preset.rotate_180.short": "180°",
"preset.group_flip": "Retourner",
"preset.annotate": "Annoter",
"preset.background": "Ajouter un fond",
"preset.flip_horizontal": "Retourner horizontalement",
"preset.flip_horizontal.short": "Horizontal",
"preset.flip_vertical": "Retourner verticalement",
Expand Down Expand Up @@ -1021,6 +1024,43 @@
"annotate.keys": "V sélectionne · Tab choisit une marque, les flèches la déplacent · P A B H T N choisissent un outil · Suppr supprime · Ctrl+Z annule · Échap ferme",
"annotate.save": "Enregistrer",
"annotate.save_next": "Enregistrer et suivant",
"background.background": "Fond",
"background.gradient": "Dégradé",
"background.color": "Couleur",
"background.picture": "Image",
"background.from": "Première couleur",
"background.to": "Deuxième couleur",
"background.choose": "Choisir…",
"background.no_picture": "Aucune image choisie",
"background.padding": "Marge",
"background.corners": "Coins",
"background.shadow": "Ombre",
"background.shadow_none": "Aucune",
"background.shadow_light": "Légère",
"background.shadow_soft": "Douce",
"background.shadow_strong": "Forte",
"background.canvas": "Toile",
"background.auto": "Auto",
"background.square": "Carré",
"background.landscape": "Paysage (16:9)",
"background.portrait": "Portrait (4:5)",
"background.same_look": "Même apparence pour toutes les images",
"background.save": "Enregistrer",
"background.save_next": "Enregistrer et suivant",
"background.gradient_sunset": "Coucher de soleil",
"background.gradient_sky": "Ciel",
"background.gradient_mint": "Menthe",
"background.gradient_peach": "Pêche",
"background.gradient_ocean": "Océan",
"background.gradient_lilac": "Lilas",
"background.color_white": "Blanc",
"background.color_paper": "Papier",
"background.color_charcoal": "Anthracite",
"background.color_navy": "Bleu marine",
"background.color_sand": "Sable",
"background.color_sage": "Sauge",
"background.picture_unreadable": "Impossible de lire cette image. Choisissez-en une autre, ou un dégradé ou une couleur.",
"background.keys": "Entrée enregistre · Échap ferme · Tab parcourt l'apparence · les flèches choisissent ou déplacent un curseur",
"presets.editor_title": "Modifier le préréglage",
"presets.delete_confirm": "Supprimer « {0} » ? Il sera aussi retiré de tous les menus circulaires et groupes.",
"presets.name_required": "Saisissez un nom",
Expand Down
Loading
Loading