PS To Image SDK

long MBegin()
long MSetParam (long id,long imagetype,long bitcount,long quality,long rotate, long width,long height,long xdpi,long ydpi,long compression,long multipage)
long MConvert(long id,char *infile,char *outpath,char *filename)
long MEnd(long id)


Detailed Description


  long MBegin ()
  Create a handle for convert.
  Parameters:  
  NULL  
  Return Value:  
  Return a handle if the create was successful, otherwise 0.
   
   
  long MSetParam ( long id,
long imagetype,
long bitcount,
long quality,
long rotate,
long width,
long height,
long xdpi,
long ydpi,
long compression,
long multipage )
  Set the parameter.
  Parameters:  
  id A handle to the file.
  imagetype Set generated image format. see ENUM_IMAGE_FORMATS.
  bitcount Set the color depth in the generated image file, 1=black and white, 3=16 grayscale, 4=16 colors, 7=256 grayscale, 8=256 colors, 24=true color. see COLOR_DEPTH.
  quality Set quality (1 ~ 100) in the generated JPEG file or TIFF file jpeg compression, default 75.
  rotate Set page rotate angle(0~360).
  width Set page width. e.g. width=1, height=1280, set height as 1280 pixels, and width to according to the pdf page size relative.
  height Set page height. e.g. width=800, height=1, set width as 800 pixels, and height to according to the pdf page size relative.
  xdpi Set horizontal resolution (72 ~ 600), default 72.
  ydpi Set vertical resolution (72 ~ 600), default 72.
  compression Set the Compression method in the generated TIFF file, this option is only available for TIFF files. see ENUM_TIFF_COMPRESSION.
  multipage The 1 is generate a multi-page TIFF file, the 0 is generate a TIFF file for each page, this option is only available for TIFF files
  Return Value:  
  Returns 1 if set is successfully, otherwise 0.
   
   
  long MConvert (long id,
char *infile,
char *outpath,
char *filename)
  Convert to Image file.
  Parameters:  
  id A handle to the file.
  infile A string that is path to the input PS file.
  outpath Set output path. If path is NULL or an empty string, it save in the same folder as source file.
  filename A string that is path to the output Image file.
  Return Value:  
  Returns 1 if convert is successfully, -1 if input ps path error, -2 if output Image path error, otherwise 0.
   
   
  long MEnd (long id)
  Close the handle.
  Parameters:  
  id A handle to the file.
  Return Value:  
  Returns 1 if successfully, otherwise 0.

ENUM_IMAGE_FORMATS

Formats Value Support color depth, see COLOR_DEPTH.
IMAGE_FORMAT_BMP 1 1,, 3,, 4,, 7,, 8,, 24
IMAGE_FORMAT_EMF 2 24
IMAGE_FORMAT_WMF 3 24
IMAGE_FORMAT_JPG 4 7,, 24
IMAGE_FORMAT_PNG 5 1,, 3,, 4,, 7,, 8,, 24
IMAGE_FORMAT_GIF 6 1,, 3,, 4,, 7,, 8
IMAGE_FORMAT_TIF 7 1,, 3,, 4,, 7,, 8,, 24
IMAGE_FORMAT_PCX 8 1,, 3,, 4,, 7,, 8,, 24
IMAGE_FORMAT_TGA 9 7,, 8,, 24
IMAGE_FORMAT_JP2 10 7,, 24
IMAGE_FORMAT_RAS 11 7,, 24
IMAGE_FORMAT_JPC 12 7,, 24




ENUM_TIFF_COMPRESSION

Compression Value   Support color depth, see COLOR_DEPTH.
COMPRESSION_NONE 0 dump mode 1,, 3,, 4,, 7,, 8,, 24
COMPRESSION_LZW 1 Lempel-Ziv & Welch 1,, 3,, 4,, 7,, 8,, 24
COMPRESSION_JPEG 2 %JPEG DCT compression 7,, 24
COMPRESSION_PACKBITS 3 Macintosh RLE 3,, 4,, 7,, 8,, 24
COMPRESSION_CCITTFAX4 4 CCITT Group 4 fax encoding 1
COMPRESSION_CCITTFAX3 5 CCITT Group 3 fax encoding 1
COMPRESSION_CCITTRLE 6 CCITT modified Huffman RLE 1




ENUM_COLOR_BIT


Color Value  
BITCOUNT_1 1 black/white( 1 bits )
BITCOUNT_4G 3 16 color grayscale( 4 bits )
BITCOUNT_4 4 16 color( 4 bits )
BITCOUNT_8G 7 256 color grayscale( 8 bits )
BITCOUNT_8 8 256 color( 8 bits )
BITCOUNT_24 24 True color( 24 bits )



Technical Support

Any time that you need help while using products, please contact our support team at support@mgosoft.com.
We promise to our customers that we will deal with emails within 24 hours after receiving them.


Copyright © 2017 Mgosoft.com, Inc