Posts: 17,390
Joined: Aug 2007
Reputation:
584
Hitcher
Team-Kodi Member
Posts: 17,390
They're different for every skin.
Posts: 2,571
Joined: Aug 2012
Reputation:
217
We seem to have a standard definition for an icon size (256x256), fanart (1280x720 or 1920x1080) and a thumbnail having a 16:9 aspect ratio for skins/addons.
It seems we need to define a standard poster size and/or aspect ratio.
I'm thinking that it should become the addon's responsibility to provide provide the best resolution image it can in the correct aspect ratio and standard size for a given defined image (content) type. This may mean using something like PIL to take a smaller, oddly sized image provided by a website and merge it on a correctly sized background to provide the image to the skin. This would allow the addon to load an appropriate image from the source website and transform it into a standard usable image for a skin. If a skin needs to change the size or aspect ratio from the standard definition it becomes the skin's problem to re-size.
I think something like this will work whether the images come from a source website or a metadata source for an addon.
Another way to do this may be to have the skin provide standard sized background images for each content type and have the addon either mount an appropriately sized image on the background image or pass the image to the skin to mount. This may produce a better looking result for some skins depending on the background image they provide.
So,
1) Is it possible to define an image standard for each content view?
2) is it possible to provide PIL (Python Imaging Library) as a standard library for addons if the above makes sense?
3) is there a way to pass standard background images for a content type from a skin to an addon?
Posts: 2,571
Joined: Aug 2012
Reputation:
217
I agree with 99% of what you're saying above.
The issue is that even setting all the content types correctly does not fix the problem completely.
It is compounded by skins having their own interpretation of how each image type is sized or it's aspect characteristics. Getting all skins to use the a standard size image definition does not solve the problem completely.
The addon passing the skin images of odd sizes is really the issue.
The conversation is one about how to address that issue.
I am absolutely NOT enthralled with using a solution at addon level to resize images. But I do believe that the addon developer is the authority about what size images can be provided by a website and how best to present those images with standard characteristics. In some cases this may mean that an addon developer needs to do nothing because the images he has are a reasonable fit. In other cases it becomes necessary to process the image to provide something that the skin can use correctly. In an effort to avoid "hackish" solutions, it would seem reasonable to provide the addon dev with a standard set of tools to achieve that.
I was driven by something more basic and to your point about not repeatedly processing images to propose that the addon be responsible for the resizing: I was guessing that the Kodi thumbnail cache is storing the image as passed from the addon and not the skin.
If resizing is needed at any level to fix the problem, the issue of slow or less powerful platforms still exists.
You are probably correct in saying that the resizing shouldn't be done by the addon, but there do seem to be times when it may be appropriate.
BTW - my 1% deviation is that I find it amusing that an addon dev who hates "hackish" things would think that addon development is anything else but - isn't that what makes it fun?
Posts: 17,390
Joined: Aug 2007
Reputation:
584
Hitcher
Team-Kodi Member
Posts: 17,390
It's not the size of images that's the problem; it's their aspect ratios. Movie and TV show views will use a portrait aspect ratio, episode views will use landscape, and everything else will be square.
Posts: 17,390
Joined: Aug 2007
Reputation:
584
Hitcher
Team-Kodi Member
Posts: 17,390
Just set the content based on the aspect ratio of the images used rather than the actual content type.
So if your addon supplies movies but they use landscape style images set the content to episodes.
Hope that makes sense.
Posts: 17,390
Joined: Aug 2007
Reputation:
584
Hitcher
Team-Kodi Member
Posts: 17,390
2015-05-18, 18:01
(This post was last modified: 2015-05-18, 18:09 by Hitcher.)
Sorry, didn't realise addons could also set the art type.
EDIT: Just a shame we don't have ListItem.Art(square) and I think everything would be covered.