Java Applet Window forced smaller - Overlay text unreadable

Report and discuss bugs here!
Post Reply
Jii
Posts: 30
Joined: Wed Sep 08, 2004 10:46 am

Java Applet Window forced smaller - Overlay text unreadable

Post by Jii »

Hi, Malun!

I'm not sure if this can be accounted as a bug, but I just encountered a strange thing with stream Java Applet (Version 0.2.4):

I just changed my Webcam, which is capable of streaming image in 640x480 resolution. When I decided to force the Java Applet size to 320x240 from Yawcam's settings, from the Stream-leaflet (The original setting was "Real Image size"), the image was reduced as expected, but viewing the applet revealed a strange thing:

The overlay field is usually covering the entire horizontal area of the image, but now it was only half the size of the window. The text on the overlay was also reduced so small, that had become unreadable.

There exists a line of code the html file that specifies the height and width of the applet window, which, in my computer is set to 320x240. Could there be a conflict somewhere between Yawcam's settings and the applet's height/width-code that can cause this behavior?

If this is a bug, I'd like to call it "image double reduce-bug". :wink:
malun
Site Admin
Posts: 1591
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Hmm... I guess this problem has occured because of lack of information from me. :oops:

The background color will only show up behind text. So to make the background color show up all the way from left to right, I have added a lot of spaces after the real text. This is just a trick to force yawcam print the background color all the way.
Check in the overlay settings and you will notice all the extra spaces behind the text. If you want the background color to show up from left to right even when you run with the image size 640x480, then just hit the space-key some more times after the overlay text.

In other words, this is not a specific problem with the "forced applet size functionality". This will happen as soon as you set the image size bigger than 320x240 in the camera options. But as described above it is easy to fix ;-)

Regarding that the text become unreadable: Well, if you scale down the image the text will become hard to read. (But if you zoom in, the text should become clearer again.)

A final comment: You probably don't want to force the applet to a smaller image size than the actual image size that yawcam gets from the webcam. The image will probably not become clearer. The only thing that will happen is that the stream will consume more bandwidth.
The option to set the applet size was thought to be used to set the applet size bigger then the real image size. This will give a bigger viewing area but with the same bandwidth consumption.

Actually I'm a bit sad this wasn't a bug, because I really liked the name: "image double reduce-bug". :D

/malun
Jii
Posts: 30
Joined: Wed Sep 08, 2004 10:46 am

Post by Jii »

A final comment: You probably don't want to force the applet to a smaller image size than the actual image size that yawcam gets from the webcam. The image will probably not become clearer. The only thing that will happen is that the stream will consume more bandwidth.
The option to set the applet size was thought to be used to set the applet size bigger then the real image size. This will give a bigger viewing area but with the same bandwidth consumption.
My thought had been that the overlay was apart from the image and thus scaling the image would have no effect on it. I stand corrected. :)

Making the image clearer was actually not the reason for making the image smaller. The main reason was the bandwidth. I have only 512k outbound bandwidth and some of it is already taken by my Web server, FTP server, Network surveillance camera, TeamSpeak2, Kazaa Lite and Yawcam, so there are plenty of applications sending stuff out. :shock:

So if my webcam shows images in 640x480 and forcing the image size to 320x240 provides no cut in total bandwidth output, then the only option remaining is to set the image size to 640x480 and lower the quality somewhere between 25 and 50 so it reaches the bandwidth consumage to the same(ish) level with my old webcam, that threw frames at 320x240.

Since this is the case, then I need to know, which one is responsible for the image size shown in the applet; the settings in Yawcam, or the code in the html-file (or both)?

Oh by the way... Yawcam has been available for download in my web server for some time now. I check the version situation every week.

If you have the time, you may check my website. The address is:
http://driversite.dyndns.org/

Feel free to comment. :)
malun
Site Admin
Posts: 1591
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Jii wrote: So if my webcam shows images in 640x480 and forcing the image size to 320x240 provides no cut in total bandwidth output, then the only option remaining is to set the image size to 640x480 and lower the quality somewhere between 25 and 50 so it reaches the bandwidth consumage to the same(ish) level with my old webcam, that threw frames at 320x240.

Since this is the case, then I need to know, which one is responsible for the image size shown in the applet; the settings in Yawcam, or the code in the html-file (or both)?
The applet size settings located here: [settings->edit settings...->stream]
will control the size printed in the html-file. And the size in the html is the size the applet are going to get. This size however will only scale the image and not affect the bandwidth consumption.
If you don't want to scale the applet size set this setting to the option "Real image size".

The size setting located here: [settings->edit settings...->camera]
will control the actual image size that yawcam gets from the webcam.
The format setting here will affect the bandwidth consumption! This setting will also decide the size of all other output types, like http, ftp and file.

If you use the option "Real image size" as described above on [settings->edit settings...->stream], it is the format settings on [settings->edit settings...->camera] that will decide the size of the applet on the html-page.

If you want a bigger applet size but without a higher bandwidth consumption you should set the size in the format setting (on the camera settings page) small, and then scale the applet size bigger (on the stream settings page).
Jii wrote:Oh by the way... Yawcam has been available for download in my web server for some time now. I check the version situation every week.

If you have the time, you may check my website. The address is:
http://driversite.dyndns.org/

Feel free to comment. :)
Looking good! :D

/malun
Jii
Posts: 30
Joined: Wed Sep 08, 2004 10:46 am

Post by Jii »

The size setting located here: [settings->edit settings...->camera]
will control the actual image size that yawcam gets from the webcam.
The format setting here will affect the bandwidth consumption! This setting will also decide the size of all other output types, like http, ftp and file.

If you use the option "Real image size" as described above on [settings->edit settings...->stream], it is the format settings on [settings->edit settings...->camera] that will decide the size of the applet on the html-page.
Thanks for the clarification. Let's see how the overlay texts behaves with these instructions. :)
Looking good! :D
Feel free to point the file from my FTP server to your site's download section. That should balance download traffic a bit from your site when new version arrives. :)
malun
Site Admin
Posts: 1591
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Feel free to point the file from my FTP server to your site's download section. That should balance download traffic a bit from your site when new version arrives.
Thanks for your offer! The Only problem is that I then will have to rewrite my download counting script... You know... I'm lazy ;-)

/malun
Post Reply