remove Doxygen warning
[platform/framework/native/image.git] / inc / FMediaImageBuffer.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file   FMediaImageBuffer.h
20  * @brief  This is the header file for the %ImageBuffer class.
21  *
22  * This header file contains the declarations of the %ImageBuffer class.
23  */
24
25 #ifndef _FMEDIA_IMAGEBUFFER_H_
26 #define _FMEDIA_IMAGEBUFFER_H_
27
28 #include <FMediaImage.h>
29
30 namespace Tizen { namespace Media
31 {
32 /**
33  * @class  ImageBuffer
34  * @brief  This class is used for handling decoded image data.
35  *
36  * @since 2.0
37  * @remarks The minimum dimension is 16x16 for JPEG encoding and 8x8 for PNG encoding.
38  *
39  * The %ImageBuffer class is used for handling decoded image data, including image decoding and encoding.
40  *
41  * The following example demonstrates how to use the %ImageBuffer class to decode and encode image.
42  *
43  * @code
44 #include <FMedia.h>
45 #include <FApp.h>
46
47 using namespace Tizen::Base;
48 using namespace Tizen::Media;
49
50 result
51 TestImageBuffer(void)
52 {
53         result r = E_SUCCESS;
54         ImageBuffer img;
55
56         // Constructs an image buffer instance with an image file
57         r = img.Construct(Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/test.bmp");
58         if (IsFailed(r))
59         {
60                 return r;
61         }
62         // Encodes the image buffer into compressed data
63         r = img.EncodeToFile(Tizen::App::App::GetInstance()->GetAppRootPath()+L"data/test.jpg", IMG_FORMAT_JPG, true, 70);
64
65         return r;
66 }
67  * @endcode
68  */
69
70 class _OSP_EXPORT_ ImageBuffer
71         : public Tizen::Base::Object
72 {
73 public:
74         /**
75         * This is the default constructor for this class. @n
76         * The object is not fully constructed after this constructor is called.
77         * For full construction, the Construct() method must be called right after
78         * calling this constructor.
79         *
80         * @since 2.0
81         *
82         * @see    Construct()
83         */
84         ImageBuffer(void);
85
86         /**
87         * This is the destructor for this class. @n
88         * This destructor overrides Tizen::Base::Object::~Object().
89         *
90         * @since 2.0
91         *
92         * @see    Construct()
93         */
94         virtual ~ImageBuffer(void);
95
96         /**
97         * Initializes this instance of %ImageBuffer with the specified parameters.
98         *
99         * @since 2.0
100         *
101         * @return     An error code
102         * @param[in]  width                 The width of the image
103         * @param[in]  height                The height of the image
104         * @param[in]  pixelFormat           The pixel format of the image should be one of the values returned by GetSupportedPixelFormatListN()
105         * @param[in]  pData                  The raw pixel data of the image @n If @c pData is not @c null, then it is copied into the internal buffer of this instance.
106         *                                   If @c null, then the default color data is filled.
107         * @param[in]  length                The size of the data
108         * @exception  E_SUCCESS             The method is successful.
109         * @exception  E_INVALID_ARG         A specified input parameter is invalid.
110         * @exception  E_UNSUPPORTED_FORMAT  The specified @c pixelFormat is not supported.
111         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
112         * @remarks    There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
113         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
114         * @see GetSupportedPixelFormatListN()
115         */
116         result Construct(int width, int height, MediaPixelFormat pixelFormat, const byte* pData = null, int length = 0);
117
118         /**
119         * Initializes this instance of %ImageBuffer with the decoded data of the given image path.
120         *
121         * @since 2.0
122         *
123         * @return     An error code
124         * @param[in]  srcImagePath          The source image path
125         * @param[in]  pDecodingRegion       The region that is decoded @n If this is @c null, then the whole image is decoded.
126         * @param[in]  autoRotate            If @c true the image is rotated automatically based on the EXIF orientation tag before decoding @n
127         *                                   If @c false the image is decoded without rotation.
128         * @exception  E_SUCCESS             The method is successful.
129         * @exception  E_INVALID_ARG         A specified input parameter is invalid.
130         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
131         * @exception  E_OVERFLOW            The specified input instance exceeds the supported maximum file size or dimension.
132         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
133         * @exception  E_FILE_NOT_FOUND      The specified file cannot be found or accessed.
134         * @remarks    There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
135         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
136         */
137         result Construct(const Tizen::Base::String &srcImagePath, const Tizen::Graphics::Rectangle *pDecodingRegion = null, bool autoRotate = true);
138
139         /**
140         * Initializes this instance of %ImageBuffer with the decoded data of the given image buffer.
141         *
142         * @since 2.0
143         *
144         * @return     An error code
145         * @param[in]  srcImageBuf           The buffer that contains the compressed image data
146         * @param[in]  pDecodingRegion       The region that is decoded @n If this is @c null, then the whole image is decoded.
147         * @param[in]  autoRotate            If @c true the image is rotated automatically based on the EXIF orientation tag before decoding @n
148         *                                   If @c false the image is decoded without rotation.
149         * @exception  E_SUCCESS             The method is successful.
150         * @exception  E_INVALID_ARG         A specified input parameter is invalid.
151         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
152         * @exception  E_OVERFLOW            The specified input instance exceeds the supported maximum file size or dimension.
153         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
154         * @remarks    There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
155         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
156         */
157         result Construct(const Tizen::Base::ByteBuffer &srcImageBuf, const Tizen::Graphics::Rectangle *pDecodingRegion = null, bool autoRotate = true);
158
159         /**
160         * Initializes this instance of %ImageBuffer with the given bitmap data. @n
161         * The %Construct() method copies the raw RGB data from the @c srcBitmap,
162         * so the dimension of this instance can be different from that of @c srcBitmap if the @c srcBitmap is an auto-scaled bitmap.
163         *
164         * @since 2.0
165         *
166         * @return     An error code
167         * @param[in]  srcBitmap             The source bitmap data
168         * @exception  E_SUCCESS             The method is successful.
169         * @exception  E_INVALID_ARG         The specified input parameter is invalid.
170         * @exception  E_OVERFLOW            The specified input instance exceeds the supported maximum file size or dimension.
171         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
172         */
173         result Construct(const Tizen::Graphics::Bitmap &srcBitmap);
174
175         /**
176         * Initializes this instance of %ImageBuffer that is decoded with the data of the given image path with the specified parameters.
177         *
178         * @since 2.1
179         *
180         * @return     An error code
181         * @param[in]  srcImagePath          The source image path
182         * @param[in]  destWidth             The intended width of the image
183         * @param[in]  destHeight            The intended height of the image
184         * @param[in]  scalingMethod         The scaling method
185         * @exception  E_SUCCESS             The method is successful.
186         * @exception  E_INVALID_ARG         A specified input parameter is invalid.
187         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
188         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
189         * @exception  E_FILE_NOT_FOUND      The specified file cannot be found or accessed.
190         * @remarks
191         *           - There is a high probability for an occurrence of an out-of-memory exception.
192         *             If possible, check whether the exception is E_OUT_OF_MEMORY or not. @n
193         *             For more information on how to handle the out-of-memory exception, refer 
194         *             <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
195         *           - This method does not retain the aspect ratio of the original image.
196         */
197         result Construct(const Tizen::Base::String &srcImagePath, int destWidth, int destHeight, ImageScalingMethod scalingMethod);
198
199         /**
200         * Initializes this instance of %ImageBuffer that is decoded with the data of the given image buffer with the specified parameters.
201         *
202         * @since 2.1
203         *
204         * @return     An error code
205         * @param[in]  srcImageBuf           The buffer that contains the compressed image data
206         * @param[in]  destWidth             The intended width of the image
207         * @param[in]  destHeight            The intended height of the image
208         * @param[in]  scalingMethod         The scaling method
209         * @exception  E_SUCCESS             The method is successful.
210         * @exception  E_INVALID_ARG         A specified input parameter is invalid.
211         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
212         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
213         * @remarks
214         *           - There is a high probability for an occurrence of an out-of-memory exception.
215         *             If possible, check whether the exception is E_OUT_OF_MEMORY or not. @n
216         *             For more information on how to handle the out-of-memory exception, refer
217         *             <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
218         *           - This method does not retain the aspect ratio of the original image.
219         */
220         result Construct(const Tizen::Base::ByteBuffer &srcImageBuf, int destWidth, int destHeight, ImageScalingMethod scalingMethod);
221
222         /**
223         * Gets the current exif orientation of the image data. @n
224         * If automatic rotation is enabled during Construct() then the orientation is reset to the default value.
225         *
226         * @since 2.1
227         *
228         * @return The orientation information of the current image data
229         */
230         ExifOrientation GetExifOrientation(void) const;
231
232
233         /**
234         * Converts an instance of the Tizen::Base::Object class to an instance of %ImageBuffer and then
235         * compares it with the calling %ImageBuffer instance.
236         *
237         * @since 2.0
238         *
239         * @return     @c true if the value of @c rhs matches the value of the calling %ImageBuffer instance, @n
240         *             else @c false
241         * @param[in]  rhs   A reference to the Tizen::Base::Object instance that is to compare with the calling %ImageBuffer instance
242         * @see        Tizen::Base::Object::Equals()
243         */
244         virtual bool Equals(const Object& rhs) const;
245
246         /**
247         * Gets the hash value of the current instance by overriding the GetHashCode() method in the Tizen::Base::Object class.
248         *
249         * @since 2.0
250         *
251         * @return  The hash value of the current instance
252         */
253         virtual int GetHashCode(void) const;
254
255         /**
256         * Gets the height of the image buffer.
257         *
258         * @since 2.0
259         *
260         * @return  The height of the image buffer
261         */
262         int GetHeight(void) const;
263
264         /**
265         * Gets the width of the image buffer.
266         *
267         * @since 2.0
268         *
269         * @return  The width of the image buffer
270         */
271         int GetWidth(void) const;
272
273         /**
274         * Gets the current pixel format.
275         *
276         * @since 2.0
277         *
278         * @return  The pixel format of the media
279         */
280         MediaPixelFormat GetPixelFormat(void) const;
281
282         /**
283         * Encodes the data of this instance into a byte buffer. @n
284         * The supported encoding formats are JPEG, BMP, and PNG.
285         *
286         * @since 2.0
287         *
288         * @return     A pointer to the Tizen::Base::ByteBuffer instance containing the encoded image data
289         * @param[in]  destImageFormat       The intended image format
290         * @param[in]  quality               The encoding quality @n
291         *                                   Valid range of this parameter is @c 1 to @c 100.
292         * @exception  E_SUCCESS             The method is successful.
293         * @exception  E_OUT_OF_RANGE        A specified input parameter is out of range.
294         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
295         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
296         * @remarks    The specific error code can be accessed using the GetLastResult() method.
297         */
298         Tizen::Base::ByteBuffer* EncodeToBufferN(ImageFormat destImageFormat, int quality = 90) const;
299
300         /**
301         * Encodes the data of this instance to a file. @n
302         * The supported encoding formats are JPEG, BMP, and PNG.
303         *
304         * @since 2.0
305         *
306         * @return     An error code
307         * @param[in]  destImagePath         The intended name of the encoded image file
308         * @param[in]  destImageFormat       The intended image format
309         * @param[in]  overwrite             Set to @c true to overwrite the file, @n
310         *                                   else @c false
311         * @param[in]  quality               The encoding quality @n
312         *                                   Valid range of this parameter is @c 1 to @c 100.
313         * @exception  E_SUCCESS             The method is successful.
314         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
315         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
316         * @exception  E_ILLEGAL_ACCESS      The specified file cannot be found or accessed.
317         * @exception  E_FILE_ALREADY_EXIST  The specified file already exists and the value of @c overwrite is @c false.
318         * @exception  E_OUT_OF_RANGE        A specified input parameter is out of range.
319         * @remarks    The application should use Tizen::Content::ContentManager::CreateContent() to
320         *             register the created file into the Contents database.
321         */
322         result EncodeToFile(const Tizen::Base::String &destImagePath, ImageFormat destImageFormat, bool overwrite, int quality = 90) const;
323
324         /**
325         * Gets an instance of Tizen::Graphics::Bitmap with the data of this instance.
326         *
327         * @since 2.0
328         *
329         * @return     A pointer to the Tizen::Graphics::Bitmap instance
330         * @param[in]  pixelFormat           The bitmap pixel format
331         * @param[in]  bufferScaling         The buffer scaling type
332         * @exception  E_SUCCESS             The method is successful.
333         * @exception  E_INVALID_ARG         A specified input parameter is invalid.
334         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
335         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
336         * @remarks    The specific error code can be accessed using the GetLastResult() method.
337         */
338         Tizen::Graphics::Bitmap* GetBitmapN(Tizen::Graphics::BitmapPixelFormat pixelFormat, Tizen::Graphics::BufferScaling bufferScaling) const;
339
340         /**
341         * Gets an instance of Tizen::Graphics::Bitmap with the data of this instance after resizing it as per the specified width and height
342         *
343         * @since 2.1
344         *
345         * @return     A pointer to the Tizen::Graphics::Bitmap instance with the specified destination width and height.
346         * @param[in]  pixelFormat           The bitmap pixel format
347         * @param[in]  destWidth             The intended width of the image.
348         * @param[in]  destHeight            The intended height of the image.
349         * @exception  E_SUCCESS             The method is successful.
350         * @exception  E_INVALID_ARG         A specified input parameter is invalid.
351         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
352         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
353         * @remarks
354         *           - The specific error code can be accessed using the GetLastResult() method.
355         *           - This method returns auto scaled bitmap to support logical coordinate system,
356         *             so the actual dimension of the returned bitmap can be vary depending on the physical dimension of target device.
357         */
358         Tizen::Graphics::Bitmap* GetBitmapN(Tizen::Graphics::BitmapPixelFormat pixelFormat, float destWidth, float destHeight) const;
359
360         /**
361         * Gets an instance of Tizen::Base::ByteBuffer with the data of this instance.
362         *
363         * @since 2.0
364         *
365         * @return     A pointer to the Tizen::Base::ByteBuffer instance
366         * @param[in]  pixelFormat           The pixel format
367         * @exception  E_SUCCESS             The method is successful.
368         * @exception  E_INVALID_ARG         The specified input parameter is invalid.
369         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
370         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
371         * @remarks    The specific error code can be accessed using the GetLastResult() method.
372         * @see GetSupportedPixelFormatListN()
373         */
374         Tizen::Base::ByteBuffer* GetByteBufferN(MediaPixelFormat pixelFormat) const;
375
376         /**
377         * Creates and returns a copy of this instance.
378         *
379         * @since 2.0
380         *
381         * @return     A copy of this instance
382         * @exception  E_SUCCESS             The method is successful.
383         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
384         * @remarks    The specific error code can be accessed using the GetLastResult() method.
385         */
386         virtual ImageBuffer* CloneN(void) const;
387
388         /**
389         * Gets a new %ImageBuffer with the converted pixel format of the current image data.
390         *
391         * @since 2.0
392         *
393         * @return     A pointer to the %ImageBuffer instance containing the converted %ImageBuffer by the specified MediaPixelFormat
394         * @param[in]  pixelFormat           The pixel format for returned %ImageBuffer
395         * @exception  E_SUCCESS             The method is successful.
396         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
397         * @exception  E_INVALID_DATA        The current data is invalid for this operation. @n
398         *                                   This will happen when the width or height is not even value,
399         *                                   and the requested pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P.
400         * @remarks
401         *           - The specific error code can be accessed using the GetLastResult() method.
402         *           - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
403         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
404         */
405         ImageBuffer* ConvertPixelFormatN(MediaPixelFormat pixelFormat) const;
406
407         /**
408         * Gets a resized %ImageBuffer with the current image data. @n
409         * The aspect ratio of the data will not be preserved.
410         *
411         * @since 2.0
412         *
413         * @return     A pointer to the %ImageBuffer instance containing the resized image data
414         * @param[in]  width                 The width of the destination image
415         * @param[in]  height                The height of the destination image
416         * @exception  E_SUCCESS             The method is successful.
417         * @exception  E_OUT_OF_RANGE        A specified input parameter is out of range.
418         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
419         * @exception  E_INVALID_DATA        The current data is invalid for this operation. @n
420         *                                   This will happen when the current pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P
421         *                                   and the requested @c width or @c height is not even value.
422         * @remarks
423         *           - The specific error code can be accessed using the GetLastResult() method.
424         *           - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
425         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
426         */
427         ImageBuffer* ResizeN(int width, int height) const;
428
429         /**
430         * Gets a horizontally or vertically flipped image from the current instance.
431         *
432         * @since 2.0
433         *
434         * @return     A pointer to the %ImageBuffer instance containing the flipped image data
435         * @param[in]  flipType              The flip type
436         * @exception  E_SUCCESS             The method is successful.
437         * @exception  E_INVALID_ARG         The specified input parameter is invalid.
438         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
439         * @remarks
440         *           - The specific error code can be accessed using the GetLastResult() method.
441         *           - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
442         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
443         */
444         ImageBuffer* FlipN(ImageFlipType flipType) const;
445
446         /**
447         * Gets a rotated image in clockwise direction from the current image.
448         *
449         * @since 2.0
450         *
451         * @return     A pointer to the %ImageBuffer instance containing the rotated image data
452         * @param[in]  rotateType                The rotation type
453         * @exception  E_SUCCESS             The method is successful.
454         * @exception  E_INVALID_ARG         The specified input parameter is invalid.
455         * @exception  E_INVALID_DATA        The current data is invalid for this operation. @n
456         *                                   This will happen when the current pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUYV422
457         *                                   and the height is odd value and the requested rotation type is @c IMAGE_ROTATION_90 or @c IMAGE_ROTATION_270.
458         * @exception  E_OUT_OF_MEMORY    The memory is insufficient.
459         * @remarks
460         *           - The specific error code can be accessed using the GetLastResult() method.
461         *           - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
462         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
463         */
464         ImageBuffer* RotateN(ImageRotationType rotateType) const;
465
466         /**
467         * Crops the region of the current %ImageBuffer instance.
468         *
469         * @since 2.0
470         *
471         * @return     A pointer to the %ImageBuffer instance containing the cropped image data 
472         * @param[in]  x                     The x position
473         * @param[in]  y                     The y position
474         * @param[in]  width                 The width of the destination image
475         * @param[in]  height                The height of the destination image
476         * @exception  E_SUCCESS             The method is successful.
477         * @exception  E_OUT_OF_RANGE        A specified input parameter is out of range.
478         * @exception  E_INVALID_DATA        The current data is invalid for this operation. @n
479         *                                   This will happen when the current pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P
480         *                                   and the requested @c x, @c y, @c width, or @c height is not even value.
481         * @remarks
482         *           - The specific error code can be accessed using the GetLastResult() method.
483         *           - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
484         *             For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
485         */
486         ImageBuffer* CropN(int x, int y, int width, int height) const;
487
488         /**
489         * Gets the image information.
490         *
491         * @since 2.0
492         *
493         * @return  An error code
494         * @param[in]  srcImagePath          The source image path
495         * @param[out] imageFormat           The format of the image
496         * @param[out] width                 The width of the image
497         * @param[out] height                The height of the image
498         * @exception  E_SUCCESS             The method is successful.
499         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
500         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
501         * @exception  E_FILE_NOT_FOUND      The specified file cannot be found or accessed.
502         * @exception  E_SYSTEM              A system error has occurred.
503         */
504         static result GetImageInfo(const Tizen::Base::String& srcImagePath, ImageFormat &imageFormat, int &width, int &height);
505
506         /**
507         * Gets the image information.
508         *
509         * @since 2.0
510         *
511         * @return  An error code
512         * @param[in]  srcImageBuf          The buffer that contains the compressed image data
513         * @param[out]  imageFormat          The format of the image
514         * @param[out]  width                The width of the image
515         * @param[out]  height               The height of the image
516         * @exception  E_SUCCESS             The method is successful.
517         * @exception  E_UNSUPPORTED_FORMAT  The specified format is not supported.
518         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
519         * @exception  E_SYSTEM              A system error has occurred.
520         */
521         static result GetImageInfo(const Tizen::Base::ByteBuffer& srcImageBuf, ImageFormat &imageFormat, int &width, int &height);
522
523         /**
524         * Gets a list of the supported pixel formats.
525         *
526         * @since 2.0
527         *
528         * @return     A list of the pixel formats supported by the %ImageBuffer class, @n
529         *             else @c null if an exception occurs
530         * @exception  E_SUCCESS             The method is successful.
531         * @exception  E_OUT_OF_MEMORY       The memory is insufficient.
532         * @exception  E_SYSTEM              A system error has occurred.
533         * @remarks    The specific error code can be accessed using the GetLastResult() method.
534         * @see  Construct()
535         * @see  GetByteBufferN()
536         */
537         static Tizen::Base::Collection::IListT<MediaPixelFormat>* GetSupportedPixelFormatListN(void);
538
539 private:
540
541         /**
542         * The implementation of this copy constructor is intentionally blank
543         * and declared as private to prohibit copying of objects.
544         */
545         ImageBuffer(const ImageBuffer& rhs);
546
547         /**
548         * The implementation of this copy assignment operator is intentionally blank
549         * and declared as private to prohibit copying of objects.
550         * Use CloneN() to get an exact copy of this instance.
551         * Use Equals() to compare contents of one instance with the other.
552         */
553         ImageBuffer& operator =(const ImageBuffer& rhs);
554
555         friend class _ImageBufferImpl;
556         class _ImageBufferImpl* __pImpl;
557
558 };
559
560 }} // Tizen::Media
561 #endif // _FMEDIA_IMAGEBUFFER_H_