enzo1982 / freac

The fre:ac audio converter project
https://www.freac.org/
GNU General Public License v2.0
1.43k stars 76 forks source link

Resizing cover images #480

Open cirdanlunae opened 1 year ago

cirdanlunae commented 1 year ago

Is your feature request related to a problem? Please describe. Some devices, such as those running Rockbox, don't accept images over a certain resolution. For those using FREAC to transcode music for DAPs running Rockbox, an extra step is needed to resize images for covers.

Describe the solution you'd like A UI option to resize Covers under the Cover Art options. Presets like 250x250, 500x500, etc would be useful

Describe alternatives you've considered I currently use mogrify to do it in bulk, but with a large collection, it can take a long time to search for files that need to be converted rather than having it resized upon transcoding

mrfragger commented 1 year ago

imgp -wOcken -q 80 -x 350x350 is extremely fast https://github.com/jarun/imgp

btw I only do black image covers since I want subtitles for all audiobooks so do

for f in *.opus ; do kid3-cli -c "set picture:'' ''" -c "set picture:'./blackcover.png' 'Front cover'" "$f" ; done

which is a png 1KB image 833 x 355 which is 2:35:1 aspect ratio

Lee-Carre commented 1 year ago

Some devices, such as those running Rockbox, don't accept images over a certain resolution.

The solution (rather than a work-around), it would seem to me, is to have multiple images of differing dimensions, in the metadata, and have reading/playback software (Rockbox, in this case) use whichever it prefers.

It would also be better, instead of resizing images, to only use ones of the desired size in the first place. Depends where and how you're getting those images, though.

However, …

Resizing cover images

There are a variety of tools for doing this. It depends on your usage/UI preferences.

Like mrfragger mentioned, a command-line image processor is going to be fastest, especially for batch-processing and repeated use.

I didn't know of imgp, so thanks for the pointer, @mrfragger.

More generic image-processing tools would include the likes of ImageMagick (a popular package which does lots). There's many others, if you go looking for them. If you have GIMP installed, then it, too, can be driven via the command line and scripting, and would definitely be able to handle something simple like resizing. I think GIMP may have a GUI tool, for batch-processing images in such ways, if you're more comfortable with a GUI than a CLI.

For CLI, I would recommend authoring a shell script, so that it's easy to repeat the process (with your preferred parameters) on various images, both now and in the future. If you're unfamiliar with the command line, then I would recommend Introduction to the Command Line, which not only covers (some of) the how, but also why you'd want to use it.

I think MusicBrainz Picard (a GUI tool) is also able to manipulate cover-art.

WreckageBrother commented 1 month ago

So any solution? I also desperately want this feature..