epoc32/include/imageconversion.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    27 #include <icl/imagecodecdata.h>
    27 #include <icl/imagecodecdata.h>
    28 #include <icl/imagedata.h>
    28 #include <icl/imagedata.h>
    29 #include <icl/icl_uids.hrh>
    29 #include <icl/icl_uids.hrh>
    30 #include <icl/imageconversionextension.h>
    30 #include <icl/imageconversionextension.h>
    31 
    31 
       
    32 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    33 #include <iclrecognizerutil.h>
       
    34 #endif
       
    35 
    32 class MImageDecoderRelay;
    36 class MImageDecoderRelay;
    33 class MImageEncoderRelay;
    37 class MImageEncoderRelay;
    34 class CImageDecoderPlugin;
    38 class CImageDecoderPlugin;
    35 class CImageEncoderPlugin;
    39 class CImageEncoderPlugin;
    36 class CImageDecodeConstruct;
    40 class CImageDecodeConstruct;
    59 	static CImageTypeDescription* NewL(const TDesC& aDescription, const TUid aImageType, const TUid aSubType);
    63 	static CImageTypeDescription* NewL(const TDesC& aDescription, const TUid aImageType, const TUid aSubType);
    60 	/**
    64 	/**
    61 	@internalComponent
    65 	@internalComponent
    62 	*/
    66 	*/
    63 	static CImageTypeDescription* NewLC(const TDesC& aDescription, const TUid aImageType, const TUid aSubType);
    67 	static CImageTypeDescription* NewLC(const TDesC& aDescription, const TUid aImageType, const TUid aSubType);
       
    68 	
    64 	IMPORT_C ~CImageTypeDescription();
    69 	IMPORT_C ~CImageTypeDescription();
    65 	IMPORT_C const TDesC& Description() const;
    70 	IMPORT_C const TDesC& Description() const;
    66 	IMPORT_C TUid ImageType() const;
    71 	IMPORT_C TUid ImageType() const;
    67 	IMPORT_C TUid SubType() const;
    72 	IMPORT_C TUid SubType() const;
    68 private:
    73 private:
   142 	static CImplementationInformationType* NewL();
   147 	static CImplementationInformationType* NewL();
   143 	/**
   148 	/**
   144 	@internalComponent
   149 	@internalComponent
   145 	*/
   150 	*/
   146 	static CImplementationInformationType* NewLC();
   151 	static CImplementationInformationType* NewLC();
       
   152 
   147 	IMPORT_C ~CImplementationInformationType();
   153 	IMPORT_C ~CImplementationInformationType();
   148 
   154 	
   149 	/**
   155 	/**
   150 	@internalComponent
   156 	@internalComponent
   151 	*/
   157 	*/
   152 	void SetDataL(TUid aImplementationUid, TInt aVersion, const TDesC& aDisplayName, const TDesC8& aDataType, const TDesC8& aOpaqueData, TDriveUnit aDrive);
   158 	void SetDataL(TUid aImplementationUid, TInt aVersion, const TDesC& aDisplayName, const TDesC8& aDataType, const TDesC8& aOpaqueData, TDriveUnit aDrive);
   153 
   159 
   259 		EOptionIgnoreExifMetaData = 0x80,
   265 		EOptionIgnoreExifMetaData = 0x80,
   260 
   266 
   261 		/**
   267 		/**
   262 		@publishedAll
   268 		@publishedAll
   263 		@released
   269 		@released
   264 		
   270 				
   265 		Codec must support crop.
   271 		Codec must support crop.
   266 		 */
   272 		 */
   267 		EOptionExtCrop = 0x0100,
   273 		EOptionExtCrop = 0x0100,
   268 		
   274 		
   269 		/**
   275 		/**
   270 		@publishedAll
   276 		@publishedAll
   271 		@released
   277 		@released
   272 		
   278 			
   273 		Codec must support block streaming extension.
   279 		Codec must support block streaming extension.
   274 		 */
   280 		 */
   275 		EOptionExtStream = 0x0200,
   281 		EOptionExtStream = 0x0200,
   276 		
   282 		
   277 		/**
   283 		/**
   278 		@publishedAll
   284 		@publishedAll
   279 		@released
   285 		@released
   280 		
   286 			
   281 		Codec must support rotation through the operation extension.
   287 		Codec must support rotation through the operation extension.
   282 		 */
   288 		 */
   283 		EOptionExtRotation = 0x0400,
   289 		EOptionExtRotation = 0x0400,
   284 
   290 
   285 		/**
   291 		/**
   286 		@publishedAll
   292 		@publishedAll
   287 		@released
   293 		@released
   288 		
   294 				
   289 		Codec must support horizontal mirror through the operation extension.
   295 		Codec must support horizontal mirror through the operation extension.
   290 		 */
   296 		 */
   291 		EOptionExtMirrorHorizontalAxis = 0x0800,
   297 		EOptionExtMirrorHorizontalAxis = 0x0800,
   292 
   298 
   293 		/**
   299 		/**
   294 		@publishedAll
   300 		@publishedAll
   295 		@released
   301 		@released
   296 		
   302 				
   297 		Codec must support vertical mirror through the operation extension.
   303 		Codec must support vertical mirror through the operation extension.
   298 		 */
   304 		 */
   299 		EOptionExtMirrorVerticalAxis = 0x1000,
   305 		EOptionExtMirrorVerticalAxis = 0x1000,
   300 
   306 
   301 		/**
   307 		/**
   302 		@publishedAll
   308 		@publishedAll
   303 		@released
   309 		@released
   304 		
   310 				
   305 		Codec must support the scaling extension.
   311 		Codec must support the scaling extension.
   306 		 */
   312 		 */
   307 		EOptionExtScaling = 0x2000,
   313 		EOptionExtScaling = 0x2000,
   308 		
   314 		
   309 		/** Reserved.
   315 		/** Reserved.
   324 		@released
   330 		@released
   325 		
   331 		
   326 		Allows WMF codec to ignore any SETVIEWPORTORG, SETVIEWPORTEXT, SCALEVIEWPORTEXT 
   332 		Allows WMF codec to ignore any SETVIEWPORTORG, SETVIEWPORTEXT, SCALEVIEWPORTEXT 
   327 		or OFFSETVIEWPORTORG commands in the metafile and allows scaling to destination bitmap.
   333 		or OFFSETVIEWPORTORG commands in the metafile and allows scaling to destination bitmap.
   328 		*/
   334 		*/
   329 		EOptionWmfIgnoreViewportMetaData = 0x020000
   335 		EOptionWmfIgnoreViewportMetaData = 0x020000,
       
   336 
       
   337 		/**
       
   338 		@publishedPartner
       
   339 		@prototype
       
   340 		
       
   341 		Requests that codec applies the auto rotation when decoding according to the orientation tag in the image Exif header.
       
   342 		*/
       
   343 		EOptionAutoRotate = 0x040000
   330 		};
   344 		};
   331 
   345 
   332 	/**
   346 	/**
   333 	Flags to control which image is decoded.
   347 	Flags to control which image is decoded.
   334 	This can be used when the source file or descriptor 
   348 	This can be used when the source file or descriptor 
   571 		/** If the codec supports it, generate a palette based on the colors present in the image data, rather than using the default palette
   585 		/** If the codec supports it, generate a palette based on the colors present in the image data, rather than using the default palette
   572 		*/
   586 		*/
   573 		EOptionGenerateAdaptivePalette = 0x02,
   587 		EOptionGenerateAdaptivePalette = 0x02,
   574 
   588 
   575 		/**
   589 		/**
   576 		@publishedAll
   590 		Use the highest possible image encoding speed; this may result in lower image quality. 
   577 		@released
   591 		This flag is more applicable to formats which use "lossy" compression algorithms, such as JPEG. 
   578 		
   592 		Decoders that do not support fast encoding will ignore it.
       
   593 		*/
       
   594 		EPreferFastEncode = 0x04,
       
   595 
       
   596 		/**
       
   597 		@publishedAll
       
   598 		@released
       
   599 				
   579 		Codec must support block streaming extension.
   600 		Codec must support block streaming extension.
   580 		 */
   601 		 */
   581 		EOptionExtStream = 0x0100,
   602 		EOptionExtStream = 0x0100,
   582 		
   603 		
   583 		/**
   604 		/**
   584 		@publishedAll
   605 		@publishedAll
   585 		@released
   606 		@released
   586 		
   607 				
   587 		Codec must support rotation through the operation extension.
   608 		Codec must support rotation through the operation extension.
   588 		 */
   609 		 */
   589 		EOptionExtRotation = 0x0200,
   610 		EOptionExtRotation = 0x0200,
   590 
   611 
   591 		/**
   612 		/**
   592 		@publishedAll
   613 		@publishedAll
   593 		@released
   614 		@released
       
   615 				
   594 		Codec must support horizontal mirror through the operation extension.
   616 		Codec must support horizontal mirror through the operation extension.
   595 		 */
   617 		 */
   596 		EOptionExtMirrorHorizontalAxis = 0x0400,
   618 		EOptionExtMirrorHorizontalAxis = 0x0400,
   597 
   619 
   598 		/**
   620 		/**
   599 		@publishedAll
   621 		@publishedAll
   600 		@released
   622 		@released
       
   623 				
   601 		Codec must support vertical mirror through the operation extension.
   624 		Codec must support vertical mirror through the operation extension.
   602 		 */
   625 		 */
   603 		EOptionExtMirrorVerticalAxis = 0x0800,
   626 		EOptionExtMirrorVerticalAxis = 0x0800,
   604 
   627 
   605 		/**
   628 		/**
   606 		@publishedAll
   629 		@publishedAll
   607 		@released
   630 		@released
       
   631 				
   608 		Codec must support setting thumbnail when using the other extensions (e.g. thumbnail rotation)
   632 		Codec must support setting thumbnail when using the other extensions (e.g. thumbnail rotation)
   609 		 */
   633 		 */
   610 		EOptionExtUseWithSetThumbnail = 0x1000,
   634 		EOptionExtUseWithSetThumbnail = 0x1000,
   611 		
   635 		
   612 		/** Reserved.
   636 		/** Reserved.
   683 	MImageEncoderRelay* iRelay;
   707 	MImageEncoderRelay* iRelay;
   684 
   708 
   685 friend class CImageEncodeConstruct;
   709 friend class CImageEncodeConstruct;
   686 	};
   710 	};
   687 
   711 
   688 class CIclRecognizerUtil; // declared here
       
   689 /**
       
   690 @internalComponent
       
   691 
       
   692 ICL utility class used by ICL recognizer
       
   693 Maintains an array of CImplementationInformation objects
       
   694 so that data headers can be speedily matched against.
       
   695 Updates the array when notified by ECOM of a change to the global
       
   696 interface implementation registration data.
       
   697 */
       
   698 NONSHARABLE_CLASS( CIclRecognizerUtil ) : public CBase
       
   699 	{
       
   700 public:
       
   701 	IMPORT_C static CIclRecognizerUtil* NewL();
       
   702 	~CIclRecognizerUtil();
       
   703 	IMPORT_C TBool GetMimeTypeL(const TDesC8& aImageData, const TDesC& aFileName, TDes8& aMimeType);
       
   704 
       
   705 private:
       
   706 	CIclRecognizerUtil();
       
   707 	void ConstructL();
       
   708 
       
   709 private:
       
   710 	class CBody;
       
   711 	CBody* iBody;	
       
   712 	};
       
   713 
       
   714 #endif // IMAGECONVERSION_H
   712 #endif // IMAGECONVERSION_H
       
   713