You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Image-only "same format" presets (Half size, Grayscale, ...) are treated as usable for audio, video and archives #565
Presets whose output is "same as the source" are judged usable for almost any file, even when all they do is change pictures.
On the Donut toolbar page, pick the Audio donut: Half size, Grayscale, Trim transparent borders and Compress image in Available presets are not greyed out, although none of them can do anything to an MP3. The same happens for the Video and Archives donuts.
Checking each preset against every registered format with PresetAvailability.Check(preset, [format]) (measured on e492ec2; the check and these presets are unchanged on main 1bf94e7), these four presets pass for the same 90 formats: 29 image (21 for Trim transparent borders), 22 audio, 17 video, 9 archive, 7 subtitle, 2 CAD, 2 geo, 1 PDF, 1 text. Rotate and Flip only pass for the 29 images, because they already check that an engine on the route turns images.
Cause: for a same-format preset the check only asks the planner for a route from the format to itself (planner.CanConvert(mp3, mp3)), and that route exists through FFmpeg or the archive engine. It never asks whether the preset's image options mean anything for that format.
Found while measuring for #548: the new chip tooltip would list these formats as accepted.
I'll take this one and open a PR, then continue #548 on top of it.
What did you expect?
Half size, Grayscale, Trim transparent borders and Compress image are greyed out (with a reason) for formats that aren't pictures, like Rotate and Flip already are.
Not sure about Remove metadata: it also has PDF and media options, so PDF, audio and video look right, but it passes the same archive, subtitle, CAD and geo formats. Should those be greyed out too?
Steps to reproduce
Open the Donut toolbar page.
Select the Audio donut.
Look at Available presets: Half size, Grayscale, Trim transparent borders and Compress image are not greyed out.
Files involved
Any audio, video or archive format, e.g. MP3, MP4, ZIP.
Activity
fix(presets): offer same-format picture edits for images only (#565)
Merge pull request #604 from SeoJCalive/fix/565-image-only-presets