Page 1 of 1

[solved] scaling up in view mode only stretches the image

Posted: Fri Apr 18, 2014 6:32 am
by hesral
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.

Re: scaling up in view mode only stretches the image

Posted: Thu Apr 24, 2014 4:27 am
by hesral
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:

Code: Select all

streamImg.src = streamImg.src.replace(/&scale=\d+&/, "&scale=" + scale + "&");
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.

Re: [solved] scaling up in view mode only stretches the imag

Posted: Fri Apr 25, 2014 1:36 am
by jHeron
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