Grrr! Convert GIF to JPG?
#1
apparently xbmcgui is capable of resizing jpg images, but not gif. i'm dying here. can someone write me a gif to jpg converter script that will run on the xbox? pretty please?

i've been at a standstill on this script for over a month now, needing to resize gifs in xbmc and having no idea how, and i just discovered that jpgs apparently do it automatically....

ack.

any hope? any hope at all? i have no way to preprocess the images--they will be 620x620 gifs when they show up on my xbox, and i need them to draw at a smaller size than that (obviously)....
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#2
oh dear mate.. sounds like a tall order for us mere scripting minions.
compuserve own the compression algorithm used in gifs so i cant see there being a .py only solution. looks like you need python imaging library compiled for xbox (but it's big), or perhaps even some conversion functions added to xbmc/xbmcgui.

you might even have luck converting this gif to bitmap comverter from pascal to c, then compile as a tool with the openxdk. sounds like ballache though
Reply
#3
i don't see any logical reason why jpgs would rescale but gifs won't. the image library we use is quite happy to scale images as required (and can save images as jpg or whatever...). it just seems as though you've found a limitation with the code base that needs remedying.

please let me know the exact procedures your calling and exactly what is happening on screen.

if it's a bug on the xbmc side, i'm surprised we haven't been told about it before now, but there you go.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
i found the jpg resizing in the controlimage contstruction. all of my early testing was with gifs (because i started out working on the project that requires them), so i'd just assumed xbmc was very limited in what it could do with images.

so the third and fourth arguments of controlimage (width and height), i just assumed were to tell xbmc what size the image was, not what size you wanted it.

but i was testing a custom script i was writing for j0ly, and i set one of the sizes wrong, and got a resized image (scrunched all small). then i messed around with that for a while, got really excited, and figured that image resizing was added to xbmcgui with the latest release.

then i went back to dust off my old gif-dependent weather radar script, and it still didn't do a thing. i tested some, and it seemed like the problem was with gifs only, and probably always had been.

so that's that. i'll make up a test script so you can see what i'm trying to do, and recreate the problem i'm having. i'll edit this post with a link to it once i've got one worked up.

alexpoet
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#5
ack!

yeah, i half expected that as soon as i saw your post....

okay, the problem's more complicated than i thought, and it's mine. my basic test completely proved me wrong. xbmc resized the gif perfectly in a simple test.

i'll try to track through my code and see what's going wrong, then. thank you for the info jmarshall! if you hadn't spoken up...well, i wouldn't look so silly, but i'd also still be sitting around thinking xbmc was the problem.

:-)
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#6
no problem. at least that means i don't have to fix anything Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
okay, i retested it, and the problem seems to be my images. if i use a solid blue background gif with some text on it (just to clarify what it is), it shows up just fine, and resizes just fine.

if i use a particular downloaded image, it doesn't show up at full-size (which would be off the screen) or resized.

so it's still not your problem, but i'd welcome any help or guesses you may have. particularly if it could be something along the lines of "oh, that image must have transparency, so it can never be displayed," or "that's an 87a gif and we only support 89a" (i know, i know, that would be silly--it's just an example). at this point i've got no clue why it's not drawing. it's just not and, unsurprisingly, not giving any errors.

i've made up a test script that you can look at, if you're interested....

get the script here. copy those two image files into a "resize" subfolder of the scripts drive, and run it. i'm calling both images in the same way, and they seem to be the same kinda pictures. i can't see any obvious differences between them.

obviously i wouldn't call this a bug in xbmc, since it's just one particular picture (or, rather, set of pictures--nothing downloaded from the noaa website will work) having the problem. but i'd sure welcome any guesses you might have about what's going wrong....
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#8
alexpoet>> does this mean that you figure out for my script how to have a jpg resize itself to full screen??



thanks!


ps: alex is a great coder, and has helped me out alot!
Reply
#9
thanks for the compliment, j0ly! :-)

actually, yes, i have. i need to know more about your jpgs, though. i'll send you an email asking for the necessary details.
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply

Logout Mark Read Team Forum Stats Members Help
Grrr! Convert GIF to JPG?0