New Release: jpegwriter

Discussion in 'TiVo Underground' started by The Jake, Jan 11, 2002.

  1. The Jake

    The Jake New Member

    9
    0
    Nov 30, 2001
    http://www.allaboutjake.com/tivo/jpegwriter.html

    For your enjoyment. Display JPEGs on your Tivo.

    Consider it pre-beta software. Use at your own risk. It has no error handling capability to speak of. It pretty much just dumps a JPEG to your OSD.

    If you're really slick, you can use it to write a nice TCL script to do a slide show or something. I might get around to adding slide show capabilities to another jpeg app in the future.

    Enjoy, and please send me your bugs. but read this carefully:
    USE JPEGWRITER AT YOUR OWN RISK!

    It worked for the 10 or so JPEGs I tried. Thats no guarantee it will work for every one.

    Jake
     
  2. feldon23

    feldon23 MythBuster

    2,096
    0
    Mar 13, 2001
    Houston, TX
    Got enough disclaimers?
     
  3. controlio

    controlio New Member

    51
    0
    Jan 16, 2001
    Garden...
    Do not taunt JPG2OSD.
     
  4. The Jake

    The Jake New Member

    9
    0
    Nov 30, 2001
    Hehe, no, never enough disclaimers. :)

    as for jpg2osd, didn't know it existed or I might not have bothered with this... even so, I haven't found it anywhere... search on google was negative, as was a search in this forum.

    Jake
     
  5. alatar

    alatar New Member

    5
    0
    Aug 29, 2001
    Lawrencevill...
    So far, it has worked for everyone I've tried, various sizes and shapes. But I would like for them to display a little larger. But I'm not complaining. I think this is awesome. Can't wait to show it off later.

    Alatar
    Philips 82-hr SA
     
  6. The Jake

    The Jake New Member

    9
    0
    Nov 30, 2001
    The JPEG library supports scaling at 1/2 1/4 or 1/8th its actual size. The API supports scaling to any fraction, but the implementation of libjpeg only supports those fractions.

    JPEG writer bascially starts at 1/1, if it fits, then fine, if not, it tries 1/2, then 1/4, then 1/8-- until it fits.

    Basically, any image smaller than 700 wide x 460 tall should be displayed at the 1/1 ratio.

    If you find any problems, or have any suggestions, let me know.

    Jake
     
  7. kronos80

    kronos80 New Member

    9
    0
    Mar 24, 2001
    Using all the standard disclaimers...

    Here is a tivoweb module to make use of jpegwriter.

    1) Just place this in your tivoweb modules directory.

    2) Place jpegwriter and all your jpegs into /var/hack/pics.

    3) Restart tivoweb.

    Thanks Jake and ligntn for these tools. I know I use them almost everyday.

    kronos80

    shawn@esemay.com
     
  8. Otto

    Otto New Member

    1,028
    0
    Mar 25, 2000
    Might be good to attach the file or at least point to where it's located. ;)
     
  9. kronos80

    kronos80 New Member

    9
    0
    Mar 24, 2001
    woops
     

    Attached Files:

    • jpeg.zip
      File size:
      666 bytes
      Views:
      533
  10. Richy_T

    Richy_T New Member

    2
    0
    Jan 8, 2002
    Is there any information on the osd routines?
     
  11. GregV

    GregV ..............

    19
    0
    Dec 27, 2000
    New York
    Just curious, but are you resampling the image when you scale down? i.e. when you display at 1/2, do you throw out every other line or average every pair together?

    Since you're only supporting 1/2, 1/4, and 1/8, it would be pretty easy to resample the images to improve display quality. It's when you're not scaling evenly that the code becomes harder and more processor-intensive.
     
  12. The Jake

    The Jake New Member

    9
    0
    Nov 30, 2001
    Richy:

    Look at the released source to tivovbi if you want to learn about the OSD. Thats what I did.

    Greg:

    Actually, the scaling is done by libjpeg, not by me. LibJpeg lets you select a scaling factor out of those you listed. Actaully, when using those scaling factors, the JPEG decompression process is simplified and takes less processing power than the entire image.

    So basically, if scaling to 1/2, 1/4 or 1/8, its much more economical to use LibJPEG, since it simplifies the JPEG decompression. However, to scale to an abritrary factor, I'd have to include a secondary image scaling routine.

    I was looking for a simple library that has the ability to scale images, but I didn't look that hard and kind of lost interest. :)

    Jake
     
  13. Zodiacal

    Zodiacal New Member

    6
    0
    Apr 3, 2003
    i got it to display on my tivo but how to i get it to go away?
     
  14. Graham Cobb

    Graham Cobb Occasional Hacker

    10
    0
    Nov 3, 2002
    Cotswolds, UK
    I have created a new version of jpegwriter, based on Jake's original. As well as fixing a small bug (which fixed a crash on one image for me) the main change is to add options to control the placement of the image on the screen. This includes an option to use UK (PAL) screen dimensions.

    Many thanks are, of course, due to Jake for releasing his code under the GPL. However, bear in mind that Jake has no responsibility for this version and for all the bugs I have no doubt introduced into his fine code!

    Jpegwriter V1.1 is available from http://www.cobb.uk.net/Tivo/Jpegwriter/ .

    Let me know if you find any problems with this version.

    P.S. I have a new version of slideshow as well, but that is a note for a different topic.
     
  15. Zirak

    Zirak Member

    973
    0
    Apr 24, 2002
    New York
    This version also does a better job of "centering" the image, leaving "less" (to none) chopped off by the right hand side of the screen. :up:

    However, it has an odd behavior that version 1.0 did not have. jpegwriter has no "clear screen" option. Pressing live-tv will clear the image, and "reset" the tivos color properties back to the "tivo standard." (Likely the pallete is the issue) However, if you press something else, say the right arrow to bring up the current channel display, it leaves garbage on the screen. (Both 1.0 and 1.1 did this)

    However with 1.0 you can effectively clear the screen by displaying a "blank" jpeg, and the garbage doesn't reappear when you right arrow. With 1.1 the blank jpeg will clear the screen but the garbage will reappear when you press the right arrow key.

    live-tv is apparently the only button that will "clear" the problem. Changing channels, hitting enter, etc all leave garbage on the screen. This makes it problematic to clear the screen programmatic.

    An option to jpegwriter to return the tivo back to its default settings along with clearing the image would be useful. Alternatively restoring the original behavior of being able to effectively clear the screen using a blank jpeg would also work, the former being preferable.

    I prefer the output of version 1.1 and would like to use that version to display the weather maps in TCS, but, IMHO, the inability to clear the screen, even by the convoluted method of using a blank jpeg makes it more of a pain than the display improvement is worth, at least in how I am using it.

    Will you consider adding an option to clear the screen, or be willing to investigate how to get the "blank" jpeg option working again?

    Writing the screen with 1.1 and "clearing" it with 1.0 works, but thats rather ugly.

    (Well, clearing the screen with a blank jpeg is also ugly, but when you pile more ugliness on top of ugly...)

    If you want a copy of blank.jpg, its in the TCS distribution, or I will provide a direct link, if you like.
     
  16. acacia

    acacia OccasionalTivoHacker

    36
    0
    Aug 23, 2003
    London
    I can't seem to get the tivoweb module jpeg.itcl to display files starting with r. It chops off the first character.

    Attached is the version I was playing with (difference: it shows the full pathname before the link) : I've got it working for most files, but those starting with lower case r are not listing properly

    /var/hack/pics/rose.jpg ose.jpg


    e.g. rose.jpg displays in the list as ose.jpg and causes:




    INTERNAL SERVER ERROR
    --cut here--
    action_jpeg '/ose' ''
    jpegwriter - v1.1 by Graham R. Cobb (c) 2003 Graham R. Cobb
    --> Derived from jpegwriter - v1.0b by Jake B. (c) 2002 Jake B.
    --> TiVo and the TiVo logo are trademarks of TiVo Inc.
    --> Thanks (yet again) to [mbm] for all his help.
    --> libosd: 1.1 - libosd (c) 2003 Graham R. Cobb

    Error opening file: /var/hack/pics/ose.jpg
    while executing
    "exec /bin/bash -c "/var/hack/pics/jpegwriter -P /var/hack/pics/$path.jpg" "
    (procedure "::action_jpeg" line 16)
    invoked from within
    "::action_$action $chan $part $env"
    ("eval" body line 1)
    invoked from within
    "eval {::action_$action $chan $part $env}"
    --cut here--


    I can rename the files as a quick workaround, but any help appreciated. - I'm guessing its the way TCL is doing string manipulation on the pathnames - is /r an escaped character or something?


    regards,

    Jonathan
     

    Attached Files:

  17. uktivo

    uktivo New Member

    170
    0
    Nov 9, 2003
    erm how do you install it? I read the readme and it makes no mention of installation?
     
  18. john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    Version 1.2 is an extension of the latest version (v1.1) that includes support for clearing the on screen display.

    Version 1.0a-p1 is an extension of the oldest version (v1.0a) that includes support for clearing the on screen display and is just included for completeness.

    Most of you will just be after the jpegwriter binary found in jpegwriter-1.2.zip
     

    Attached Files:

  19. Graham Cobb

    Graham Cobb Occasional Hacker

    10
    0
    Nov 3, 2002
    Cotswolds, UK
  20. john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    libosd(1.4) now resets the geometry and colour palette of the screen - this allows your to clear the screen and then display characters to it with newtext2osd which was not previously possible as newtext2osd does not provide its own palette.

    jpegwriter(1.3) now detects if it is a UK or US Tivo in an attempt to default to the correct screen geometry (eg PAL vs NTSC), and includes the new libosd library.
     

    Attached Files:

Share This Page