When I open a monitor set to be scaled 1/2* when viewing, the image get larger, but it seems that the image just got stretched to the new size. This is very noticeable on the timestamp, as it is totally unreadable, as a consequence of the descaling that I believe had occurred before the image got stretched. If I reload the view page it just goes back to the default 1/2* scale again. If I do the opposite, start off with a 100% scale, and descales to 1/2*, the image seems to be resized correctly, as the framerate increase over my slow connection.
Is this as intended, and is it something I can fix in the config?
This happens on zoneminder 1.27 on ubuntu server 12.04 using the iconnor ppa.
[solved] scaling up in view mode only stretches the image
[solved] scaling up in view mode only stretches the image
Last edited by hesral on Thu Apr 24, 2014 4:28 am, edited 1 time in total.
Re: scaling up in view mode only stretches the image
I fixed this for the classic skin by adding a line to the end of function changeScale() in /usr/share/zoneminder/skins/classic/views/js/watch.js
the line I added was:
It takes image source string, replaces the scale value by the new value, and set the image source value again to the new string.
Works like a charm for me, but it would be nice if some developer can have a look, and tell me if I broke something.
the line I added was:
Code: Select all
streamImg.src = streamImg.src.replace(/&scale=\d+&/, "&scale=" + scale + "&");
Works like a charm for me, but it would be nice if some developer can have a look, and tell me if I broke something.
Re: [solved] scaling up in view mode only stretches the imag
Thanks for posting your solution!
Now I see where to fix MY scaling issue, I posted about it here:
http://www.zoneminder.com/forums/viewto ... 31&t=22156
Cheers,
Jon
Now I see where to fix MY scaling issue, I posted about it here:
http://www.zoneminder.com/forums/viewto ... 31&t=22156
Cheers,
Jon