Cover cropper - Creating Kodi style poster files from covers

Fetterbr

Member
Dec 10, 2010
98
5
i cant get it to load anything in windows 11, tryed all possibilities, i have the correct macic link. (fyi the latest ImageMagick has no convert.exe anymore)
 

Attachments

  • new cover cropper not loading anything.jpg
    new cover cropper not loading anything.jpg
    142.9 KB · Views: 2

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,737
5,131
Seems they integrated convert into magick now, gonna have to handle that. Thanks for letting me know.

Seems the ":" in the folder name is causing issues, will have to look into why that is. Japanese characters may not be handled properly and I didn't have any in my test files so I never noticed or it's specifically that character since the normal : is a forbidden character in windows and it may try to convert it or something.
 

Fetterbr

Member
Dec 10, 2010
98
5
Seems they integrated convert into magick now, gonna have to handle that. Thanks for letting me know.

Seems the ":" in the folder name is causing issues, will have to look into why that is. Japanese characters may not be handled properly and I didn't have any in my test files so I never noticed or it's specifically that character since the normal : is a forbidden character in windows and it may try to convert it or something.
it actually dosent matter what dvd-id picture i take with that sign or not or a full base folder with subfolders. its all the same i cant load any single one
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,737
5,131
Works perfectly fine for me without that unicode : so not sure why it wouldn't when it did before unless you've now got a problematic character in the base path somewhere. Haven't done tests yet so I might know more when I see which part is actually the problem with that.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,737
5,131
Here's a new version that fixes loading images with unicode characters in the path. Opencv, which is used for the edge detection, didn't like that so I had to do an extra conversion.

I left the console enabled(a black command line window will stay open while the software is running and will display debug messages and errors) so if this version still won't load anything, let me know what's written in there, likely in red(if an error).
 

Fetterbr

Member
Dec 10, 2010
98
5
ok its working beautiful now after you added these fix.
One thing i think i would like you to add is in the output suffix i said -Poster and Cover suffix i said -Fanart but when it comes to a folder with a picture and its not -Fanart but just .jpg maybe it could tell me if it should add -Fanart.* and than reproduce the -Poster.jpg. Anyway super thanks, i will test more but it looks fine. Let me keep this version with the cmd window incase something pops up

one request i have, please see the picture i added, i læike to have the middel area of the cover included in the Poster so i can always see the dvd.id on the picture but i cant move the bar more to the left, how do so the picture will be the same as the snippet i took
 

Attachments

  • Poster middle part with dvd.id name.jpg
    Poster middle part with dvd.id name.jpg
    138.2 KB · Views: 2

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,737
5,131
I did realize I need to add a way to have an empty suffix be valid, just tested to see if I could but I didn't allow it so I'll have to do something about that.
As for renaming covers, it's a little beyond the scope of the app since I don't want it to be managing the collection, but it's close enough and it would be useful to have so I'll probably add it as an option.

To include the spine of the cover in the poster, you would need to change the aspect ratio("DVD AR" and "BD AR") so it englobes both it and the front. A lower higher number will go further to the left, 0.785-0.79 seems to be about it.
The software enforces following the AR so all posters look basically the same in the media player.
It would never do it right automatically as-is though since it's looking specifically for the right spine edge, but I'll look into adding an option to change that.
 
Last edited:

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,737
5,131
I thought about it some more and decided against adding a way to rename the cover file.

It would be too much prone to potentially renaming the wrong thing if I automated it and asking about it would need to ask for a few things like if it needs to be renamed or copied, guard against replacing a potential other cover named properly, choose the right suffix if more than 1 in the list, stuff like that.

What I'm thinking of doing instead is to warn the user in some way(not sure how yet) if there is no detected cover with any suffixes from the list and clicking on the status bar when a cover is loaded will open the directory where it is located to make it easy to manually rename it.
For things to work right though, the order of operation matters a lot.
You would need to open the folder by clicking the status bar, save the poster in the app and then manually rename the cover or the app would not be able to find the cover anymore since the name changed.

Let me know if you think this isn't good enough or if you have thoughts on this.


I've added an error logging system(so shouldn't be a need for the console window to be enabled for debugging) with an option to disable it.

I added an option to detect an image file that exactly matches [code], which would usually be the folder name, and another that exactly matches [movie] which would be all the video files in the folder. Those will be loaded in the potential cover list even if they don't have any of the suffixes in their name.

I also added an option to detect the left side of the spine instead of the right which is default so the spine can be included automatically. Doesn't work quite as well as for the right side but works decent enough.

There is now an attempt to automatically detect the imagemagick folder if it's in the default installation folder and it will choose the right exe depending on if convert is available or not.

Also, I managed to fix the linux issue with the UI so there is no need for separate code anymore.


Just need to do the missing cover with suffix warning and fix a few more bugs I found.
 
Last edited:

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,737
5,131
Haven't had time to touch it since my last post and no time today either, should be able to this weekend.