messagingappbase/msgeditor/mediacontrolsrc/MsgImageControl.cpp
branchRCL_3
changeset 77 da6ac9d688df
parent 66 fc3320e39880
--- a/messagingappbase/msgeditor/mediacontrolsrc/MsgImageControl.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgeditor/mediacontrolsrc/MsgImageControl.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -150,26 +150,18 @@
             
     TSize sourceSize( iSourceImage->Size() );
     TSize targetSize = TSize(
-    	Min( sourceSize.iWidth, iMaxSize.iWidth - iFrame->FrameBorderSize().iWidth ),
-		Min( sourceSize.iHeight, iMaxSize.iHeight - iFrame->FrameBorderSize().iHeight ) );
-
-    // In case of KImageTypePNGUid and KImageTypeBMPUid 
-    // with and without IsAnimation, call CreateImageViewerL with
-    // Flags zero. This to avoid image corruption  when IsAnimation is flase and 
-    // Image resize happened based on control size.
+    Min( sourceSize.iWidth, iMaxSize.iWidth - iFrame->FrameBorderSize().iWidth ),
+    Min( sourceSize.iHeight, iMaxSize.iHeight - iFrame->FrameBorderSize().iHeight ) );
 
-    TUint32 flagOptions = 0;
+    // Avoiding the usage of MIHLImageViewer::EOptionUseBilinearInterpolation
+    // because it should be only used for small images because of the memory requirements
+    // and it is much slower than the regular scaling
+    //For any type of image, nearest neighbour method(default) will be used to resize it. 
     
-    if ( !iSourceImage->IsAnimation() &&
-           iSourceImage->ImageType() == KImageTypeGIFUid )
-        {
-        	flagOptions |= MIHLImageViewer::EOptionUseBilinearInterpolation;
-      	}
- 	  iEngine = IHLViewerFactory::CreateImageViewerL( targetSize,
+    iEngine = IHLViewerFactory::CreateImageViewerL( targetSize,
                                                     *iSourceImage, 
                                                     *iDestinationBitmap, 
-                                                    *this, 
-                                                    flagOptions);                        	
+                                                    *this);                        	
     }
 
 // ---------------------------------------------------------