Author: mherger
Date: Thu Apr 8 23:47:14 2010
New Revision: 8683
URL: http://svn.slimdevices.com/jive?rev=8683&view=rev
Log:
Bug: 15367
Description: partial workaround until this bug is fixed. As long as we don't
support auto-rotation based on EXIF data, at least use the IV option to rotate
images based on the image ratio
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
URL:
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua?rev=8683&r1=8682&r2=8683&view=diff
==============================================================================
---
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
(original)
+++
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
Thu Apr 8 23:47:14 2010
@@ -23,6 +23,7 @@
local table = require("jive.utils.table")
local string = require("jive.utils.string")
local json = require("json")
+local math = require("math")
local debug = require("jive.utils.debug")
local SocketHttp = require("jive.net.SocketHttp")
local SlimServer = require("jive.slim.SlimServer")
@@ -31,6 +32,7 @@
local Icon = require("jive.ui.Icon")
local Surface = require("jive.ui.Surface")
local Framework = require("jive.ui.Framework")
+local System = require("jive.System")
local jnt = jnt
local jiveMain = jiveMain
@@ -189,9 +191,16 @@
-- if an image url has the {resizeParams} placeholder, add
Squeezebox server resizing parameters
local resizeParams = "_" .. screenWidth .. "x" .. screenHeight
+ local rotation = self.applet:getSettings()["rotation"]
if self.applet:getSettings()["fullscreen"] then
resizeParams = resizeParams .. "_c"
+
+ -- if the device can rotate (Jive) make sure we get whatever is
the bigger ratio
+ elseif ( rotation == "yes" or (rotation == "auto" and
System:hasDeviceRotation()) )
+ and (screenWidth < screenHeight) then
+
+ resizeParams = "_" .. screenHeight .. "x" ..
(math.floor(screenHeight * screenHeight / screenWidth)) .. "_f"
end
urlString = string.gsub(urlString, "{resizeParams}",
resizeParams)
@@ -290,10 +299,6 @@
return icon
end
-function useAutoZoom(self)
- return false
-end
-
function getErrorMessage(self)
return self.error or self.applet:string("IMAGE_VIEWER_HTTP_ERROR_IMAGE")
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins