fix: crop save always JPEG q93 + save rotated view 1:1 (v1.4.1)
- Output extension is always .jpg regardless of source format (was: PNG in -> PNG out) - Rotation now saved correctly: viewport grid resampled bilinearly in source space (was: unrotated bounding box copy) - Quality 90 -> 93; l10n strings updated (JPEG 93) - New: tool/crop_test.dart — pure-Dart end-to-end test (dart run tool/crop_test.dart)
This commit is contained in:
1 parent
268dc879c8
commit
c34a3bfd95
11 files changed
+225
-70
No files matched your search
@@ -198,14 +198,14 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
||||
String? message;
|
||||
try {
|
||||
final source = await CropSaveService.load(path);
|
||||
final rect = state.cropSourceRect(source.width, source.height);
|
||||
if (rect == null || rect.isEmpty || !rect.isFinite) {
|
||||
final vp = state.cropViewParams(source.width, source.height);
|
||||
if (vp == null) {
|
||||
message = l10n.cropFailed;
|
||||
} else {
|
||||
final outPath = await CropSaveService.saveCrop(
|
||||
srcPath: path,
|
||||
source: source,
|
||||
rect: rect,
|
||||
vp: vp,
|
||||
matrix: state.activeColorMatrix,
|
||||
);
|
||||
message = l10n.cropSaved(outPath);
|
||||
|
||||
Reference in new issue
Block a user