colorbox

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #1
So new question how does the blur effect work with color box... Can it show fanart blurred on the fly as soon as the item is highlighted?

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
(This post was last modified: 2017-02-27 21:35 by smitchell6879.)
find quote
badaas Offline
Skilled Skinner
Posts: 641
Joined: Dec 2014
Reputation: 21
Post: #2
Yes, If using github version check skin.APEx or skin.mimix (on github @ https://github.com/BADMS/skin.mimix)
Or readme on github if using repo version.
find quote
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #3
I read through it a time or two... I have the code in the startup.xml to create the cache folder... And this is the noob in me but how would I actually code it to run the script..... I have a control list and I want the fanart that is in the background to be blurred as I go thru the dynamic list... Is the fast enough not to cause a issue blurring a lot of images? And mostly how would I use the window property to see the out put image.

I know I a. Asking a lot... The window property I just haven't got to work yet... I guess I can't figure out the correct way to use it.

Thanks for any advice

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
badaas Offline
Skilled Skinner
Posts: 641
Joined: Dec 2014
Reputation: 21
Post: #4
Ok, which version of cbox? Installed via kodi or from github? (The github version is easier to use, but obviously not in repo yet).


If it is running below should work, check /kodi/userdata/addon_data/script.colorbox/ for processed images.
It will cache them for faster access.
It will process current 'ListItem.Art(fanart)'.

Code:
            <control type="image">
                <aspectratio align="center">scale</aspectratio>
                <texture background="true">$INFO[Window(home).Property(ImageFiltercfa)]</texture>
            </control>

Or you can use a button, ie. onfocus in focused item to send a request to process whatever you like. (Or use <onload> etc, anything that can fire a command).
But this won't always get caught quick enough so best used for 'occasional' art, ie. video info background, etc.

Code:
            <onfocus>RunScript(script.colorbox,info=pixelate,id='"'$INFO[ListItem.Art(thumb)]"',pixels=10_SIZE,prefix=My_pixelled_thumb)</onfocus>

You will then have use as '$INFO[Window(home).Property(My_pixelled_thumb.Image)]'.
find quote
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #5
Alright cool so I was using it somewhat right... I will have to try with a static background I am guess as your say on the onfocus is what I was using. My PC must just be to slow to process it on the fly. Thanks for your help.

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
badaas Offline
Skilled Skinner
Posts: 641
Joined: Dec 2014
Reputation: 21
Post: #6
read the readme @ https://github.com/BADMS/script.colorbox.../Readme.md

Forgot you need to tell daemon what effect!

So for example in startup.xml

Code:
    <onload>SetProperty(cfa_daemon_set,blur,home)</onload>

It will take time to process image first of all, then is instant once cached.
(This post was last modified: 2017-01-12 22:53 by badaas.)
find quote
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #7
Alright I will try once again

My startup will be set cache. And set property...
Then my window is 5000. So I put <onload>RunScript(script.colorbox,info=bluronly,id='"'$INFO[Container(9001).ListItem.Art(fanart)]"', radius=10,prefix=BlurFanart)</onload>

Then I can use $INFO[Window.(home). Property (BlurFanart.Image)]. To get the image to show?

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
badaas Offline
Skilled Skinner
Posts: 641
Joined: Dec 2014
Reputation: 21
Post: #8
Yes.
It should also process current windows ListItem.Art(fanart) auto if daemon is set up.
find quote
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #9
Cool will try again it will be later tonight.. thank you for the help

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
badaas Offline
Skilled Skinner
Posts: 641
Joined: Dec 2014
Reputation: 21
Post: #10
Check skin.eunique for jarvis, uses colorbox a lot

https://github.com/im85288/skin.eunique
find quote
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #11
This is what I get when running colorbox. not sure where I am screwing up.

Code:
20:39:37.266 T:14380   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: invalid literal for int() with base 10: '10_SIZE'
                                            Traceback (most recent call last):
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 411, in <module>
                                                ColorBoxMain()
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 26, in __init__
                                                self._parse_argv()
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 376, in _parse_argv
                                                self.pixels = int(arg[7:])
                                            ValueError: invalid literal for int() with base 10: '10_SIZE'
                                            -->End of Python script error report<--
20:40:01.465 T:2532   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnboundLocalError'>
                                            Error Contents: local variable 'imagecolor' referenced before assignment
                                            Traceback (most recent call last):
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 411, in <module>
                                                ColorBoxMain()
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 31, in __init__
                                                self._StartInfoActions()
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 295, in _StartInfoActions
                                                HOME.setProperty(self.prefix + "ImageCColor", Complementary_Color(imagecolor))
                                            UnboundLocalError: local variable 'imagecolor' referenced before assignment
                                            -->End of Python script error report<--
20:42:10.238 T:13472   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: invalid literal for int() with base 16: ''
                                            Traceback (most recent call last):
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 411, in <module>
                                                ColorBoxMain()
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 31, in __init__
                                                self._StartInfoActions()
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\default.py", line 291, in _StartInfoActions
                                                HOME.setProperty(self.prefix + "ImageCColor", Complementary_Color(imagecolor))
                                              File "H:\Kodi_17_RC3\Kodi\portable_data\addons\script.colorbox\resources\lib\Utils.py​", line 44, in Complementary_Color
                                                comp = ['%02X' % (255 - int(a, 16)) for a in rgb]
                                            ValueError: invalid literal for int() with base 16: ''
                                            -->End of Python script error report<--
[/code]

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
badaas Offline
Skilled Skinner
Posts: 641
Joined: Dec 2014
Reputation: 21
Post: #12
Pass '10' not '10_SIZE'.

The other error I'll check when home.
Which version of colorbox, github or repo?
(This post was last modified: 2017-01-18 12:11 by badaas.)
find quote
badaas Offline
Skilled Skinner
Posts: 641
Joined: Dec 2014
Reputation: 21
Post: #13
Pixelate error fixed, the other error is yours Big Grin
find quote
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #14
Alright I will try again later for now I made a new overlay that I really like and everything is running so smoothly ATM..But will try it again at some point .

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
smitchell6879 Offline
Posting Freak
Posts: 816
Joined: Jan 2016
Reputation: 20
Post: #15
So it works it is writing the image to the user data folder but I am having my normal window home property issue where I am using it wrong or aiming becuase I can not get the image to show as the background..

I have exactly what you have for the image control example I added width and height.... O deamen doesn't work for me I am using RunScript on load of window... Which works no errors log says susseful I just can't get the $info of the window property to work.

Sorry for the annoyance....

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
Post Reply