[Bada Software and Hacking General] Tigrouzen:
Adfree found Samsung confidential file !!!

/**

* Mocha

* Copyright (c) 2002 Software Center, Samsung Electronics, Inc.

* All rights reserved.

*

* This software is the confidential and proprietary information

* of Samsung Electronics, Inc. ("Confidential Information"). You

* shall not disclose such Confidential Information and shall use

* it only in accordance with the terms of the license agreement

* you entered into with Samsung Electronics.

* This file defines Image CODEC.

*/

#ifndef _IMG_CODEC_H_

#define _IMG_CODEC_H_

#ifdef __cplusplus

extern "C" {

#endif /* __cplusplus */

#include "Shp.h"

#include "FileMgr.h"

#include "WmGrpType.h"

typedef	struct imgColor

{

USHORT	R ;	/* Red Component */

USHORT	G ;	/* Green Component */

USHORT	B ; /* Blue Component */

}ImgCOLOR;

typedef	enum inputFlag

{

IMG_RGB_888_OUTPUT	= 0x0001,

IMG_RGB_OUTPUT	= 0x0002,

IMG_ARGB_8888_OUTPUT	= 0x0003,

IMG_YUV_OUTPUT	= 0x0005,

IMG_RGB_565_OUTPUT_AND_ROTATE = 0x0006,

IMG_RGB_888_OUTPUT_AND_ROTATE = 0x0007,

IMG_ARGB_8888_OUTPUT_AND_ROTATE = 0x0008,

/* Rotation mode for Phoneshell*/

IMG_RGB_565_OUTPUT_AND_ROTATE_FIT_TO_LCD = 0x0009,

IMG_RGB_888_OUTPUT_AND_ROTATE_FIT_TO_LCD = 0x0010,

IMG_ARGB_8888_OUTPUT_AND_ROTATE_FIT_TO_LCD = 0x0011,

IMG_BGRA_8888_OUTPUT_AND_ROTATE = 0x0012,

}ImgInputFlag;

typedef	enum resize

{

/* During resizing aspect ratio will be maintained */

IMG_RESIZE_MAINTAIN_ASPECT_RATIO,	//downsize with keeping aspect ratio

IMG_RESIZE,	//downsize without keeping aspect ratio,it displays to resize same as expect size

IMG_RESIZE_MAINTAIN_ASPECT_RATIO_AND_UPSCALE,//upscale with keeping aspect ratio

IMG_RESIZE_AND_UPSCALE	//upscale without keeping aspect ratio,it displays to resize same as expect size

} ImgResizeInput;

#define IMGFREEIMAGE(pb)	do{ if(pb){ MemFree(pb); (pb) = NULL; } }while(0)

typedef struct tagImgBitmap

{

unsigned int	width;

unsigned int	height;

UCHAR	bitsPerPixel; /* For TIF it should be 8 or 4 or 1 always

* If coming directly from camera and

* bitsperpixel is 16 then its assumed as 8

* & color type as RGBC and compression

* type as NO_COMP and encode it.

*/

void	*pBits;

BOOL	bChromaKeyFlag;	/* Flag to indicate chroma key

* Default: FALSE

*/

ULONG	chromaKey;	/* This is the colour which needs to be (or is) transparent.

* This colour will be in 5, 5, 5 RGB format as below.

* First 16 MS Bits 0, R (5), G (5), 0 (1), B (5)

*/

UCHAR	disposal;	/* Disposal action to take during

* display of current flag

* Default: 0

*/

USHORT	delay;	/* Delay before display of

* next frame. Default: 0

*/

BOOL	inputFlag; /* User input required befflag used

* Default: FALSE

*/

BOOL	interlace; /* Interlace indicator flag

* Default: FALSE

*/

BYTE	*pLocalColorMap;/* Local color palette pointer

* Default: NULL

*/

/* For TIF :Should be given if PALETTE color type.

*/

USHORT localColorMapSize;

/* Local color palette size */

/* In TIF: Should be given if PALETTE color type.

*/

void	*pAlphaChannel;	/* An alpha channel, representing transparency

* information on a per-pixel basis

*/

BYTE	colorType ;	/* Indicates the color type of image. It can be

* GRAY, COLOR, PALETTED, GRAY_WITH_ALPHA_CHANNEL or

* COLOR_WITH_ALPHA_CHANNEL

*/

/* For TIF: IT could be TIF_COLORTYPE_BILEVEL,

* TIF_COLORTYPE_GRAY ,TIF_COLORTYPE_RGB,

* TIF_COLORTYPE_PALETTE or

* TIF_COLORTYPE_RGBPALETTE.

*/

BYTE	filter ;	/* Type of filter to apply. Could be one of NONE,

* SUB, UP, AVERAGE or PAETH

*/

BYTE	compressionMethod ; /* Type of compression in zLib to apply. Could be

* one of NONE, FIXED or DYANMIC

*/

/* For TIF : IT could be TIF_COMP_NOCOMP ,

* TIF_COMP_PACKBIT or TIF_COMP_HUFFMAN (only for bilevel)

*/

UCHAR	colorConversion;	/* Indicates whether color conversion has to

* be done or not

*/

/* For TIF :This represents white is zero or

* black is zero in case of bilevel & gray.

*/

UCHAR	downSampling;	/* Indicates whether down sampling needs to

* be done or not

*/

UCHAR	downSamplingMethod[3];

/* Down sampling offsets for every component. Possible

* combinations are

*	1, 1, 1

*	1, 2, 1

*	1, 2, 2

*/

} ImgBitmap;

typedef struct tagImgBitmapElem ImgBitmapElem;

struct tagImgBitmapElem

{

int	x;

int	y;

ImgBitmap	*pbmBitmap;

ImgBitmapElem	*pNext;

};

typedef struct gifDecode	ImgGIFFrame ;

/**

* Structure about Image Information

*/

typedef struct tagImgImage

{

int	dataSize;	/* Holds the total number of bytes required

* to hold the image

*/

unsigned int	width;

unsigned int	height;

USHORT	flag;	/*	This contains flags as defined

*	in ImgCodecFlagType

*/

ULONG	backGroundColor;	/* The backgroundColor specifies a default background

* color to present the image against.

* Note that viewers are not bound to honor this color.

* A viewer can choose to use a different background.

*/

BYTE	*pGlobalColorMap;	/*	Global color palette pointer

*	Default: NULL

*/

USHORT globalColorMapSize; /* Local color palette size */

ULONG	gamma;	/* The value is encoded as a 4-byte unsigned integer,

* representing gamma times 100000. For example, a

* gamma of 0.45 would be stored as the integer 45000.

*/

int	bitmapCount;	/* This will hold the number of bitmaps in the

* ImgImage structure

*/

BYTE	function ;	/* This will be set as TRUE if this structure is

* used for encoder

*/

ImgBitmapElem	*pHead;

ImgBitmapElem	*pTail;

ULONG	decodedSize ;	/* 1 => Same as in the encoded stream

* 0 => Resize to QQVGA if size is more

* than 176 x 144

*/

BOOL	memAllocEx ;	/* TRUE => MemAllocEx is used,

* FALSE => MemAlloc is used

*/

USHORT	loopCount ;	/* This will contain the number of times to repeat

* the animation

*/

BOOL	bLoopCount ;	/* If GIF LoopCount is present then this will be

* TRUE, otherwise it will be false

*/

ImgGIFFrame	*pGifFrame ;	/* Stores the intermediate GIF Frame */

ImgInputFlag	inputFlag;

ImgResizeInput	resizeMethod ;

/* Flag to identify whether image is AGIF or not */

BOOL	bAGIFImage ;

unsigned char	*pEncodedData ;

INT32	cFileSize ;

BOOL	bFirstFrame ;

BOOL	bReservedMemoryFlag;

unsigned int	offset ;

unsigned int	ExifImageWidth;//Indicates the Exif width, This is not same as original width.

unsigned int	ExifImageHeight;//Indicates the Exif height, This is not same as original height.

unsigned int	ExifOrientation;

unsigned int	OrigWidth;//Indicates the original image width.

unsigned int	OrigHeight;//Indicates the original image height.

} ImgImage;

typedef enum

{

IMG_ENC_GIF	= 0x00000001,

IMG_ENC_PNG	= 0x00000002,

IMG_ENC_WBMP	= 0x00000004,

IMG_ENC_JPEG	= 0x00000008,

IMG_ENC_BMP	= 0x00000010,

IMG_ENC_TIF	= 0x00000020,

IMG_ENC_AGIF	= 0x00000040,

IMG_DEC_GIF	= 0x00010000,

IMG_DEC_PNG	= 0x00020000,

IMG_DEC_WBMP	= 0x00040000,

IMG_DEC_JPEG	= 0x00080000,

IMG_DEC_BMP	= 0x00100000,

IMG_DEC_TIF	= 0x00200000,

IMG_DEC_AGIF	= 0x00400000,

IMG_CODEC_NONE	= 0x00000000,

IMG_CODEC_GIF	= IMG_ENC_GIF | IMG_DEC_GIF,

IMG_CODEC_PNG	= IMG_ENC_PNG | IMG_DEC_PNG,

IMG_CODEC_WBMP	= IMG_ENC_WBMP | IMG_DEC_WBMP,

IMG_CODEC_JPEG	= IMG_ENC_JPEG | IMG_DEC_JPEG,

IMG_CODEC_BMP	= IMG_ENC_BMP | IMG_DEC_BMP,

IMG_CODEC_TIF	= IMG_ENC_TIF | IMG_DEC_TIF,

IMG_CODEC_AGIF	= IMG_ENC_AGIF	|	IMG_DEC_AGIF

} ImgCodecType;

#ifndef	STAND_ALONE

/*

* ECOM Interface

*/

#include "ImgECOM.h"

#endif

#ifdef __cplusplus

}

#endif /* __cplusplus */

#endif // _IMG_CODEC_H_

---------- Post added at 12:05 PM ---------- Previous post was at 11:47 AM ----------

Found all system samsung file if you need it i do a mega zip ;)