Forum Discussion

brocker's avatar
brocker
Visitor
15 years ago

Setting images from a URL not PKG

Hi all,

What is the proper syntax for calling a image file that is not hosted within the project? I know in the example projects there are images in folders, but if I want to link to one that's hosted at BrightCove, what would be the proper way to do that?

ABBREVIATED EXAMPLE

Sub initTheme()

app = CreateObject("roAppManager")
theme = CreateObject("roAssociativeArray")
theme.OverhangSliceSD = "pkg:/images/Overhang_BackgroundSlice_Blue_SD43.png" '<<==NORMAL WAY TO SET IMAGES
theme.OverhangLogoSD = <WHAT URL FORMATTING GOES HERE??>
app.SetTheme(theme)

End Sub


I tried several different combinations and they all didn't seem to work.

Thanks
Bud

16 Replies

  • "brocker" wrote:
    I was actually trying to offload as many images as I could as I read there is a limitation to what can be saved to the Roku, and they suggested hosting them elsewhere if you have a bunch (which I will). I already got a couple of warnings when side loading the project that I'm going over on size.

    I had our graphic artist go through and make images as per dimensional guidelines, now was hoping to host them at BrightCove.

    Thanks
    Bud
    If you're using png (and you should be 🙂 ), you can 'pngcrush' the files to reduce them to the smallest possible size, without any quality loss. Here's good forum post on the topic: http://davidwalsh.name/pngcrush

    It's available on most platforms (win,lin,mac,etc.)
    http://pmt.sourceforge.net/pngcrush/
  • jbrave's avatar
    jbrave
    Channel Surfer
    Actually, the most effective png (and .jpg actually) size reduction tool is Adobe ImageReady. I believe the functions of ImageReady have been integrated in photoshop in recent versions, look for an Optimize menu. Recent channels I've worked on I've managed to squish down to 30 to 80k by doing lots of work optimizing the images. The default images included in the Roku examples are really quite large in file size and can be reduced dramatically without losing any visible quality.

    - Joel
  • "jbrave" wrote:
    Actually, the most effective png (and .jpg actually) size reduction tool is Adobe ImageReady.


    Is that tested? I'm not saying pngcrush IS faster, but it actually brute force searches through a fairly large set of optimizations and compression techniques until it finds the one that worked best for that particular image.
  • jbrave's avatar
    jbrave
    Channel Surfer
    Faster? I don't know, but I'm getting equal or better crushing from adobe, and great .jpg optimization as well - a 50% jpg saved from photoshop without the optimize function looks kinda yucky, whereas a 50% from ImageReady looks great. I used pngcrusher till I discovered that ImageReady (and this is like the last PPC only version of Photoshop/imageready, before mac came out with Intel Processors, so it runs under Rosetta) does a better job on both the file size and the quality of .png file.

    Edit: also dropping an ImageReady processed .png on pngcrush does not usually result in a smaller file.

    - Joel
  • I'm still googling, but it looks like pngcrusher(a mac utlitity using a different png-reduction library) is different than pngcrush.
    http://www.macupdate.com/app/mac/17768/pngcrusher
    http://optipng.sourceforge.net/pngtech/optipng.html
    http://drupal.org/node/483794

    And that last link lists several other image optimization options. Which is best appears to be a matter of some debate ;). In any event, I think everyone agrees it certainly pays to optimize the images. 🙂
  • "jbrave" wrote:
    Faster? I don't know, but I'm getting equal or better crushing from adobe, and great .jpg optimization as well - a 50% jpg saved from photoshop without the optimize function looks kinda yucky, whereas a 50% from ImageReady looks great. I used pngcrusher till I discovered that ImageReady (and this is like the last PPC only version of Photoshop/imageready, before mac came out with Intel Processors, so it runs under Rosetta) does a better job on both the file size and the quality of .png file.


    Maybe we're talking about different things? Pngcrush only reduces unneeded data in the PNG file (throws away comments, etc), and tries different compression techniques to encode the exact same data, comparing the resulting sizes. By it's nature there is absolutely no data loss. In referring to 50% and a different quality in appearance between PhotoShop and ImageReady, you seem to indicate you are referring to quality level of the saved file, which is something else.



    I'll admit that's pretty good evidence in ImageReady's favor.