Repository navigation
Fix #328, #301, #332, #345: HAR, raw H.265 / H.264, trim transparent borders, Arabic in .xls - #351
Conversation
…n#328, KnifeLemon#301) - .har (HTTP Archive) is its own read-only data format: read as JSON for JSON, YAML, TOML, XML and JSON Lines, and as one table row per request (started, method, URL, status, time, size, type) for CSV, so spreadsheets, Markdown, HTML and PDF follow through the table routes. Renaming to .json did not work for those: the table writer refused HAR's nesting. - .h265 / .265 / .hevc and .h264 / .264 are read-only video formats. FFmpeg reports such files as format "hevc" / "h264" (MediaInfo.RawStream); they are always encoded, never copied, because their frames carry no timestamps and a copy into MP4 had non-monotonic DTS. - Settings schema 33 teaches existing donuts the new extensions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A copy cropped to the box around the pixels that aren't fully transparent (name_trimmed, same format; the source is never overwritten). Only alpha counts: ImageMagick's Trim trims the corners' colour, so a picture whose content touches a corner would lose a solid border. Pictures without transparency, fully transparent ones and multi-frame animations stay as they are. On the images donut's back face after "Remove background"; the schema 33 upgrade adds it there when it has room. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) Excel 97-2003 files are binary, so the check that keeps text needing shaping away from rhwp (ComplexScripts) skipped them: an Arabic .xls went to PDF through rhwp, letters unjoined and left to right. Its cells are now read with the built-in XLS reader, so such a sheet goes to LibreOffice or is refused with the reason, as .xlsx and .ods already were since 2.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks a lot, @cre8ive-marketing, four issues in one tidy PR, each with its own commit and tests. I ran it locally (format, build, Core 462, the related engine tests 169 with FFmpeg 9.0.2 and rhwp, App 96). I also checked raw .h264 at 30 fps and .h265 at 15 fps → MP4: frame counts and durations come out right. We’d like to merge it first among the PRs that add a settings migration, so it keeps schema 33. We’ll make a few small changes on your branch before merging, so nothing is needed from you unless you’d rather do them:
About #332: the requester asked for in-place by default. We’ll keep your name_trimmed copy as the default, which is the safe choice, and answer there. CI for fork runs is waiting for approval; we’ll start it with our changes. Thanks again! |
…lain comment, docs, all 12 languages Trim transparent borders is greyed out for JPG and other formats without alpha, and a JPG in a mixed selection fails with that reason instead of being re-encoded (ImageEncoder.HoldsAlpha). The shortcut marker is a plain comment. docs/ENGINES.md gets HAR, raw H.264 / H.265 (read at FFmpeg's default 25 fps without timing info) and Trim. fr and zh-TW, added to main since, get the preset's name.
|
@KnifeLemon Thanks for the review. Since #332 and #345 are now assigned to me, I made the four changes on the branch myself, so you don't need to:
Also:
Tests:
|
HAR to Markdown goes through Unhwp, which Linux ARM64 lacks, so the portable linux-arm64 job found no route. CSV is the table step every table route starts from.
- The .xls branch of ComplexScripts.FindInFile takes the scan's classifier, so old Excel files are also checked for words rhwp has no widths for (KnifeLemon#378), with a test. - Nepali strings for the trim preset and its error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main took settings schema 33 for KnifeLemon#351, so the Lua / CSS text-donut step becomes v34 after it, AppSettings.CurrentSchemaVersion goes to 34 and the migration test starts from 33. KnifeLemon#393 adds no UI strings; all 13 language files already match en.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What does this change?
Fixes for four open issues, smallest first. Each is its own commit with tests.
.har.jsondidn't get there: the table writer refuses HAR's nesting ("entries holds a list")..h265.h265/.265/.hevcand.h264/.264are read-only video formats. FFmpeg reports them as formathevc/h264(MediaInfo.RawStream). They are always encoded, never copied: their frames carry no timestamps, and a stream copy into MP4 failed to decode ("non monotonically increasing dts").name_trimmedin the same format, and never overwrites the source. Only alpha counts: ImageMagick'sTrim()trims the corners' colour, which cuts into content that touches a corner. Pictures without transparency, fully transparent ones and multi-frame animations stay as they are (ashortcut:comment marks the animation case). It sits on the images donut's back face after Remove background..xlsx/.odssheets with Arabic away from rhwp. The binary.xlswas skipped by that check (ComplexScripts), so an Arabic.xlsstill reached PDF through rhwp, unshaped. Its cells are now read with the built-in XLS reader.Settings schema 33 teaches existing donuts the new extensions and adds the trim preset. #349 also uses 33. Whichever PR merges second needs its step renumbered to 34. Happy to do that.
How was it tested?
dotnet format --verify-no-changesdotnet test: all pass with FFmpeg 9.0.2 and rhwp 0.8.7 installed: Core 463, App 767, Engines 1453, Setup 134, Cli 27, Platform 48 (0 failed).NewExtensionsTests: detection, read-only formats, the schema 33 upgrade, custom claims kept.NewExtensionsRealTests, with FFmpeg 9.0.2:.h265→ AVI and MP4, and.264→ MP4: right size and duration, decode with no errors.har→ a Markdown table row and → JSONTrimTransparentTests: PNG and WebP padding removed with no page offset left, a corner-touching picture keeps its content, a 2-frame GIF stays aligned, opaque and empty pictures are untouched.ArabicSheetTests, with rhwp: Arabic found in.xlsxand.xls, and both refused witherror.needs_shapingwithout LibreOffice. Before the fix the.xlsone was converted, unshaped.Screenshots (UI changes)
One new preset, "Trim transparent borders", on the images donut's back face. No other UI changes.
Checklist
src/Filee.App/Assets/i18n/*.jsonfiles (preset.trim_transparent, 10 languages)THIRD-PARTY-NOTICES.md(none)Fixes #328.
Addresses #301 (raw streams; a recorder that writes its own container under
.h265still needs the sample asked for there), #332 (asname_trimmed, not in place; the question asked there is still open), and #345 (the.xlscase;.xlsxwas handled in 2.0.0).