Possible to remove cover art if smaller than specific dimensions/size?

Maybe I just didn't use the right search query but couldn't find if it's currently possible to tell Mp3Tag using an action to remove a file's cover art if the image dimensions are smaller than a particular width/height.

Basically there's a podcast I download that has begun using 300x300px cover art where before they embedded 512x512px art, but I can't be sure they won't go back to using the larger art again so only want to remove the art (and afterward replace manually with a larger size) if the dimensions are of the smaller art.

Is there a way to accomplish this or would it fall under a new feature suggestion?

As I understand you want to replace smaller cover-art with larger cover-art anyway.
So why remove smaller cover art first?

Just sort (defining a column) or filter for the smaller cover-art, look for larger cover-art and replace the smaller ones.

The thing is, I have an action I run on each episode to format the tags already, so I don't have a list of files that feature the smaller art since I process each episode weekly and they're all up to date.

I should probably also mention the cover art changes per episode, which I'd forgotten to add to the OP. Because of this just wondered if there's a way to auto remove cover art based on dimensions at all since it's an extra step currently.

Alternatively if there was an option to change the drag-and-drop behavior of cover art so that dropping an image replaced the 'Front' cover instead of adding it as another image that would also save a step. Maybe as a modifier+mouse drop like Alt+Drop to replace whatever the particular visible art is, whether front/back/etc, might be one thing to consider (unless I've missed an existing option).

So you need this action just to remove the cover-art of only just new incoming files?

Otherwise it should be no problem to once load all files, mark the filtered or sorted with small dimensions, right-click on the displayed cover-field in the tag-panel, and say: "Remove cover".

There is also an action-type "Import Cover from Files" which has the option to replace existing covers.

Probably it is actually not possible.
The only way I see to remove a picture with an action is the "remove fields" action and the fieldname PICTURE.
But I do not see any way to conditionally trigger this action.
The other tweak to write \\ or $char(0) into a field to delete it (format value) does not work for PICTURE...

Thanks for the replies. So I guess as-is not possible yet, the way I'm doing it, though good tip by @poster about a cover art dimensions column should I need it for lists of files anytime :+1:

Hello!

I'd like to revive this thread if possible to double-check with the devs / @Florian if there has been any changes in programmatically removing or adjusting cover art.

Here are some hypothetical usecases and scripting syntax where this would be awesome to use:

  • FORMAT VALUE: PICTURE = $ifgreater(%cover_width%,1200,$adjustcover(JPG,1200),%PICTURE%)

So in the pseudo-example above, I'd be trying to express: "if the album art has a width larger than 1200px, then resize as a JPEG to a max-width of 1200px, else keep it as-is".

  • FORMAT VALUE: PICTURE = $if($eql(1,%compilation%),,%PICTURE%)

Here's another pseudo-example, which expresses: "if the compilation tag == 1, then remove the album art, else keep it as-is".

Having some way to wrangle cover art in the "Format Value" action type would be so powerful! Curious to know if anything like this is in the development pipeline. :slight_smile:

Cheers,
Aswin

Please have a look at the changelog:
https://www.mp3tag.de/changelog.html
(and search for "cover" to find
[2020-01-14] NEW: action type 'Adjust cover' to resize cover art via actions. (#4662, #12512, #15355, #18061, #45228)

Or have a look at the help on actions:
https://help.mp3tag.de/options_format.html

see the help on filters:
https://help.mp3tag.de/main_filter.html
and on scripting functions:
https://help.mp3tag.de/main_scripting.html