mobilemessaging/unieditor/application/src/UniEditorProcessImageOperation.cpp
branchRCL_3
changeset 28 fbb813aef148
parent 0 72b543305e3a
child 53 696bfeff199e
equal deleted inserted replaced
24:e00582ce7ecd 28:fbb813aef148
    42 
    42 
    43 #include <msgtextutils.h>
    43 #include <msgtextutils.h>
    44 
    44 
    45 #include <mmssettingsdefs.h>
    45 #include <mmssettingsdefs.h>
    46 
    46 
       
    47 #include <mmsversion.h>
       
    48 
    47 #include "UniClientMtm.h"
    49 #include "UniClientMtm.h"
    48 #include "UniEditorEnum.h"
    50 #include "UniEditorEnum.h"
    49 #include "UniEditorDocument.h"
    51 #include "UniEditorDocument.h"
    50 #include "UniEditorProcessImageOperation.h"
    52 #include "UniEditorProcessImageOperation.h"
    51 
    53 
   462         // is under comression margin.
   464         // is under comression margin.
   463         iProcessMethod |= EUniProcessImgMethodCompress;
   465         iProcessMethod |= EUniProcessImgMethodCompress;
   464         }
   466         }
   465     
   467     
   466     TBool largeImageQuery = EFalse;
   468     TBool largeImageQuery = EFalse;
       
   469     TInt conformanceWidth = KImageRichWidth;
       
   470     TInt conformanceHeight = KImageRichHeight;
       
   471     
       
   472     if (iDocument.DataModel()->MmsConformance().ConformanceVersion()> KMmsVersion12)
       
   473         {
       
   474         conformanceWidth = KImageMegapixelWidth;
       
   475         conformanceHeight = KImageMegapixelHeight;    
       
   476         }
   467     
   477     
   468     if ( iProcessMethod == EUniProcessImgMethodNone )
   478     if ( iProcessMethod == EUniProcessImgMethodNone )
   469         {
   479         {
   470         // Image won't be processed
   480         // Image won't be processed
   471         if ( ( origSize.iWidth > KImageRichWidth ||
   481         if ( ( origSize.iWidth > conformanceWidth ||
   472                origSize.iHeight > KImageRichHeight ) &&
   482                origSize.iHeight > conformanceHeight ) &&
   473              ( iImageInfo->FileSize() + iMessageSize ) < iDocument.MaxMessageSize() )
   483              ( iImageInfo->FileSize() + iMessageSize ) < iDocument.MaxMessageSize() )
   474             {
   484             {
   475             // Original image width or height is "non-conformant" and original image would 
   485             // Original image width or height is "non-conformant" and original image would 
   476             // fit to into the message without any processing.
   486             // fit to into the message without any processing.
   477             largeImageQuery = ETrue;
   487             largeImageQuery = ETrue;
   478             }
   488             }
   479         }
   489         }
   480     else
   490     else
   481         {
   491         {
   482         // Image will be processed
   492         // Image will be processed
   483         if ( scaleSize.iWidth > KImageRichWidth ||
   493         if ( scaleSize.iWidth > conformanceWidth ||
   484              scaleSize.iHeight > KImageRichHeight )
   494              scaleSize.iHeight > conformanceHeight )
   485             {
   495             {
   486             // Processed image is "non-conformant" after processing.
   496             // Processed image is "non-conformant" after processing.
   487             largeImageQuery = ETrue;
   497             largeImageQuery = ETrue;
   488             }
   498             }
   489         }
   499         }