Test for pixel count in an image?
#1
Hello!

I'm now including by default logo.png (instead of the "default" videoplayer.cover) in DialogFullScreenInfo.xml. However, it's not completely satisfying. It seems that each logo.png is not necessarily the same size and some are bottom aligned, other are centered aligned. By looking at fanart.tv, I now understand that there is HD logo.png and "standard" logo.png that doesn't share the same concept (bottom vs centered) and that they are not the same size (HD:800x310; SD:400x155).

So, here's my question : Is it possible to test for pixel count (or any other attribute that would differentiate if it's the SD or HD logo that is inside logo.png).

Hopefully, my aim is to use logo.png if it's the HD version and clearart.png if it's the SD version.

Hope my question make sense.. Smile

Thanks!
#2
Can you not use <align>center,left ect and <aspectratio>stretch,scale, keep, ect tags?
Set the <posx> and <posy> relative to another control or something. And maybe even just set <width min="xx" max="xxx">auto<width> without height? Sorry i am probably not seeing the real problem...
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
#3
i think you cannot.

we aim to eventually replace every logo with the higher res one.
currently the lower aligned logo don't look that great so that's why we changed it after upgrading the resolution
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
#4
(2012-09-12, 18:52)MassIV Wrote: Can you not use <align>center,left ect and <aspectratio>stretch,scale, keep, ect tags?
Set the <posx> and <posy> relative to another control or something. And maybe even just set <width min="xx" max="xxx">auto<width> without height? Sorry i am probably not seeing the real problem...

Well, the problem is that bottom and center aligned images doesn't show the same way with hardcoded tag... The bottom aligned show is too low, while the center aligned is correctly placed. Well, at least imo Smile

Here's an example of 2 show. PLanet Earth has one logo.png with which is bottom-aligned while Human PLanet has center-aligned logo.png. Imo, the 2nd looks better. The problem summarize as : centered logo are slightly too high, while bottom logo are clearly too low.

Image
screenshot022 par Borghor, sur Flickr

Image
screenshot025 par Borghor, sur Flickr


(2012-09-12, 19:02)Martijn Wrote: i think you cannot.

we aim to eventually replace every logo with the higher res one.
currently the lower aligned logo don't look that great so that's why we changed it after upgrading the resolution

ok, thanks for the answer!. I'll code for the HD version then since SD will slowly disappear. Does that Artwork Downloader will replace SD version with HD version of logo.png?
#5
(2012-09-12, 19:50)Balinus Wrote: ok, thanks for the answer!. I'll code for the HD version then since SD will slowly disappear. Does that Artwork Downloader will replace SD version with HD version of logo.png?

Not currently because i need to add code to actually check current size that you have.
It will be one day when i have some spare time. Currently there aren't much high res ones available so i have no rush adding that.
It does already prefer high res above normal when nothing there. An option is to disable everything except logos and enable overwrite files in addon settings and then run it but that wouldn't do much good atm.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
#6
Great!. No worry about that, as long as it goes in the anticipated direction, I don't mind it it takes 12 months. Smile Anyway, as you say, there's not much HD logo.

Thanks again!
#7
Not sure if the PictureResolution infolabel is available here, but maybe something like this.
<visible>SubString(ListItem.PictureResolution,800)</visible>
But are they all exactly 800?
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
#8
(2012-09-12, 21:38)MassIV Wrote: Not sure if the PictureResolution infolabel is available here, but maybe something like this.
<visible>SubString(ListItem.PictureResolution,800)</visible>
But are they all exactly 800?

No that's for pictures(photos)
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
#9
Too bad :-) No worries, I'll use clearart.png for now until HD logo are more available, as clearart seems more streamlined between the HD and SD version.

Though, I much prefer logos! Smile But the feel and looks seems less finished when implemented like it is here.
#10
May I ask a possibly stupid question, but I have searched for a bunch of different variations in the hopes in finding something, and this thread was the only one that came close in the searches!!!

I just wanted to find out how and if it is possible to add the HD Logos (File naming in the case of a standard logo is "logo.png"), how would I add the HD Logo to show up on the floor crawler (would it be named something like "hdlogo.png" or "hd logo.png" or just "logo.png" but using the HD Logo in the place of the SD) and would I be able to mix it up and have the HD logo's of the tv shows I have downloaded and the SD logo's if there isn't an HD Logo available, or do all the tv shows logo's have to be HD for all of them to be displayedHuh

Sorry if this "Was" indeed a stupid question, but some help would be apreciated as I have been downloading the HD Logo's in the hopes of one day changing all the shows logo's to that.

Thanks
#11
Gadget, I think that Artwork Downloader will download the HD logo if available, then SD logo if not available. Both will be named logo.png. Hence, it would be impossible to have 2 different logo.

So, by using logo.png, you get either the SD or HD logo, as long as there is a logo.png in your folder. No need to worry whether or not if it's HD or SD (with the alignment exception I pointed out in this thread).
#12
Awesome, thanks a million for the reply, at least now I can start changing the SD for HD without upsetting the apple cart so to speak. I suppose I can just re-name the SD's to "logo.old.png" so that if there is anyone that can't use the HD's for whatever reason I can still accommodate them in that regard, but at least I can have the "Good Looking" ones on my system now. I would assume it would make me more eager to re-do the SD logo's into HD and then just upload them to FanArt.tv so other people can also benefit from them too.

Thanks again for clarifying this, it is most appreciated. :-) You certainly have made my day, and once again, apologies if this was a stupid question.
#13
Questions leading to acquisition of knowledge is never stupid Smile

Btw, skins won't look for "logo.old.png", so I'm not sure that would be a good direction to go. Uploading HD logo to Fanart.tv is Wink
#14
LoL, Cool, but what I meant was, that if I have an HD logo, but I still have the desire to keep the SD logo, I should be able to rename the SD logo to something like "logo.old.png" or "Logo.Old.png" just so that it was still in the folder with the other artwork, but XBMC should then only pick up the HD logo if it was named "logo.png", I'm just taking a gander here, as I had a mess up not too long ago where I named the new logo's I created and downloaded "Logo.png" and trust me XBMC did not take lightly to the word "logo" having the capital "L" LoL, so I was in quite a state not knowing why none of the new logo's I had weren't being displayed :-)

Ps. Have just finished redoing the "8 Simple Rules" logo (Yes, I know, I have a few "Golden Oldies" in my collection, LoL), but it is going to take me quite some time to re-do all the TV Shows Logo's, but I will keep trying to squeeze in one a day because I'm dying to see what difference it makes.

Ps. Ps. Thanks again for all your help in this regard. :-)
#15
heheheh "l" and "L". Blame that on Linux. Smile

Logout Mark Read Team Forum Stats Members Help
Test for pixel count in an image?0