diff options
author | Andreas Brachold <vdr07@deltab.de> | 2006-01-19 16:45:07 +0000 |
---|---|---|
committer | Andreas Brachold <vdr07@deltab.de> | 2006-01-19 16:45:07 +0000 |
commit | edf241b13a0a965b04857258c41ca190b5afa415 (patch) | |
tree | e40634050a9ec2e4a8552159142d61c9a7b329fa | |
parent | eba89a47264b7c81d6248cdad8d03a57718979a5 (diff) | |
download | vdr-plugin-image-edf241b13a0a965b04857258c41ca190b5afa415.tar.gz vdr-plugin-image-edf241b13a0a965b04857258c41ca190b5afa415.tar.bz2 |
- fix wrong limits on NTSC zoom mode
- fix consider the border values at zoom mode
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | control-image.c | 25 | ||||
-rw-r--r-- | control-image.h | 4 |
4 files changed, 21 insertions, 13 deletions
@@ -1,6 +1,10 @@ VDR Plugin 'image' Revision History ----------------------------------- +2006-01-19 +- fix wrong limits on NTSC zoom mode +- fix consider the border values at zoom mode + 2006-01-18 - fix first image was'nt rotation depends founded exif data - fix show vdr info screen via official vdr way @@ -3,6 +3,5 @@ TODO Proper Scale on 16:9 Change BLUE/EXIT > Stop to BLUE > Stop / EXIT > reshow Browser -reload Image after commands execution, if image changed Add dejitter / horizontal 1px blur diff --git a/control-image.c b/control-image.c index 5f53a29..5ec2307 100644 --- a/control-image.c +++ b/control-image.c @@ -741,6 +741,9 @@ void cImageControl::PictureZoomInitial(void) cImage* pImage = theSlideShow.GetImage(); if(!pImage) return; + + unsigned int nMaxWidth = player->UseWidth(); + unsigned int nMaxHeight = player->UseHeight(); asprintf(&szFileName, "%s.par", pImage->NamePNM()); @@ -749,8 +752,8 @@ void cImageControl::PictureZoomInitial(void) strncpy(m_szZoomRotation, szRotation[m_nRotation],sizeof(m_szZoomRotation)); - m_nRealImageWidth = 720; - m_nRealImageHeight = 576; + m_nRealImageWidth = nMaxWidth; + m_nRealImageHeight = nMaxHeight; if((f = fopen(szFileName, "rt"))) { @@ -767,13 +770,12 @@ void cImageControl::PictureZoomInitial(void) free(szFileName); - if(m_nRealImageWidth <= 0 - || m_nRealImageWidth > 720 - || m_nRealImageHeight > 576 ) + if(m_nRealImageWidth > nMaxWidth + || m_nRealImageHeight > nMaxHeight ) m_nZoomMin = 1; else { - m_nZoomMin = 800/m_nRealImageWidth; + m_nZoomMin = ((nMaxWidth / 100) + 1) /m_nRealImageWidth; } if (m_nZoomMin < 0) m_nZoomMin = 1; @@ -792,16 +794,19 @@ void cImageControl::ConvertZoom() if(!player) return; + unsigned int nMaxWidth = player->UseWidth(); + unsigned int nMaxHeight = player->UseHeight(); + m_ePlayMode = ePlayModeZoom; // How may pixel are outside screen after zoom - m_nZoomXMax = ((m_nRealImageWidth * m_nZoomFactor) - player->UseWidth()); - m_nZoomYMax = ((m_nRealImageHeight * m_nZoomFactor) - player->UseHeight()); + m_nZoomXMax = ((m_nRealImageWidth * m_nZoomFactor) - nMaxWidth); + m_nZoomYMax = ((m_nRealImageHeight * m_nZoomFactor) - nMaxHeight); // If image bigger than screen, how many step can i'm move in zoomed image if(m_nZoomXMax > 0) { - m_nMaxStepX = (m_nRealImageWidth * m_nZoomFactor) / player->UseWidth() * 2; + m_nMaxStepX = (m_nRealImageWidth * m_nZoomFactor) / nMaxWidth * 2; if(m_nMoveStepX >= m_nMaxStepX) m_nMoveStepX = m_nMaxStepX; if(m_nMoveStepX <= -m_nMaxStepX) @@ -815,7 +820,7 @@ void cImageControl::ConvertZoom() if(m_nZoomYMax > 0) { - m_nMaxStepY = (m_nRealImageHeight * m_nZoomFactor) / player->UseHeight() * 2; + m_nMaxStepY = (m_nRealImageHeight * m_nZoomFactor) / nMaxHeight * 2; if(m_nMoveStepY >= m_nMaxStepY) m_nMoveStepY = m_nMaxStepY-1; if(m_nMoveStepY <= -m_nMaxStepY) diff --git a/control-image.h b/control-image.h index dd964b9..f262fc0 100644 --- a/control-image.h +++ b/control-image.h @@ -86,9 +86,9 @@ class cImageControl /** How may pixel are outside screen after zoom, on height */ int m_nZoomYMax; /** real image pixel width*/ - int m_nRealImageWidth; + unsigned int m_nRealImageWidth; /** real image pixel height*/ - int m_nRealImageHeight; + unsigned int m_nRealImageHeight; char m_szZoomRotation[32]; |