diff --git a/CHANGELOG.md b/CHANGELOG.md index 544977b62..4545945a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -120,8 +120,15 @@ ko: PDF·Word·웹 페이지의 표를 Excel로 바꿀 때 머리글 병합은 en: Tables from PDF, Word and web pages can keep their header merges in Excel and fill categories into every row, ready for filters and pivot tables (new presets do this by default) ko: 매크로가 포함된 PowerPoint 슬라이드 쇼(.ppsm)를 PDF와 다른 프레젠테이션 형식으로 변환할 수 있어요 en: Macro-enabled PowerPoint slide shows (.ppsm) convert to PDF and the other presentation formats +ko: 이미지 프리셋에서 크기 조정 방식(Lanczos, Mitchell, Catmull-Rom, 바이리니어, 박스, 최근접 이웃)을 고를 수 있어요 +en: Image presets can choose how a resize blends pixels: Lanczos, Mitchell, Catmull-Rom, bilinear, box or nearest neighbour --> +- **Choose the resampling filter** (#1601). An image preset that resizes now has a **Resampling** box under + **Resize**: Automatic (as before: ImageMagick picks Lanczos for shrinking and Mitchell for enlarging), Lanczos, + Mitchell, Catmull-Rom (the sharp bicubic), Bilinear, Box, or Nearest neighbour for pixel art. The same filter is + used when a picture is scaled to fit a format's size limit or a maximum file size, and for icons and cursors (ICO, CUR and ICNS). + - **No update notice over full-screen games** (#1897). The "new version" card in the bottom-right corner could appear on top of a full-screen game, where it looked like something that didn't belong there. While a full-screen game or video, or a presentation, is in front, the card (and the one for newer engines) now waits until you next use Filee: diff --git a/src/Filee.App/Assets/i18n/ar.json b/src/Filee.App/Assets/i18n/ar.json index f92287a03..52d093fff 100644 --- a/src/Filee.App/Assets/i18n/ar.json +++ b/src/Filee.App/Assets/i18n/ar.json @@ -960,6 +960,15 @@ "presets.resize.Width": "تعيين العرض", "presets.resize.Custom": "تعيين العرض والارتفاع", "presets.resize.MinShortEdge": "تحديد الحد الأدنى للضلع الأقصر", + "presets.resize_filter": "إعادة التشكيل", + "presets.resize_filter_hint": "طريقة مزج البكسلات عند تغيير حجم الصورة. التلقائي يستخدم Lanczos للتصغير وMitchell للتكبير.", + "presets.resize_filter.Auto": "تلقائي", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (تكعيبي ثنائي)", + "presets.resize_filter.Bilinear": "خطي ثنائي", + "presets.resize_filter.Box": "صندوقي", + "presets.resize_filter.Nearest": "الجار الأقرب (فن البكسل)", "presets.rotation": "التدوير", "presets.rotation.None": "دون تدوير", "presets.rotation.Right90": "90° لليمين", diff --git a/src/Filee.App/Assets/i18n/bn-BD.json b/src/Filee.App/Assets/i18n/bn-BD.json index 9b1ee35b5..35b931f24 100644 --- a/src/Filee.App/Assets/i18n/bn-BD.json +++ b/src/Filee.App/Assets/i18n/bn-BD.json @@ -959,6 +959,15 @@ "presets.resize.Width": "প্রস্থ নির্ধারণ", "presets.resize.Custom": "প্রস্থ এবং উচ্চতা নির্ধারণ", "presets.resize.MinShortEdge": "সর্বনিম্ন ছোট প্রান্ত নির্ধারণ", + "presets.resize_filter": "রিস্যাম্পলিং", + "presets.resize_filter_hint": "আকার বদলানোর সময় পিক্সেল কীভাবে মেশানো হবে। স্বয়ংক্রিয় ছোট করতে Lanczos আর বড় করতে Mitchell নেয়।", + "presets.resize_filter.Auto": "স্বয়ংক্রিয়", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (বাইকিউবিক)", + "presets.resize_filter.Bilinear": "বাইলিনিয়ার", + "presets.resize_filter.Box": "বক্স", + "presets.resize_filter.Nearest": "নিকটতম প্রতিবেশী (পিক্সেল আর্ট)", "presets.rotation": "ঘোরান", "presets.rotation.None": "ঘোরাবেন না", "presets.rotation.Right90": "ডানে ৯০°", diff --git a/src/Filee.App/Assets/i18n/de.json b/src/Filee.App/Assets/i18n/de.json index 548f0cfff..57c966942 100644 --- a/src/Filee.App/Assets/i18n/de.json +++ b/src/Filee.App/Assets/i18n/de.json @@ -960,6 +960,15 @@ "presets.resize.Width": "Breite festlegen", "presets.resize.Custom": "Breite und Höhe festlegen", "presets.resize.MinShortEdge": "Mindestlänge der kurzen Kante", + "presets.resize_filter": "Neuberechnung", + "presets.resize_filter_hint": "Wie Pixel beim Ändern der Größe gemischt werden. Automatisch nimmt Lanczos zum Verkleinern und Mitchell zum Vergrößern.", + "presets.resize_filter.Auto": "Automatisch", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bikubisch)", + "presets.resize_filter.Bilinear": "Bilinear", + "presets.resize_filter.Box": "Box", + "presets.resize_filter.Nearest": "Nächster Nachbar (Pixel-Art)", "presets.rotation": "Drehen", "presets.rotation.None": "Nicht drehen", "presets.rotation.Right90": "90° nach rechts", diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.json index e1329a14c..46d9a60ae 100644 --- a/src/Filee.App/Assets/i18n/en.json +++ b/src/Filee.App/Assets/i18n/en.json @@ -975,6 +975,15 @@ "presets.resize.Width": "Set the width", "presets.resize.Custom": "Set width and height", "presets.resize.MinShortEdge": "Set a minimum short edge", + "presets.resize_filter": "Resampling", + "presets.resize_filter_hint": "How pixels are blended when the picture is resized. Automatic picks Lanczos for shrinking and Mitchell for enlarging.", + "presets.resize_filter.Auto": "Automatic", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bicubic)", + "presets.resize_filter.Bilinear": "Bilinear", + "presets.resize_filter.Box": "Box", + "presets.resize_filter.Nearest": "Nearest neighbour (pixel art)", "presets.rotation": "Rotate", "presets.rotation.None": "Don't rotate", "presets.rotation.Right90": "Right 90°", diff --git a/src/Filee.App/Assets/i18n/es.json b/src/Filee.App/Assets/i18n/es.json index 64965177a..dc584cebc 100644 --- a/src/Filee.App/Assets/i18n/es.json +++ b/src/Filee.App/Assets/i18n/es.json @@ -960,6 +960,15 @@ "presets.resize.Width": "Fijar el ancho", "presets.resize.Custom": "Fijar el ancho y el alto", "presets.resize.MinShortEdge": "Fijar un lado corto mínimo", + "presets.resize_filter": "Remuestreo", + "presets.resize_filter_hint": "Cómo se mezclan los píxeles al cambiar el tamaño. Automático usa Lanczos para reducir y Mitchell para ampliar.", + "presets.resize_filter.Auto": "Automático", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bicúbico)", + "presets.resize_filter.Bilinear": "Bilineal", + "presets.resize_filter.Box": "Caja", + "presets.resize_filter.Nearest": "Vecino más cercano (pixel art)", "presets.rotation": "Rotar", "presets.rotation.None": "No rotar", "presets.rotation.Right90": "90° a la derecha", diff --git a/src/Filee.App/Assets/i18n/fa.json b/src/Filee.App/Assets/i18n/fa.json index 675a1d56b..98c264c8f 100644 --- a/src/Filee.App/Assets/i18n/fa.json +++ b/src/Filee.App/Assets/i18n/fa.json @@ -959,6 +959,15 @@ "presets.resize.Width": "تنظیم عرض", "presets.resize.Custom": "تنظیم عرض و ارتفاع", "presets.resize.MinShortEdge": "حداقل لبه کوتاه", + "presets.resize_filter": "بازنمونه‌برداری", + "presets.resize_filter_hint": "روش ترکیب پیکسل‌ها هنگام تغییر اندازه. خودکار برای کوچک کردن Lanczos و برای بزرگ کردن Mitchell را به کار می‌برد.", + "presets.resize_filter.Auto": "خودکار", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (دومکعبی)", + "presets.resize_filter.Bilinear": "دوخطی", + "presets.resize_filter.Box": "جعبه‌ای", + "presets.resize_filter.Nearest": "نزدیک‌ترین همسایه (پیکسل‌آرت)", "presets.rotation": "چرخش", "presets.rotation.None": "بدون چرخش", "presets.rotation.Right90": "۹۰ درجه راست", diff --git a/src/Filee.App/Assets/i18n/fr.json b/src/Filee.App/Assets/i18n/fr.json index 9790f2c20..ab7c7aaa9 100644 --- a/src/Filee.App/Assets/i18n/fr.json +++ b/src/Filee.App/Assets/i18n/fr.json @@ -979,6 +979,15 @@ "presets.resize.Width": "Fixer la largeur", "presets.resize.Custom": "Fixer la largeur et la hauteur", "presets.resize.MinShortEdge": "Imposer un petit côté minimal", + "presets.resize_filter": "Rééchantillonnage", + "presets.resize_filter_hint": "La façon de mélanger les pixels quand l'image est redimensionnée. Automatique prend Lanczos pour réduire et Mitchell pour agrandir.", + "presets.resize_filter.Auto": "Automatique", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bicubique)", + "presets.resize_filter.Bilinear": "Bilinéaire", + "presets.resize_filter.Box": "Boîte", + "presets.resize_filter.Nearest": "Plus proche voisin (pixel art)", "presets.rotation": "Faire pivoter", "presets.rotation.None": "Ne pas faire pivoter", "presets.rotation.Right90": "90° à droite", diff --git a/src/Filee.App/Assets/i18n/hi.json b/src/Filee.App/Assets/i18n/hi.json index 4b36d6a69..cf87819c2 100644 --- a/src/Filee.App/Assets/i18n/hi.json +++ b/src/Filee.App/Assets/i18n/hi.json @@ -964,6 +964,15 @@ "presets.resize.Width": "चौड़ाई तय करें", "presets.resize.Custom": "चौड़ाई और ऊँचाई तय करें", "presets.resize.MinShortEdge": "छोटी भुजा की न्यूनतम लंबाई तय करें", + "presets.resize_filter": "रीसैंपलिंग", + "presets.resize_filter_hint": "आकार बदलते समय पिक्सेल कैसे मिलाए जाएँ। स्वचालित छोटा करने पर Lanczos और बड़ा करने पर Mitchell चुनता है।", + "presets.resize_filter.Auto": "स्वचालित", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (बाइक्यूबिक)", + "presets.resize_filter.Bilinear": "बाइलीनियर", + "presets.resize_filter.Box": "बॉक्स", + "presets.resize_filter.Nearest": "निकटतम पड़ोसी (पिक्सेल आर्ट)", "presets.rotation": "घुमाएँ", "presets.rotation.None": "न घुमाएँ", "presets.rotation.Right90": "दाएँ 90°", diff --git a/src/Filee.App/Assets/i18n/id.json b/src/Filee.App/Assets/i18n/id.json index cefb4462e..176f5e558 100644 --- a/src/Filee.App/Assets/i18n/id.json +++ b/src/Filee.App/Assets/i18n/id.json @@ -964,6 +964,15 @@ "presets.resize.Width": "Tentukan lebar", "presets.resize.Custom": "Tentukan lebar dan tinggi", "presets.resize.MinShortEdge": "Atur batas minimum sisi pendek", + "presets.resize_filter": "Resampling", + "presets.resize_filter_hint": "Cara piksel dicampur saat gambar diubah ukurannya. Otomatis memakai Lanczos untuk mengecilkan dan Mitchell untuk memperbesar.", + "presets.resize_filter.Auto": "Otomatis", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bikubik)", + "presets.resize_filter.Bilinear": "Bilinear", + "presets.resize_filter.Box": "Box", + "presets.resize_filter.Nearest": "Tetangga terdekat (pixel art)", "presets.rotation": "Rotasi", "presets.rotation.None": "Jangan putar", "presets.rotation.Right90": "Kanan 90°", diff --git a/src/Filee.App/Assets/i18n/it.json b/src/Filee.App/Assets/i18n/it.json index 551dd814b..767ad2d79 100644 --- a/src/Filee.App/Assets/i18n/it.json +++ b/src/Filee.App/Assets/i18n/it.json @@ -963,6 +963,15 @@ "presets.resize.Width": "Imposta la larghezza", "presets.resize.Custom": "Imposta larghezza e altezza", "presets.resize.MinShortEdge": "Limita il lato corto minimo", + "presets.resize_filter": "Ricampionamento", + "presets.resize_filter_hint": "Come si mescolano i pixel quando l'immagine viene ridimensionata. Automatico usa Lanczos per ridurre e Mitchell per ingrandire.", + "presets.resize_filter.Auto": "Automatico", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bicubico)", + "presets.resize_filter.Bilinear": "Bilineare", + "presets.resize_filter.Box": "Box", + "presets.resize_filter.Nearest": "Vicino più prossimo (pixel art)", "presets.rotation": "Ruota", "presets.rotation.None": "Non ruotare", "presets.rotation.Right90": "90° a destra", diff --git a/src/Filee.App/Assets/i18n/ja.json b/src/Filee.App/Assets/i18n/ja.json index ac0e19acd..c15475a7b 100644 --- a/src/Filee.App/Assets/i18n/ja.json +++ b/src/Filee.App/Assets/i18n/ja.json @@ -964,6 +964,15 @@ "presets.resize.Width": "幅を指定", "presets.resize.Custom": "幅と高さを指定", "presets.resize.MinShortEdge": "短辺の下限を指定", + "presets.resize_filter": "リサンプリング", + "presets.resize_filter_hint": "サイズ変更時のピクセルの補間方法です。自動では縮小に Lanczos、拡大に Mitchell を使います。", + "presets.resize_filter.Auto": "自動", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (バイキュービック)", + "presets.resize_filter.Bilinear": "バイリニア", + "presets.resize_filter.Box": "ボックス", + "presets.resize_filter.Nearest": "ニアレストネイバー (ピクセルアート)", "presets.rotation": "回転", "presets.rotation.None": "回転しない", "presets.rotation.Right90": "右に90°", diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.json index 8b9700458..e57529cd5 100644 --- a/src/Filee.App/Assets/i18n/ko.json +++ b/src/Filee.App/Assets/i18n/ko.json @@ -975,6 +975,15 @@ "presets.resize.Width": "너비 맞추기", "presets.resize.Custom": "너비와 높이 맞추기", "presets.resize.MinShortEdge": "짧은 변 최소 길이", + "presets.resize_filter": "리샘플링", + "presets.resize_filter_hint": "크기를 바꿀 때 픽셀을 섞는 방식이에요. 자동은 줄일 때 Lanczos, 키울 때 Mitchell을 써요.", + "presets.resize_filter.Auto": "자동", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (바이큐빅)", + "presets.resize_filter.Bilinear": "바이리니어", + "presets.resize_filter.Box": "박스", + "presets.resize_filter.Nearest": "최근접 이웃 (픽셀 아트)", "presets.rotation": "회전", "presets.rotation.None": "회전 안 함", "presets.rotation.Right90": "오른쪽 90°", diff --git a/src/Filee.App/Assets/i18n/mn.json b/src/Filee.App/Assets/i18n/mn.json index 7db9b5ca9..80ad97309 100644 --- a/src/Filee.App/Assets/i18n/mn.json +++ b/src/Filee.App/Assets/i18n/mn.json @@ -959,6 +959,15 @@ "presets.resize.Width": "Өргөнийг заах", "presets.resize.Custom": "Өргөн ба өндрийг заах", "presets.resize.MinShortEdge": "Богино талын доод хэмжээг заах", + "presets.resize_filter": "Дахин түүвэрлэлт", + "presets.resize_filter_hint": "Хэмжээг өөрчлөхөд пикселийг хэрхэн холих. Автомат нь багасгахад Lanczos, томсгоход Mitchell сонгоно.", + "presets.resize_filter.Auto": "Автомат", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (бикуб)", + "presets.resize_filter.Bilinear": "Билинеар", + "presets.resize_filter.Box": "Хайрцаг", + "presets.resize_filter.Nearest": "Хамгийн ойр хөрш (пиксел арт)", "presets.rotation": "Эргүүлэх", "presets.rotation.None": "Эргүүлэхгүй", "presets.rotation.Right90": "Баруун тийш 90°", diff --git a/src/Filee.App/Assets/i18n/ne.json b/src/Filee.App/Assets/i18n/ne.json index 56c2faff1..975834d2c 100644 --- a/src/Filee.App/Assets/i18n/ne.json +++ b/src/Filee.App/Assets/i18n/ne.json @@ -960,6 +960,15 @@ "presets.resize.Width": "चौडाइ निर्धारण गर्नुहोस्", "presets.resize.Custom": "चौडाइ र उचाइ निर्धारण गर्नुहोस्", "presets.resize.MinShortEdge": "छोटो छेउको न्यूनतम लम्बाइ तोक्नुहोस्", + "presets.resize_filter": "रिस्याम्पलिङ", + "presets.resize_filter_hint": "आकार बदल्दा पिक्सेल कसरी मिसाइन्छ। स्वचालितले सानो पार्दा Lanczos र ठूलो पार्दा Mitchell रोज्छ।", + "presets.resize_filter.Auto": "स्वचालित", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (बाइक्युबिक)", + "presets.resize_filter.Bilinear": "बाइलिनियर", + "presets.resize_filter.Box": "बक्स", + "presets.resize_filter.Nearest": "नजिकको छिमेकी (पिक्सेल आर्ट)", "presets.rotation": "घुमाउनुहोस्", "presets.rotation.None": "नघुमाउनुहोस्", "presets.rotation.Right90": "दायाँ ९०°", diff --git a/src/Filee.App/Assets/i18n/pl.json b/src/Filee.App/Assets/i18n/pl.json index 838c7dcda..9ad4f43bc 100644 --- a/src/Filee.App/Assets/i18n/pl.json +++ b/src/Filee.App/Assets/i18n/pl.json @@ -979,6 +979,15 @@ "presets.resize.Width": "Ustaw szerokość", "presets.resize.Custom": "Ustaw szerokość i wysokość", "presets.resize.MinShortEdge": "Ustaw minimalny krótszy bok", + "presets.resize_filter": "Przepróbkowanie", + "presets.resize_filter_hint": "Jak mieszane są piksele przy zmianie rozmiaru. Automatycznie: Lanczos przy zmniejszaniu, Mitchell przy powiększaniu.", + "presets.resize_filter.Auto": "Automatycznie", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (dwusześcienny)", + "presets.resize_filter.Bilinear": "Dwuliniowy", + "presets.resize_filter.Box": "Box", + "presets.resize_filter.Nearest": "Najbliższy sąsiad (pixel art)", "presets.rotation": "Obróć", "presets.rotation.None": "Nie obracaj", "presets.rotation.Right90": "W prawo 90°", diff --git a/src/Filee.App/Assets/i18n/pt-BR.json b/src/Filee.App/Assets/i18n/pt-BR.json index 0c8197280..c6a8418b0 100644 --- a/src/Filee.App/Assets/i18n/pt-BR.json +++ b/src/Filee.App/Assets/i18n/pt-BR.json @@ -979,6 +979,15 @@ "presets.resize.Width": "Definir a largura", "presets.resize.Custom": "Definir a largura e a altura", "presets.resize.MinShortEdge": "Definir um lado menor mínimo", + "presets.resize_filter": "Reamostragem", + "presets.resize_filter_hint": "Como os pixels são misturados ao redimensionar. Automático usa Lanczos para reduzir e Mitchell para ampliar.", + "presets.resize_filter.Auto": "Automático", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bicúbico)", + "presets.resize_filter.Bilinear": "Bilinear", + "presets.resize_filter.Box": "Caixa", + "presets.resize_filter.Nearest": "Vizinho mais próximo (pixel art)", "presets.rotation": "Girar", "presets.rotation.None": "Não girar", "presets.rotation.Right90": "90° à direita", diff --git a/src/Filee.App/Assets/i18n/pt-PT.json b/src/Filee.App/Assets/i18n/pt-PT.json index 932e0c1d7..ffa2c0397 100644 --- a/src/Filee.App/Assets/i18n/pt-PT.json +++ b/src/Filee.App/Assets/i18n/pt-PT.json @@ -979,6 +979,15 @@ "presets.resize.Width": "Definir a largura", "presets.resize.Custom": "Definir a largura e a altura", "presets.resize.MinShortEdge": "Definir um lado menor mínimo", + "presets.resize_filter": "Reamostragem", + "presets.resize_filter_hint": "Como os píxeis são misturados ao redimensionar. Automático usa Lanczos para reduzir e Mitchell para ampliar.", + "presets.resize_filter.Auto": "Automático", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bicúbico)", + "presets.resize_filter.Bilinear": "Bilinear", + "presets.resize_filter.Box": "Caixa", + "presets.resize_filter.Nearest": "Vizinho mais próximo (pixel art)", "presets.rotation": "Rodar", "presets.rotation.None": "Não rodar", "presets.rotation.Right90": "90° à direita", diff --git a/src/Filee.App/Assets/i18n/ru.json b/src/Filee.App/Assets/i18n/ru.json index 57d987d7d..ffdbdb7be 100644 --- a/src/Filee.App/Assets/i18n/ru.json +++ b/src/Filee.App/Assets/i18n/ru.json @@ -979,6 +979,15 @@ "presets.resize.Width": "Задать ширину", "presets.resize.Custom": "Задать ширину и высоту", "presets.resize.MinShortEdge": "Задать минимум короткой стороны", + "presets.resize_filter": "Ресемплинг", + "presets.resize_filter_hint": "Как смешиваются пиксели при изменении размера. Автоматически: Lanczos для уменьшения, Mitchell для увеличения.", + "presets.resize_filter.Auto": "Автоматически", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (бикубический)", + "presets.resize_filter.Bilinear": "Билинейный", + "presets.resize_filter.Box": "Box", + "presets.resize_filter.Nearest": "Ближайший сосед (пиксель-арт)", "presets.rotation": "Повернуть", "presets.rotation.None": "Не поворачивать", "presets.rotation.Right90": "Вправо на 90°", diff --git a/src/Filee.App/Assets/i18n/th.json b/src/Filee.App/Assets/i18n/th.json index 23582240f..d3a40288f 100644 --- a/src/Filee.App/Assets/i18n/th.json +++ b/src/Filee.App/Assets/i18n/th.json @@ -960,6 +960,15 @@ "presets.resize.Width": "กำหนดความกว้าง", "presets.resize.Custom": "กำหนดความกว้างและความสูง", "presets.resize.MinShortEdge": "กำหนดความยาวขั้นต่ำของด้านที่สั้นที่สุด", + "presets.resize_filter": "การสุ่มตัวอย่างใหม่", + "presets.resize_filter_hint": "วิธีผสมพิกเซลเมื่อปรับขนาดภาพ อัตโนมัติใช้ Lanczos เมื่อย่อ และ Mitchell เมื่อขยาย", + "presets.resize_filter.Auto": "อัตโนมัติ", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (ไบคิวบิก)", + "presets.resize_filter.Bilinear": "ไบลิเนียร์", + "presets.resize_filter.Box": "Box", + "presets.resize_filter.Nearest": "เพื่อนบ้านใกล้สุด (พิกเซลอาร์ต)", "presets.rotation": "หมุนภาพ", "presets.rotation.None": "ไม่หมุน", "presets.rotation.Right90": "ขวา 90°", diff --git a/src/Filee.App/Assets/i18n/tr.json b/src/Filee.App/Assets/i18n/tr.json index 4d25269f4..dfdf48603 100644 --- a/src/Filee.App/Assets/i18n/tr.json +++ b/src/Filee.App/Assets/i18n/tr.json @@ -960,6 +960,15 @@ "presets.resize.Width": "Genişliği ayarla", "presets.resize.Custom": "Genişliği ve yüksekliği ayarla", "presets.resize.MinShortEdge": "Kısa kenar için alt sınır", + "presets.resize_filter": "Yeniden örnekleme", + "presets.resize_filter_hint": "Boyut değişirken piksellerin nasıl karıştırılacağı. Otomatik, küçültmede Lanczos, büyütmede Mitchell kullanır.", + "presets.resize_filter.Auto": "Otomatik", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (bikübik)", + "presets.resize_filter.Bilinear": "Bilineer", + "presets.resize_filter.Box": "Kutu", + "presets.resize_filter.Nearest": "En yakın komşu (piksel sanatı)", "presets.rotation": "Döndür", "presets.rotation.None": "Döndürme", "presets.rotation.Right90": "Sağa 90°", diff --git a/src/Filee.App/Assets/i18n/vi.json b/src/Filee.App/Assets/i18n/vi.json index 58b642f35..4b37e451f 100644 --- a/src/Filee.App/Assets/i18n/vi.json +++ b/src/Filee.App/Assets/i18n/vi.json @@ -975,6 +975,15 @@ "presets.resize.Width": "Đặt chiều rộng", "presets.resize.Custom": "Đặt chiều rộng và chiều cao", "presets.resize.MinShortEdge": "Đặt cạnh ngắn tối thiểu", + "presets.resize_filter": "Lấy mẫu lại", + "presets.resize_filter_hint": "Cách trộn điểm ảnh khi đổi kích thước. Tự động dùng Lanczos khi thu nhỏ và Mitchell khi phóng to.", + "presets.resize_filter.Auto": "Tự động", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (song lập phương)", + "presets.resize_filter.Bilinear": "Song tuyến", + "presets.resize_filter.Box": "Hộp", + "presets.resize_filter.Nearest": "Láng giềng gần nhất (pixel art)", "presets.rotation": "Xoay", "presets.rotation.None": "Không xoay", "presets.rotation.Right90": "Phải 90°", diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.json index 502793043..d1b44538c 100644 --- a/src/Filee.App/Assets/i18n/zh-CN.json +++ b/src/Filee.App/Assets/i18n/zh-CN.json @@ -975,6 +975,15 @@ "presets.resize.Width": "设置宽度", "presets.resize.Custom": "设置宽度和高度", "presets.resize.MinShortEdge": "设置短边最小值", + "presets.resize_filter": "重采样", + "presets.resize_filter_hint": "调整大小时像素的混合方式。自动:缩小用 Lanczos,放大用 Mitchell。", + "presets.resize_filter.Auto": "自动", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (双三次)", + "presets.resize_filter.Bilinear": "双线性", + "presets.resize_filter.Box": "盒式", + "presets.resize_filter.Nearest": "最近邻 (像素画)", "presets.rotation": "旋转", "presets.rotation.None": "不旋转", "presets.rotation.Right90": "向右 90°", diff --git a/src/Filee.App/Assets/i18n/zh-TW.json b/src/Filee.App/Assets/i18n/zh-TW.json index f7cae7363..7cfa69df7 100644 --- a/src/Filee.App/Assets/i18n/zh-TW.json +++ b/src/Filee.App/Assets/i18n/zh-TW.json @@ -975,6 +975,15 @@ "presets.resize.Width": "設定寬度", "presets.resize.Custom": "設定寬度和高度", "presets.resize.MinShortEdge": "設定短邊最小值", + "presets.resize_filter": "重新取樣", + "presets.resize_filter_hint": "調整大小時像素的混合方式。自動:縮小用 Lanczos,放大用 Mitchell。", + "presets.resize_filter.Auto": "自動", + "presets.resize_filter.Lanczos": "Lanczos", + "presets.resize_filter.Mitchell": "Mitchell", + "presets.resize_filter.CatmullRom": "Catmull-Rom (雙立方)", + "presets.resize_filter.Bilinear": "雙線性", + "presets.resize_filter.Box": "盒狀", + "presets.resize_filter.Nearest": "最近鄰 (像素畫)", "presets.rotation": "旋轉", "presets.rotation.None": "不旋轉", "presets.rotation.Right90": "向右 90°", diff --git a/src/Filee.App/ViewModels/PresetEditorViewModel.cs b/src/Filee.App/ViewModels/PresetEditorViewModel.cs index 6022410b0..01e3ae165 100644 --- a/src/Filee.App/ViewModels/PresetEditorViewModel.cs +++ b/src/Filee.App/ViewModels/PresetEditorViewModel.cs @@ -152,6 +152,7 @@ .. FormatRegistry.Known if (preset.IsCopyToFolder) Targets = [new Choice(Preset.CopyTarget, loc["presets.copy_to_folder"])]; ResizeModes = Enum.GetValues().Select(v => new Choice(v, loc[$"presets.resize.{v}"])).ToList(); + ResizeFilters = Enum.GetValues().Select(v => new Choice(v, loc[$"presets.resize_filter.{v}"])).ToList(); Rotations = Enum.GetValues().Select(v => new Choice(v, loc[$"presets.rotation.{v}"])).ToList(); Flips = Enum.GetValues().Select(v => new Choice(v, loc[$"presets.flip.{v}"])).ToList(); PageSizes = Enum.GetValues().Select(v => new Choice(v, loc[$"presets.page_size.{v}"])).ToList(); @@ -263,6 +264,7 @@ .. WhisperLanguages.All _location = _edit.Output.AskEveryTime ? Locations[^1] : Locations.First(l => l.Value == _edit.Output.Location); _conflict = Conflicts.First(c => c.Value == _edit.Output.Conflict); _tiffCompression = TiffCompressions.First(t => t.Value == _edit.Image.TiffCompression); + _resizeFilter = ResizeFilters.FirstOrDefault(f => f.Value == _edit.Image.ResizeFilter) ?? ResizeFilters[0]; _fitsTiffMode = FitsTiffModes.FirstOrDefault(m => m.Value == _edit.Image.FitsTiff) ?? FitsTiffModes[0]; _fitsDebayer = _edit.Image.FitsDebayer; _rasterColours = RasterColourModes.FirstOrDefault(m => m.Value == _edit.Image.RasterColours) ?? RasterColourModes[0]; @@ -515,6 +517,7 @@ public async Task TestTranslationAsync() public IReadOnlyList> Locations { get; } public IReadOnlyList> Conflicts { get; } public IReadOnlyList> TiffCompressions { get; } + public IReadOnlyList> ResizeFilters { get; } /// FITS → TIFF: the data as it is, or stretched (ImageOptions.FitsTiff). public IReadOnlyList> FitsTiffModes { get; } @@ -733,7 +736,7 @@ public Choice AudioCodecChoice } } - [ObservableProperty, NotifyPropertyChangedFor(nameof(ShowPercent), nameof(ShowLongEdge), nameof(ShowWidth), nameof(ShowCustom), nameof(ShowMinShortEdge))] + [ObservableProperty, NotifyPropertyChangedFor(nameof(ShowPercent), nameof(ShowLongEdge), nameof(ShowWidth), nameof(ShowCustom), nameof(ShowMinShortEdge), nameof(ShowResizeFilter))] [NotifyPropertyChangedFor(nameof(CustomSizeError), nameof(IsValid))] private Choice _resize; @@ -749,6 +752,7 @@ public Choice AudioCodecChoice [ObservableProperty] private Choice _conflict; [ObservableProperty] private Choice _tiffCompression; + [ObservableProperty] private Choice _resizeFilter; [ObservableProperty] private Choice _fitsTiffMode; /// FITS → other pictures: debayer a colour camera's raw frame (ImageOptions.FitsDebayer). @@ -1163,6 +1167,8 @@ partial void OnImageSizeUnitChanged(Choice? oldValue, Choice? oldValue, Choice newValue) => Choices.Restore(oldValue, newValue, v => PageSize = v); partial void OnLocationChanged(Choice? oldValue, Choice newValue) => Choices.Restore(oldValue, newValue, v => Location = v); partial void OnConflictChanged(Choice? oldValue, Choice newValue) => Choices.Restore(oldValue, newValue, v => Conflict = v); + partial void OnResizeFilterChanged(Choice? oldValue, Choice newValue) => + Choices.Restore(oldValue, newValue, v => ResizeFilter = v); partial void OnTiffCompressionChanged(Choice? oldValue, Choice newValue) => Choices.Restore(oldValue, newValue, v => TiffCompression = v); partial void OnFitsTiffModeChanged(Choice? oldValue, Choice newValue) => @@ -1368,6 +1374,7 @@ partial void OnUpscaleTileSizeChanged(Choice? oldValue, Choice newValu public bool ShowWidth => Resize.Value == ResizeMode.Width; public bool ShowCustom => Resize.Value == ResizeMode.Custom; public bool ShowMinShortEdge => Resize.Value == ResizeMode.MinShortEdge; + public bool ShowResizeFilter => Resize.Value != ResizeMode.None; public bool ShowMargin => PageSize.Value != PdfPageSize.FitImage; public bool ShowSubfolder => Location.Value == OutputLocation.Subfolder; public bool ShowCustomFolder => Location.Value == OutputLocation.CustomFolder; @@ -1450,6 +1457,8 @@ public bool Apply() image.KeepEnclosedBackground = KeepEnclosedBackground; image.Background = string.IsNullOrWhiteSpace(Background) ? "#FFFFFF" : Background.Trim(); image.TiffCompression = TiffCompression.Value; + // A filter hidden with "Original size" isn't kept: it would still apply to the format caps and the size fit. + image.ResizeFilter = ShowResizeFilter ? ResizeFilter.Value : Filee.Core.Presets.ResizeFilter.Auto; image.WebpLossless = WebpLossless; image.MultiPageTiff = MultiPageTiff; image.FitsTiff = FitsTiffMode.Value; diff --git a/src/Filee.App/Views/PresetEditorView.axaml b/src/Filee.App/Views/PresetEditorView.axaml index 86745d136..fa3e2be12 100644 --- a/src/Filee.App/Views/PresetEditorView.axaml +++ b/src/Filee.App/Views/PresetEditorView.axaml @@ -161,6 +161,12 @@ + + + + + diff --git a/src/Filee.Core/Gallery/SharedPresetRules.cs b/src/Filee.Core/Gallery/SharedPresetRules.cs index e82b77393..f378fc9d6 100644 --- a/src/Filee.Core/Gallery/SharedPresetRules.cs +++ b/src/Filee.Core/Gallery/SharedPresetRules.cs @@ -150,6 +150,7 @@ private static ValueRule MetadataValue(string field) => SharedText.IsPersonalFie ("maxSizeKeepsPixels", Flag), ("minSizeMb", new NumberRule(0, 10_000)), ("resize", Enum()), + ("resizeFilter", Enum()), ("rotation", Enum()), ("flip", Enum()), ("annotations", new ListRule(Obj( diff --git a/src/Filee.Core/Gallery/SharedPresetVersions.cs b/src/Filee.Core/Gallery/SharedPresetVersions.cs index 65a67bfaa..6d68c62e2 100644 --- a/src/Filee.Core/Gallery/SharedPresetVersions.cs +++ b/src/Filee.Core/Gallery/SharedPresetVersions.cs @@ -31,6 +31,7 @@ internal static class SharedPresetVersions public static readonly IReadOnlyDictionary Fields = new Dictionary(StringComparer.Ordinal) { ["presets[].image.rasterColours"] = "2.6.0", + ["presets[].image.resizeFilter"] = "2.6.0", ["presets[].media.turnUpright"] = "2.6.0", ["presets[].media.clip.music.loop"] = "2.6.0", ["presets[].media.dvd"] = "2.6.0", diff --git a/src/Filee.Core/Presets/Preset.cs b/src/Filee.Core/Presets/Preset.cs index a2d8292be..86df21568 100644 --- a/src/Filee.Core/Presets/Preset.cs +++ b/src/Filee.Core/Presets/Preset.cs @@ -512,6 +512,24 @@ public enum ResizeMode MinShortEdge, } +/// +/// The resampling filter a resize uses (issue #1601). leaves it to ImageMagick: Mitchell when +/// enlarging or for pictures with alpha or a palette, Lanczos when shrinking. +/// +public enum ResizeFilter +{ + Auto, + Lanczos, + Mitchell, + /// Catmull-Rom, the sharp bicubic most apps call "Bicubic". + CatmullRom, + /// Bilinear (ImageMagick's Triangle). + Bilinear, + Box, + /// Nearest neighbour (ImageMagick's Point): hard pixel edges, for pixel art. + Nearest, +} + /// How an image is turned, after its EXIF orientation is applied. public enum ImageRotation { @@ -910,6 +928,10 @@ public void ForgetBackdropPictures() /// Target width in pixels when is . public int Width { get; set; } = 1200; + /// The filter every resize of the picture uses, the format size caps included (issue #1601). + [JsonConverter(typeof(LenientEnumJsonConverter))] + public ResizeFilter ResizeFilter { get; set; } = ResizeFilter.Auto; + /// /// Free width x height resizing (issue #576): stretched to exactly that size, or with /// scaled (up or down, or with only diff --git a/src/Filee.Engines/Icns/IcnsConverter.cs b/src/Filee.Engines/Icns/IcnsConverter.cs index 6f2086354..c89ce6eb0 100644 --- a/src/Filee.Engines/Icns/IcnsConverter.cs +++ b/src/Filee.Engines/Icns/IcnsConverter.cs @@ -51,7 +51,8 @@ private static IReadOnlyList WriteIcon(ConversionStep step, IProgressThe ImageMagick filter for , or null for Auto (ImageMagick chooses). + public static FilterType? Filter(ResizeFilter filter) => filter switch + { + ResizeFilter.Lanczos => FilterType.Lanczos, + ResizeFilter.Mitchell => FilterType.Mitchell, + ResizeFilter.CatmullRom => FilterType.Catrom, + ResizeFilter.Bilinear => FilterType.Triangle, + ResizeFilter.Box => FilterType.Box, + ResizeFilter.Nearest => FilterType.Point, + _ => null, + }; + /// Turns and mirrors an image as say (part of ). public static void Turn(IMagickImage image, ImageOptions options) { @@ -328,6 +340,11 @@ public static void ApplyOptions(IMagickImage image, ImageOptions options, image.SetProfile(exif); } + // Set on the image, so every later resize uses it: the ones below, the format caps, icons and cursors, and the + // copies the file-size fit scales down. Auto leaves FilterType unset and ImageMagick picks (issue #1601). + if (Filter(options.ResizeFilter) is { } filter) + image.FilterType = filter; + // A hand-edited presets.json or an imported bundle can carry sizes the editor would never write, and a // width of 0 or below would wrap to about 4 billion px in the (uint) casts below: such a size is skipped, // so the picture keeps the preset's own resize behavior (None for a Custom preset) instead. A size above the diff --git a/tests/Filee.Core.Tests/ResizeFilterTests.cs b/tests/Filee.Core.Tests/ResizeFilterTests.cs new file mode 100644 index 000000000..3b5a3a0cf --- /dev/null +++ b/tests/Filee.Core.Tests/ResizeFilterTests.cs @@ -0,0 +1,27 @@ +// The resampling filter (#1601) is a preset option: saved by name, Automatic when missing or unknown, so a filter +// from a newer Filee doesn't make an older one reset the whole presets file. + +using System.Text.Json; +using Filee.Core.Presets; +using Filee.Core.Settings; + +namespace Filee.Core.Tests; + +public class ResizeFilterTests +{ + [Fact] + public void The_filter_is_saved_by_name_and_read_leniently() + { + var preset = new Preset { TargetFormat = "png", Image = { ResizeFilter = ResizeFilter.CatmullRom } }; + + var json = JsonSerializer.Serialize(preset, FileeJsonContext.Default.Preset); + + Assert.Contains("\"resizeFilter\": \"CatmullRom\"", json); + Assert.Equal(ResizeFilter.CatmullRom, JsonSerializer.Deserialize(json, FileeJsonContext.Default.Preset)!.Image.ResizeFilter); + + var old = JsonSerializer.Deserialize("""{"targetFormat":"png","image":{"resize":"Percent"}}""", FileeJsonContext.Default.Preset)!; + var newer = JsonSerializer.Deserialize("""{"targetFormat":"png","image":{"resize":"Percent","resizeFilter":"Spline36"}}""", FileeJsonContext.Default.Preset)!; + Assert.Equal((ResizeMode.Percent, ResizeFilter.Auto), (old.Image.Resize, old.Image.ResizeFilter)); + Assert.Equal((ResizeMode.Percent, ResizeFilter.Auto), (newer.Image.Resize, newer.Image.ResizeFilter)); + } +} diff --git a/tests/Filee.Engines.Tests/ImageFormatTests.cs b/tests/Filee.Engines.Tests/ImageFormatTests.cs index 55a8c6d4e..10000ce09 100644 --- a/tests/Filee.Engines.Tests/ImageFormatTests.cs +++ b/tests/Filee.Engines.Tests/ImageFormatTests.cs @@ -345,4 +345,26 @@ public void ApplyOptions_keeps_sub_eight_bit_depth_and_caps_sixteen_bit_depth() ImageEncoder.ApplyOptions(high, new ImageOptions(), "tiff"); Assert.Equal(8u, high.Depth); } + + /// + /// #1601: the preset's resampling filter is the one the resize uses. A 2 x 2 checkerboard enlarged 4x stays pure + /// black and white with nearest neighbour, and Automatic (ImageMagick's own choice) blends the edges into greys. + /// + [Theory] + [InlineData(ResizeFilter.Nearest, 2)] + [InlineData(ResizeFilter.Auto, 3)] + public void ApplyOptions_resizes_with_the_chosen_filter(ResizeFilter filter, int minColours) + { + using var checker = new MagickImage(MagickColors.White, 2, 2); + checker.GetPixels().SetPixel(0, 0, [0, 0, 0]); + checker.GetPixels().SetPixel(1, 1, [0, 0, 0]); + ImageEncoder.ApplyOptions(checker, new ImageOptions { Resize = ResizeMode.Percent, ResizePercent = 400, ResizeFilter = filter }, "png"); + + Assert.Equal(8u, checker.Width); + var colours = checker.Histogram().Count; + if (filter == ResizeFilter.Nearest) + Assert.Equal(minColours, colours); + else + Assert.True(colours >= minColours, $"{filter} gave {colours} colours"); + } }