TiVo Community Forum banner
1 - 20 of 26 Posts

·
Registered
Joined
·
11 Posts
Discussion Starter · #1 ·
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
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #4 ·
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
 

·
Registered
Joined
·
5 Posts
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
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #6 ·
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
 

·
Registered
Joined
·
9 Posts
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

[email protected]
 

·
Banned
Joined
·
1,028 Posts
Originally posted by kronos80
Using all the standard disclaimers...

Here is a tivoweb module to make use of jpegwriter.
Might be good to attach the file or at least point to where it's located. ;)
 

·
..............
Joined
·
19 Posts
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.
 

·
Registered
Joined
·
11 Posts
Discussion Starter · #12 ·
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
 

·
Occasional Hacker
Joined
·
10 Posts
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.
 

·
Registered
Joined
·
973 Posts
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.
 

·
OccasionalTivoHacker
Joined
·
36 Posts
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
 

Attachments

·
Registered
Joined
·
179 Posts
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
 

Attachments

·
Registered
Joined
·
179 Posts
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.
 

Attachments

1 - 20 of 26 Posts
Top